Page 1 of 1

Bug with Line Thickness and Tint

Posted: Sun Sep 24, 2017 8:42 am
by PEB
The following code works as expected:

Code: Select all

EnableLayers()
SetFillStyle(#FILLNONE, 1)
Box(10, 10, 50, 50, #WHITE, {Name="PaintLayer", TintColor=#BLUE, Tint=200})
However, if the line thickness is set to anything but 1, then the Tint is ignored.

Code: Select all

EnableLayers()
SetFillStyle(#FILLNONE, 5)
Box(10, 10, 50, 50, #WHITE, {Name="PaintLayer", TintColor=#BLUE, Tint=200})

Re: Bug with Line Thickness and Tint

Posted: Mon Sep 25, 2017 2:03 am
by PEB
Here's a bit more information:

The same behavior can be observed in #VECTORPATH layers.

Code: Select all

EnableLayers()
SetFillStyle(#FILLNONE, 10)
StartPath(1)
AddBoxToPath(1, 0, 0, 100, 100)
DrawPath(1, #CENTER, #CENTER, #WHITE, {TintColor=#BLUE, Tint=100})
Also this problem only shows up when layers are enabled.

Re: Bug with Line Thickness and Tint

Posted: Wed Sep 27, 2017 7:37 pm
by airsoftsoftwair
That's not a bug, but a feature. When layers are enabled, line thicknesses greater than 1 will automatically be mapped to a layer border. The tint filter, however, applies to the main layer only, not its border, which is why you don't see any tinting. You can try to change the layer border color, though, e.g.

Code: Select all

SetLayerStyle(1, {BorderColor = #BLUE})
That should do the trick.