Draw line 1 pixel width #21
Replies: 4 comments 6 replies
-
Thanks for the feedback. What's currently happening is that the renderer is drawing a line at Y = 149.5, so it's splitting the line between Y = 149 and Y = 150. Why is this offset there? Because when antialiasing is enabled, mixing perfectly solid 1px horizontal and vertical lines with other antialiased lines looks odd. But when antialias is disabled, I can see that this 0.5px offset is unhelpful and should be fixed. |
Beta Was this translation helpful? Give feedback.
-
Angus, |
Beta Was this translation helpful? Give feedback.
-
Antialiasing does indeed have a 25% weighting. Lines 1361 to 1362 in 1f1cec0
This is without the 25% weighting: See also: Line 1148 in 1f1cec0 Lines 1099 to 1103 in 1f1cec0
I wouldn't describe antialiasing as an artifact, since the apparent blurring it produces is unavoidable. |
Beta Was this translation helpful? Give feedback.
-
https://www.angusj.com/image32/Docs/Units/Img32.Draw/Routines/DrawPolygon.htm |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello I begin to playing with this library to check the possibility of using it for a drawing and text editor. The come from GDI and drawing a line with this code:
`img.AntiAliased:= false;
path2[0].X:= 50;
path2[0].Y:= 150;
path2[1].X:= 400;
path2[1].Y:= 150;
DrawLine(img, path2, 1, Color32(clBlack), esPolygon);`
I get a two pixels width. Other line with this code : DrawLine(img, path2, 4, Color32(clBlack), esPolygon); draws the line with 4 pixels. I try to set img.AntiAliased:= false , but it seems doesn't affect to this. How can I draw that line with one pixel width?

Beta Was this translation helpful? Give feedback.
All reactions