-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Leveraging new canvas api #8387
Comments
I was ready to look into roundedRect() but realized it's assuming a single radius value while fabric.js takes an rx and an ry, which means if the values are different, we use the current mess. |
i have seen it supports an array of radius, am i wrong? ''' ''' |
check the browser support first and give it a go if you want ! |
I pocked that a while back... duplicate #7759 |
isn't reset good at leat to clear a canvas from a transformed state? |
I don't remember anymore what I checked |
context lost event is good for us |
Thanks, @asturur! That's what I get for looking at it late at night. I'll see if roundRect works similar to rx and ry. |
@asturur And I'm back... so the array is actually based on the 4 corners on the rectangle, not how far the radius goes horizontally or vertically (assuming I understand rx and ry correctly, since I don't use rounded rectangles in my use case). Like you can say I only want the top-left corner rounded this much and leave the others not rounded. Let me know if I misunderstand the idea of rx and ry. |
And I'm even more bummed. I tried updating the TextDecoration and it doesn't seem to work. Now that I check docs, I don't see where this function is available. It's almost like it was an early idea that didn't become official. I feel bummed because I think I figured out a minimal solution, assuming ctx.textDecoration = 'underline' before a strokeText/fillText is how this should work. I'm 2/2 on not helping, despite trying. |
ctx.filter isn't supported on Safari (or if it does work, it's very slow). This article seems to be targeting Chrome and expecting other guys to catch up. @asturur Thought I don't like saying it, I feel like nothing can be worked here if we don't want to risk losing support of some browsers (or if we want two implementations, which is the opposite of what I think the intent is). |
Abandoning the old browsers means also we can use the newest canvas api finally.
In this simple article there are surfaced a bunch of api that we are not using:
https://developer.chrome.com/blog/canvas2d/
A simple task for anyone that would like to start contribute is to make a list of opportunity in that article and
open a single item task to implement it and then implement it. Some simple suggestions:
One task for 1 feature for 1 or more pr. ( not 1 pull request for 3 features )
For each feature verify which browser introduced support, list them in the task with a feature request, so that we can discuss if those are old enough to be used.
For whoever wants to contribute those small things, thank you in advance
The text was updated successfully, but these errors were encountered: