Skip to content

Add image drawing, text rotation, pie/arc paths, and dash patterns to VectorCanvas - #3

Merged
sahebansari merged 1 commit into
sahebansari:masterfrom
pgourlain:users/pgo/images-pie
Sep 20, 2026
Merged

sahebansari merged 1 commit into
sahebansari:masterfrom
pgourlain:users/pgo/images-pie

Conversation

@pgourlain

Copy link
Copy Markdown
Contributor

Summary

This PR extends the drawing surface with several features that were previously
missing, fixes a PNG decoding gap, and removes a vulnerable transitive dependency.

Added

  • Image drawing — PNG and JPEG images can now be placed at a given position
    on a VectorCanvas, loaded from a file path, a byte array, or a stream.
    Five layout modes are supported: Stretch, Contain, centred Cover,
    top-left Cover, and a natural-size top-left crop. Clipping applied while
    drawing an image is scoped to that operation and does not leak into
    subsequent canvas commands.
  • Text rotation — text can optionally be rotated clockwise around its
    baseline point. Works with both the standard fonts and registered custom fonts.
  • Elliptical arcs and pies — PathDescriptor gained elliptical arcs and
    closed sectors, with FillPie, StrokePie, and DrawPie exposed as
    canvas-level conveniences.
  • Dash patterns — lines and stroked rectangles now accept native dash
    patterns and a dash phase, instead of being limited to solid strokes.

Fixed

  • PNG decoding now handles 8-bit grayscale images with an alpha channel
    (colour type 4),

@sahebansari sahebansari self-assigned this Sep 20, 2026
@sahebansari
sahebansari merged commit 1c0c847 into sahebansari:master Sep 20, 2026
1 check passed
@pgourlain
pgourlain deleted the users/pgo/images-pie branch September 20, 2026 09:21
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.

2 participants