Jump to content

Styles do not affect 1 pixel wide lines noticeably


Recommended Posts

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)

Link to comment
Share on other sites

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.

midoras signature.gif

Link to comment
Share on other sites

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.

post-141699-0-54540900-1434014185_thumb.

Edited by isajic
Link to comment
Share on other sites

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.

midoras signature.gif

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...