I have a problem using transparencies in image-class
Here some code-snippets:
First the xml-file:
Code: Select all
<?xml version="1.0" encoding="iso-8859-1"?>
<application id="MAIN" base="TEST">
<window open="1" id="DATA" MUIID="DATA" notify="closerequest">
<vgroup>
<image id="h_preview" source="BRUSH: 10004"/>
<slider min="0" notify="level" max="255" level="0" id="trans"/>
</vgroup>
</window>
</application>
Code: Select all
@REQUIRE "MUIRoyale"
@APPTITLE "ArtBase"
@APPVERSION "$VER: Artbase 0.5 (30.03.13)"
@APPCOPYRIGHT "©2014, Jörg Renkert"
@APPAUTHOR "Jörg Renkert"
@APPDESCRIPTION "ArtBase"
;Create Brush
Function p_display(tt)
CreateBrush (10004,300,100)
SelectBrush(10004) Displaybgpicpart (1,170,190,300,100,0,0) EndSelect()
CreateBrush (2,200,50,$ff00ff)
SelectAlphaChannel(10004) SetAlphaIntensity(tt) DisplayBrush(2,0,0) EndSelect
SelectBrush(10004) DisplayBrush(2,0,0) EndSelect
SelectAlphaChannel(10004) SetAlphaIntensity(255) Textout(0,0,tt) EndSelect
SelectBrush(10004) Textout(0,0,tt) EndSelect
EndFunction
;Chnge transparency
Function p_change()
p_display(mui.get("trans","level"))
mui.set("h_preview","BRUSH",10004)
cls() Displaybrush (10004,0,0)
EndFunction
SetFontColor ($00ffff) SetFont(#SANS,40) SetFontStyle (#AntiAlias)
p_display()
mui.CreateGui(FileToString("XML"))
Installeventhandler ({MUIRoyale=p_change})
repeat
waitevent()
forever
On OS4 the brush in the mui-window-image-class looks strange.
If the slider is 0, the brush is simply white. No Transparency here.
If the slider is moved to the right, the brush fades from white to pink. But no transparency here...
Is this a bug??
Best regards
George