-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: imagesLoading, displaying, rendering imagesLoading, displaying, rendering imagesd: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Description
Please add support for repeating a pattern in a shape, similar to pattern fill support for the HTML canvas.
https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createPattern
What I would like to do is draw a small pattern using the existing lines, rects, circles, and other shapes. I would then like to use this pattern as the fill for drawing other elements on the canvas, instead of just a color.
i.e., currently I can draw a rectangle with a solid fill color like so:
void drawRect(Rectangle<num> bounds, Color fill) {
final paint = new Paint();
paint.color = new Color.fromARGB(fill.a, fill.r, fill.g, fill.b);
paint.style = PaintingStyle.fill;
canvas.drawRect(bounds, paint);
}Instead, I would like to have something like a PantingStyle.repeat, where I can set another canvas element (or similar construct) as the source for the pattern to repeat.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: imagesLoading, displaying, rendering imagesLoading, displaying, rendering imagesd: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team