Page 1 of 1

Graphic garbage with Hollywood V6.0

Posted: Thu Mar 12, 2015 1:50 am
by evil
Hello
My project (ArtBase) Creates several fields, which display cells of an CSV-table.
Each field consists of several layers (content, backdrop, border, header, headerbackdrop)
When I open a projectfile, everything looks correct.
Image

When I open it (or any other one) again, the fields arent drawn correctly.
Image

When looking at the second image the border seems to be distored.
Also the black backdrop of the fields and their contents seems to be drawn at the wrong coordinates.

Some technical background:
The border is an own layer.
I created a brush and did all painting directly to this brush (using box and arc functions).
The (black gradiented) backdrop of the fields is an own layer,too. It seems to be drawn some pixels to far top/right.
The same for the contents of the fields.

With Hollywood V5.3 I did not have the problems.
Starting older backups of my script have the same problem under V6.0

In the history I found some things about layers, which changed in V6.0. Maybe this causes the problem???

Before reopening the project, all variablles will be deleted and layers freed.


As the code of ArtBase is about 250k and I (after about 10 hours of verifying code...) absolutely do not find the problem. I even do not know, where to search for it. Can anyone give me a hint, what could cause this problem???

Best regares

George

Re: Graphic garbage with Hollywood V6.0

Posted: Thu Mar 12, 2015 9:07 pm
by airsoftsoftwair
Are you using SelectAlphaChannel() in your code?

Re: Graphic garbage with Hollywood V6.0

Posted: Thu Mar 12, 2015 11:13 pm
by evil
Yes, permanently...

Re: Graphic garbage with Hollywood V6.0

Posted: Fri Mar 13, 2015 5:15 pm
by airsoftsoftwair
Ok, then it could be related to a recently discovered bug in SelectAlphaChannel(). Try to replace all calls to SelectAlphaChannel() with this function which works around the bug:

Code: Select all

Function p_FixedSelectAlphaChannel(id, type, frame)

   If IsNil(__tmpbrush) Then __tmpbrush = CreateBrush(Nil, 1, 1)

   ; calibrate offscreen renderer
   SelectBrush(__tmpbrush, #SELMODE_COMBO, 0)
   EndSelect

   ; run SelectAlphaChannel()
   If IsNil(frame) = False
     SelectAlphaChannel(id, type, frame) 
   ElseIf IsNil(type) = False 
     SelectAlphaChannel(id, type)
   Else  
     SelectAlphaChannel(id)
   EndIf	   
EndFunction
Maybe this fixes the problem...

Re: Graphic garbage with Hollywood V6.0

Posted: Sun Mar 15, 2015 12:03 am
by evil
It does not help...
Seems the problem is somewhere else...
The script has the sameproblems with your code...

But when I disable alphachannels, the garbage still occurs, but not as worse...


But:
If alphachannel is disabled, and I do not use a color or gradient for field-backdrops or field-borders, but use pictures or textures instead, the problem seems to be gone....
Maybe the problem is somewhere with SetFillStyle(#Fillgradient...)

In ArtBase, I can switch between viewing- and configmode.

It doesnt matter,if I reload a project or switch to Configmode. In both cases, the garbage will be there.
Only when I open a projedt for the first time, everything is displayed correctly...

On the other hand:
In Configmode, every field gets an addidtional Layer, which shows a border (just like workbenchwindowborders) to move and resize the fields.
The border can be switched on/off. When it is switched on, everything will be displayed correct again. Has it been switched off (before entering the config-mode), the display gets incorrect after switching to configmode.

After finding that out, I thought, It could be the result in wrong layer-numbering (a project with 10 fields hasabout 70 layers...), but I cannot find a bug there....

After all, most surprisingly to me is, that the display is correct after opening a project the first time....


Here a snapshot of artBase, after opening the project for the second time. Alphachannels are disabled.
The strange corners are gone, but the fieldbackdrops seem to be moved about 10 pixels to left and up.
Only field with textures are displayed correctly.
I used your script for selectalphachannel()

Image
Any other hint???

Re: Graphic garbage with Hollywood V6.0

Posted: Mon Mar 16, 2015 3:56 pm
by airsoftsoftwair
Any other hint???
Unfortunately, no.... you have to break it down and compare small bits of code between 5.3 and 6.0 to see where the problem is. I'm afraid that's the only way to go here...

Re: Graphic garbage with Hollywood V6.0

Posted: Mon Mar 16, 2015 11:53 pm
by evil
Yes, I think so, too.. And thats what I am doing since I installed Hollywood V6.

Best regards

George

Re: Graphic garbage with Hollywood V6.0

Posted: Tue Mar 17, 2015 11:41 pm
by evil
Got it.... Just a missing Setfillstyle(#FILLNONE)


Thanks and best regards!

George