Skip to content
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

Fix SVGContext.rect() implementation #737

Open
gristow opened this issue Feb 3, 2020 · 1 comment
Open

Fix SVGContext.rect() implementation #737

gristow opened this issue Feb 3, 2020 · 1 comment
Assignees

Comments

@gristow
Copy link
Collaborator

gristow commented Feb 3, 2020

SVGContext.rect() should prepare but not draw a rectangle until stroke() or fill() are called to match the CanvasContext implementation. (See discussion in #736.)

@gristow gristow self-assigned this Feb 3, 2020
@0xfe 0xfe added the bug label Apr 2, 2020
@ronyeh
Copy link
Collaborator

ronyeh commented Sep 30, 2021

I agree with this one.

It has caused confusion in the past, where we think CanvasContext is buggy:
#638

We should have SVGContext and CanvasContext match as closely as possible. Any superchanged convenience methods should have a different name. For example, if we want a method that adds the path and also strokes/fills, we could call it .drawRectWithStyle(x,y,w,h,styleObject). That way we can implement the convenience method in both CanvasContext and SVGContext.

@ronyeh ronyeh added the 4.x label Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants