Skip to content

Port Maui.Gtk PR #17: replace DllImports in CairoCanvas#90

Merged
Redth merged 2 commits into
mainfrom
redth/port-old-pr-17-cairocanvas
Apr 16, 2026
Merged

Port Maui.Gtk PR #17: replace DllImports in CairoCanvas#90
Redth merged 2 commits into
mainfrom
redth/port-old-pr-17-cairocanvas

Conversation

@Redth

@Redth Redth commented Apr 16, 2026

Copy link
Copy Markdown
Member

Ports the CairoCanvas managed-API refactor from the old Maui.Gtk repo.

Original PR: Redth/Maui.Gtk#17

This removes the remaining low-level Cairo and Pango interop in CairoCanvas in favor of the managed bindings already used elsewhere in the GTK backend.

Replace the remaining Cairo and Pango DllImport usage in GTK4 CairoCanvas with the managed GirCore APIs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Redth Redth marked this pull request as ready for review April 16, 2026 17:42
Copilot AI review requested due to automatic review settings April 16, 2026 17:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Ports the Maui.Gtk CairoCanvas refactor to remove remaining low-level Cairo/Pango P/Invoke usage and rely on the managed GirCore bindings already used elsewhere in the GTK backend.

Changes:

  • Replaced Cairo gradient pattern P/Invokes with managed LinearGradient / RadialGradient usage.
  • Replaced Pango attributed-text P/Invokes with managed AttrList / Attribute APIs.
  • Simplified image surface dimension access via managed surface.Width / surface.Height.

Comment thread platforms/Linux.Gtk4/src/Linux.Gtk4/Graphics/CairoCanvas.cs Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Redth Redth merged commit 14cc857 into main Apr 16, 2026
2 checks passed
@Redth Redth deleted the redth/port-old-pr-17-cairocanvas branch April 16, 2026 23:16
@MauiBot

MauiBot commented Apr 16, 2026

Copy link
Copy Markdown

No documentation updates needed — this PR is an internal refactoring that replaces raw DllImport P/Invoke calls with managed Cairo/Pango bindings in CairoCanvas.cs, with no public API or user-facing behavior changes.

Generated by PR Documentation Check for issue #90 ·

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants