Transparent app's background

Find quick help here to get you started with Hollywood

Re: Transparent app's background

Postby airsoftsoftwair » Thu Feb 08, 2018 9:55 pm

@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 :)
User avatar
airsoftsoftwair
 
Posts: 2445
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: Transparent app's background

Postby Ferin » Thu Feb 08, 2018 11:00 pm

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})
Ferin
 
Posts: 18
Joined: Fri May 26, 2017 12:41 am

Re: Transparent app's background

Postby airsoftsoftwair » Fri Feb 09, 2018 10:16 pm

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 ;)
User avatar
airsoftsoftwair
 
Posts: 2445
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: Transparent app's background

Postby Ferin » Fri Feb 09, 2018 10:37 pm

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 ; )
Ferin
 
Posts: 18
Joined: Fri May 26, 2017 12:41 am

Re: Transparent app's background

Postby Ferin » Mon Feb 12, 2018 11:09 pm

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)
Ferin
 
Posts: 18
Joined: Fri May 26, 2017 12:41 am

Re: Transparent app's background

Postby airsoftsoftwair » Tue Feb 13, 2018 6:52 pm

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.
User avatar
airsoftsoftwair
 
Posts: 2445
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: Transparent app's background

Postby Ferin » Tue Feb 13, 2018 8:51 pm

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.
Ferin
 
Posts: 18
Joined: Fri May 26, 2017 12:41 am

Re: Transparent app's background

Postby airsoftsoftwair » Tue Feb 13, 2018 8:56 pm

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.
User avatar
airsoftsoftwair
 
Posts: 2445
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Previous

Return to Newbie questions

Who is online

Users browsing this forum: No registered users and 1 guest