Does TextObject uses palette by default?
Posted: Thu Sep 29, 2022 12:25 pm
As trying to make a hardware brush with text I found that I need to RemoveBrushPalette() from the brush before CopyBrush() to hardware brush if the source brush comes from a textobject. 
Here is the code that tells it more understandable:
Without the RemoveBrushPalette() Hollywood drops the message:
> test.hws:9: Wrong usage/parameters for this command!
> Read the documentation!
If CopyBrush() could handle this automatically, that would be a bit cleaner I think.
Bye
Here is the code that tells it more understandable:
Code: Select all
@REQUIRE "glgalore"
CreateTextObject(1,"Hollywood",{align=#RIGHT,color=#GRAY})
ConvertToBrush(#TEXTOBJECT,1,1)
RemoveBrushPalette(1)
BeginDoubleBuffer(True)
CopyBrush(1,2,{hardware=True})
DisplayBrush(2,100,10)
DebugPrint(GetAttribute(#BRUSH,2,#ATTRHARDWARE))
Flip()
WaitLeftMouse
> test.hws:9: Wrong usage/parameters for this command!
> Read the documentation!
If CopyBrush() could handle this automatically, that would be a bit cleaner I think.
Bye