This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Should guide lines be 2px wide?

Tags: None
(comma "," separated)
User avatar
jstaniek
Moderator
Posts
1027
Karma
2
OS

Should guide lines be 2px wide?

Wed Dec 31, 2014 8:50 am
Quite old already, but here you have it: a popular problem and proposed solution (found e.g. at http://bjango.com/mac/skala/):


Image


Do you think there's any use of that for our needs?


Best regards,
Jarosław Staniek
• Qt Certified Specialist
KEXI - Open Source Visual DB Apps Builder
• Request a feature or fix for KEXI here
May I help you? Please mention your app's version and OS when asking for help
louis94
Registered Member
Posts
99
Karma
1
OS

Re: Should guide lines be 2px wide?

Wed Dec 31, 2014 2:01 pm
Hello,

Let's try to guess where snapping occurs in both situations.
  • First, the 1px case. I would say snapping has 50% chances to occur on the left, 50% on the right.
  • In the 2px case, things get a bit more complicated. Both sides (right and left) are symmetric and so should get the same probability. The center seems a bit more logical, so its probability should be higher. I'd say the chances are 25-50-25.
I'm not more confident in the two-pixels case. I still have 50% chances of being wrong.

There are some other factors to take into account:
Hidden content
UI should hide as few content as possible.
Interaction with selected objects
We should keep in mind that guides will interact with handles drawn around objects. When snapped, drawing them side by side is confusing (has does snapping worked?) and looks bad.

The Gimp uses two lines separated by 1px. Inkscape uses 1px lines. Photoshop seems to use 2px dashed lines (I don't have it, so I can't check) for user-defined guides, and 1px solid lines for others.

Louis
User avatar
alake
Registered Member
Posts
591
Karma
3
OS

Re: Should guide lines be 2px wide?

Wed Dec 31, 2014 4:25 pm
I think grid and guidelines are conceptually defined as the boundary of a line of pixels. They conceptually have no thickness, and take up no space on the canvas. Therefore snapped elements are always aligned with the pixel boundary. That's how it works in the graphics tools I've used. If a tool is snapping to the middle a pixel instead of the boundary then it's just doing it wrong, at least IMHO.

As for how the grid/guide is actually rendered, for a 1px rendering it should just use follow the same rules as the pixel coordinate system when the zoom level is <= 100%. Zooming in > 100% usually resolves any uncertainty about the boundary represented by the rendering.

Hope this helps! :-)


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]