isajic Posted June 10, 2015 Share Posted June 10, 2015 If you increase line width to 2 pixels or more, line styles (dotted, dashes) will be visible. However, for 1 pixel width, separations between line segments, supposed to be in background color, are halfway between foreground and background colors, so at 100%, line looks almost solid. (Paint.net v4.0.5, Win7x64 SP1, Hardware acceleration on, DPI 96.0, NVidia GTX 750) Quote Link to comment Share on other sites More sharing options...
midora Posted June 10, 2015 Share Posted June 10, 2015 The spacing depends on the line width. So if the width is one pixel the maximum size of the holes is one pixel too. You may switch off anti-aliasing :PaintDotNet.Icons.AntiAliasing. to get better results for the one pixel case. Quote Link to comment Share on other sites More sharing options...
Eli Posted June 10, 2015 Share Posted June 10, 2015 (edited) Welcome to the forum isajic. Do as Midora suggests. Horizontal and vertical lines are drawn sharp and nice but If you draw diagonal lines they are not so pretty. Edited June 10, 2015 by Eli Quote Link to comment Share on other sites More sharing options...
isajic Posted June 11, 2015 Author Share Posted June 11, 2015 (edited) Thank you midora, thank you Eli Let's talk now about width=1, Antialiasing Disabled, Style Dotted. Unfortunately, line drawing implementation is not quite correct. We would expect every second pixel to be drawn, not few consecutive foreground pixels or few consecutive background pixels occasionally. Even worse, if line angle is between -45 and 45 degrees (as in the Eli's post above), we should never see consecutive vertical pixels (as it is not the case with solid lines). The developer should make implementation of line styles consistent to each other: line styles other than solid should not draw pixels not present in the solid case. Also, one should never see consecutive pixels both horizontally and vertically in the same one pixel wide line. Edited June 11, 2015 by isajic Quote Link to comment Share on other sites More sharing options...
midora Posted June 11, 2015 Share Posted June 11, 2015 Maybe I'm wrong but I'm pretty sure that the underlying graphic system draws the line. So you have to ask someone to adapt GDI+ or nowadays DirectDraw if you are not happy with the implementation of the algorithm. Or you may write your own plugin (or use CodeLab) to implement aliased 1 pixel line drawing with styles. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.