-
Notifications
You must be signed in to change notification settings - Fork 111
Add diagrams for a bunch more canvas stuff #198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add diagrams for a bunch more canvas stuff #198
Conversation
gspencergoog
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are really awesome!
Can you perhaps change them so that they are transparent PNGs? One thing that would be nice is if we can have them work for both light and dark mode docs pages, since that's something that they will soon respect.
It might be possible to choose (probably not black or white) colors/transparencies that will be readable over either a black background or a white background. I realize that might be a tall order, but since we don't have a good way to swap the assets based on the dark mode setting yet, seems like the best solution for now.
| bool shouldRepaint(LineDiagramPainter oldDelegate) => true; | ||
| } | ||
|
|
||
| class RectCtorDiagramPainter extends CustomPainter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| class RectCtorDiagramPainter extends CustomPainter { | |
| class RectConstructorDiagramPainter extends CustomPainter { |
We try not to use abbreviations in names.
|
And if it isn't straightforward to generate an RGBA PNG (which it might not be), then we can also leave that for another time. |
|
I think that works great! Ship it! |
|
@gspencergoog re-generated them with the new color palette! let me know if we need any further tweaks |
gspencergoog
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.





This PR adds diagrams for Canvas.clipRect, Canvas.clipRRect, Canvas.clipPath, Canvas.drawLine, Canvas.drawRect, Canvas.drawRRect, Canvas.drawOval, Canvas.drawCircle, Path.conicTo, Path.cubicTo, Path.quadraticBezierTo, Radius.circular, and Radius.elliptical