Jump to content

1px wide circles are asymmetrical


Recommended Posts

I noticed that drawing low-res circles (for pixelart) with the shapes tool results in deformed circles on almost every radius if using a width of 1.

Using something like https://donatstudios.com/PixelCircleGenerator shows how it should scale up.

First circle in each set is the one done by hand and the second is the one made by the shapes tool.

Screenshot 2021-01-06 181230.png

-- Formerly known as Vlader. --

Link to comment
Share on other sites

It's a long-standing issue that I just haven't addressed yet. It's more complicated than you'd think because the Shape rendering code has to handle floating point, not just integer, coordinates, as well as arbitrary 3x2 matrix transforms. Detecting that a pixel-aligned circle is being drawn isn't as straightforward as I'd hoped.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

On 1/7/2021 at 6:21 PM, Rick Brewster said:

It's a long-standing issue that I just haven't addressed yet. It's more complicated than you'd think because the Shape rendering code has to handle floating point, not just integer, coordinates, as well as arbitrary 3x2 matrix transforms. Detecting that a pixel-aligned circle is being drawn isn't as straightforward as I'd hoped.

I think i get what you mean. Would having an edge case check when the user selects 1px shape drawing and treat it as just integers help in this case? Edge cases isn't really what you want to add in but i imagine it would be acceptable for at least a temporary fix. I thankfully needed to create only a handful of pixelated circles, but i can see other users using this a lot more than i in their regular workflow and this would help immensely.

-- Formerly known as Vlader. --

Link to comment
Share on other sites

  • 9 months later...

Why doesn't it work to calculate the center of the ellipse and then use the equation for an ellipse to target pixels that lie closest to each location on the path, or create an upper and lower boundary for the pixels in the circle, then trim that path down by symmetrically removing pixels so that it creates a proper 1 pixel barrier; or derive a pixel perfect symmetrical circle from the anti-aliasing option that already works correctly? (See https://www.reddit.com/r/paintdotnet/comments/b52mp2/circles_are_not_symmetrical_in_pdn_see_image_why/.)
I wish Paint.NET was open source.

 

Link to comment
Share on other sites

  • 5 months later...
1 hour ago, mariejenkms said:

When I use mermaidAPI and mermaid.css, graph definiton like below: graph LR; A((start))-->B(step1); B-->C[step2]; C-->D{step3}; D-->E[end]; classDef green fill:#9f6,stroke:#333,stroke-width:1px; class A,B,C,D,E green; But, the result is A node and D node is not green; Please help me! Thanks!

 

I think you're in the wrong place. This is a Paint.NET forum, has nothing to do with mermaidAPI.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...