Page 2 of 2

Re: Transparent app's background

Posted: Thu Feb 08, 2018 8:55 pm
by airsoftsoftwair
@ferin:
Concerning the vector path stuff, please post the code that doesn't work as text because I can't be bothered to type text from screenshots. I need to be able to copy & paste :)

Re: Transparent app's background

Posted: Thu Feb 08, 2018 10:00 pm
by Ferin
airsoftsoftwair wrote: Concerning the vector path stuff, please post the code that doesn't work as text because I can't be bothered to type text from screenshots. I need to be able to copy & paste :)
Hmmm, i can't reproduce problem with drawing single straight line, it works. Really weird, until you've asked for code, it didn't. I remember i had similar issue with other things,
and after some time without particular reason it started to work. Maybe it's related to my noobiness and/or AmigaOS is playing with me. I apologise for confusion.

Despite that PathToBrush still does not want to convert one path to brush, keeps saying that table needs at least one item.

Code: Select all

StartPath(1)
MoveTo(1, 0, 0)
LineTo(1, 100, 100)
LineTo(1, -100, 100)
LineTo(1, -100, -100)
LineTo(1, 100, -100)
DrawPath(1, 250, 250, #RED) 
ClosePath(1)

PathToBrush(1, {ID=1, COLOR=#YELLOW})

Re: Transparent app's background

Posted: Fri Feb 09, 2018 9:16 pm
by airsoftsoftwair
PathToBrush() can convert multiple paths to a brush so you need to provide a table of tables. Like this:

Code: Select all

PathToBrush(1, {{ID=1, COLOR=#YELLOW}})
There's also an example in the doc ;)

Re: Transparent app's background

Posted: Fri Feb 09, 2018 9:37 pm
by Ferin
airsoftsoftwair wrote:PathToBrush() can convert multiple paths to a brush so you need to provide a table of tables. Like this:

Code: Select all

PathToBrush(1, {{ID=1, COLOR=#YELLOW}})
There's also an example in the doc ;)
OMG... Because there is only one path i assumed, that only one pair of brackets is required but i was wrong...
Thank you, works perfectly now ; )

Re: Transparent app's background

Posted: Mon Feb 12, 2018 10:09 pm
by Ferin
Ok, there is a problem with single LineTo() command. I've investigated a bit and that's what i've found.
When drawing Single Line with FillStyle(#FILLCOLOR) and SetFormStyle(#ANTIALIAS) enabled line will not be drawn.
But it's enough to chenge FILLCOLOR to FILLNONE with ANTIALIAS enabled or disable ANTIALIAS when FILLCOLOR is
in action and line wil be visible. In code below example with line invisible:

Code: Select all

EnableLayers()
;SetFillStyle(#FILLNONE,1)
SetFillStyle(#FILLCOLOR)
SetFormStyle(#ANTIALIAS)

StartPath(1)
MoveTo(1, 0, 0)
LineTo(1, -100, -100)
DrawPath(1, 250, 250, #RED) 
ClosePath(1)

Re: Transparent app's background

Posted: Tue Feb 13, 2018 5:52 pm
by airsoftsoftwair
I don't think that's a bug because if you're only drawing a single line there's nothing to fill so using #FILLCOLOR is the wrong draw mode here. You should use #FILLNONE in that case. #FILLCOLOR is for filling shapes, #FILLNONE for drawing lines and outlines.

Re: Transparent app's background

Posted: Tue Feb 13, 2018 7:51 pm
by Ferin
I don't know if that's a bug or a feature but how antialias is related to it? Because it seems that it plays mine role in disappearing of lines.

Re: Transparent app's background

Posted: Tue Feb 13, 2018 7:56 pm
by airsoftsoftwair
It's undefined behaviour. #FILLCOLOR should only be used if there is something to fill which is clearly not the case when there's just a single line.