@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
Transparent app's background
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Transparent app's background
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,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
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})
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Transparent app's background
PathToBrush() can convert multiple paths to a brush so you need to provide a table of tables. Like this:
There's also an example in the doc
Code: Select all
PathToBrush(1, {{ID=1, COLOR=#YELLOW}})
Re: Transparent app's background
OMG... Because there is only one path i assumed, that only one pair of brackets is required but i was wrong...airsoftsoftwair wrote:PathToBrush() can convert multiple paths to a brush so you need to provide a table of tables. Like this:
There's also an example in the docCode: Select all
PathToBrush(1, {{ID=1, COLOR=#YELLOW}})
Thank you, works perfectly now ; )
Re: Transparent app's background
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:
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)
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Transparent app's background
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
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.
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Transparent app's background
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.