-
-
Notifications
You must be signed in to change notification settings - Fork 560
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
Blended/Anti-Aliased edges on rectangle tool #326
Comments
Looks like this happens in Firefox (117.0.1) but not Safari (latest), so maybe it's a bug on the Firefox side. Here's the hack I used to have sharp edges in Firefox (and still Safari), if anyone finds themself in the same boat, src/tools.js
And here's a shot of the box tool in Firefox at each line width (with View -> Zoom -> Large Size selected), to see what I mean, |
This is a bug due to some unknown changes in Firefox. I would pinpoint the changes with Your fix looks good, and I would accept a PR with your changes. Or I could commit it and give you credit in the commit message. Alternatives considered:
|
Hi, thank you for your consideration and reply. I'll put together a PR shortly. |
… working around weirdness in latest Firefox As discussed in 1j01#326, the drawing of rectangles show a blurred/anti-aliased edge in the recent versions of Firefox. This change restores sharp edges in Firefox. The change is modeled after how the existing code handles the degenerate case of drawing the rectangle (when the rectangle is either not as tall or not as wide as double the rectangle line width), but this version just draws four rectangles, one for each side.
My first PR, hope I've done it correctly. Have a good day |
… working around weirdness in latest Firefox As discussed in #326, the drawing of rectangles show a blurred/anti-aliased edge in the recent versions of Firefox. This change restores sharp edges in Firefox. The change is modeled after how the existing code handles the degenerate case of drawing the rectangle (when the rectangle is either not as tall or not as wide as double the rectangle line width), but this version just draws four rectangles, one for each side.
I don't recall for sure if this is how the original mspaint tool worked, but in jspaint I'm seeing that the rectangle tool has a blended / anti-aliased edge. I seem to recall the rectangle tool making a sharp edge. I tried out the online emulator as per the contributing doc and see no blending in that version, it's got a sharp edge there. The polygon tool, ellipse and rounded rec tool don't have the same blending in jspaint that the rectangle tool has.
Would this be considered a bug?
I went ahead and "fixed" this locally
The text was updated successfully, but these errors were encountered: