Inner position for vector strokes

Here everybody can post his problems with PhotoLine
Benutzeravatar
ono
Mitglied
Beiträge: 148
Registriert: Mi 21 Jul 2010 23:50
Wohnort: Baden, Switzerland

Inner position for vector strokes

Beitrag von ono »

Sorry for making another thread, and sorry if this one is trivial, but I don't want to OT in others.

I wish PhotoLine had possibility to specify stroke position, like inner, outer, middle, or at least to have inner stroke (maybe specified by negative stroke size). Otherwise it is just a PITA when trying to have pixel aligned stuff with 1px stroke and vectors, as normally it gets blurry, so I need to move shape with 0.5px, but then when I got pixel snapping everything breaks when I move vector point when tuning the shape.

Of course I could use Inner Outline fx as an alternative here, but I work a lot with Pixel Mode on and off, so I really avoid enabling effects as they "stick" Pixel Mode on the layers, so it is no good.

I have:
Bild
I wish I had without moving 0.5px:
Bild

Cheers,
Adam Strzelecki | nanoant.com | CBCT/PET tomography engineer
bkh
Beta Tester
Beiträge: 3687
Registriert: Do 26 Nov 2009 22:59

Re: Inner position for vector strokes

Beitrag von bkh »

"Inside" and "Outside" aren't good categories for Bézier curves (consider the figure 8). When you use the non-zero winding number fill mode, there are even lines which are completely "inside". Of course, it would be possilbe to handle special vector shapes separately, but personally I prefer the approach where everything is just the same kind of vector graphics.

For me, the best way of dealing with the problem is to set the grid offset to 0.5 px both horizontally and vertically. As in many other places in PL, you can't see the value 0.5 in the preferences, but it works! In addition, or alternatively, you can place guides through the centers of pixels (and their precise positions will even show up in the panel).

The other option is to switch off anitaliasing for rectangles in the Attributes Panel. This will make pixels appear to the top and to the left of the curve. But you probably don't want this option for arbitrary Bézier paths.

Cheers

Burkhard.
Benutzeravatar
ono
Mitglied
Beiträge: 148
Registriert: Mi 21 Jul 2010 23:50
Wohnort: Baden, Switzerland

Re: Inner position for vector strokes

Beitrag von ono »

bkh hat geschrieben:"Inside" and "Outside" aren't good categories for Bézier curves (consider the figure 8). When you use the non-zero winding number fill mode, there are even lines which are completely "inside". Of course, it would be possilbe to handle special vector shapes separately, but personally I prefer the approach where everything is just the same kind of vector graphics.
I can understand that. I didn't want to compare PL to Photoshop, but latest Photoshop CS6 has option to set stroke placement and default is inner stroke which is very nice when you do pixel perfect stuff out of vector shapes. Maybe I am only person that uses PhotoLine to do UI elements & icon design that's why I ask for fancy features. 8)
bkh hat geschrieben:For me, the best way of dealing with the problem is to set the grid offset to 0.5 px both horizontally and vertically. As in many other places in PL, you can't see the value 0.5 in the preferences, but it works! In addition, or alternatively, you can place guides through the centers of pixels (and their precise positions will even show up in the panel).
Thanks a lot for sharing this trick, you are a real PL power user. I think this can do really good job with 1px stroke, and aligning other shapes.
bkh hat geschrieben:The other option is to switch off anitaliasing for rectangles in the Attributes Panel. This will make pixels appear to the top and to the left of the curve. But you probably don't want this option for arbitrary Bézier paths.
I know this one, but it is no good, unless the shape is made only from vertical and horizontal lines, otherwise it is just ugly.
Adam Strzelecki | nanoant.com | CBCT/PET tomography engineer
bkh
Beta Tester
Beiträge: 3687
Registriert: Do 26 Nov 2009 22:59

Re: Inner position for vector strokes

Beitrag von bkh »

ono hat geschrieben:I can understand that. I didn't want to compare PL to Photoshop, but latest Photoshop CS6 has option to set stroke placement and default is inner stroke which is very nice when you do pixel perfect stuff out of vector shapes. Maybe I am only person that uses PhotoLine to do UI elements & icon design that's why I ask for fancy features. 8)
Actually, you can do this in PL with a little trick: create a virtual copy of your vector layer, and use the original vector layer as a layer mask for it. Then set the line width to 2x the required amount. (See attached sample file.) The impression is quite different if you have a curve which intersects itself, though. Continuous lines now seem to be broken.
line inside.png
line on border.png
The only downside is that you have to make adjustments in the layer mask. But you can even change the fill mode to nonzero winding number and observe that the inner lines are twice as thick – because they are inner on both sides. :mrgreen: If you have access to PS CS6, I'd be curious to know how they handle that case.
ono hat geschrieben:I think this can do really good job with 1px stroke, and aligning other shapes.
Glad to hear. Once I found out that PL could work with subpixel line widths, I discovered that subpixel units also worked elsewhere … It's a pity PL doesn't show its abilities in its user interface. If the grid offset had been displayed as 0.0 px instead of 0 px, you could have guessed that 0.5 px might also work.

Cheers

Burkhard.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
addison
Mitglied
Beiträge: 25
Registriert: Mi 23 Jun 2004 23:29
Wohnort: Flowood, Mississippi USA

Re: Inner position for vector strokes

Beitrag von addison »

ono hat geschrieben:Maybe I am only person that uses PhotoLine to do UI elements & icon design that's why I ask for fancy features. 8)
You are not alone -- I'm using PhotoLine more and more as my main design tool for web site development. I've also expressed my interest regarding more in-depth vector tools, as well as a few other things.