Hi,
I'm in troulble modifyng brushes. The intention is to have a brush, draw some graphic element on it and then have all saved in the brush.
My code is as follow:
SetClipRegion(1)
DisplayBrush(998,abx,aby)
SelectBrush(998)
Line(xact,yact,MouseX(),MouseY(),Forecolor,{ Thickness = Lineth})
EndSelect
; DisplayBrush(998,abx,aby)
SetClipRegion(0)
and does not work
Write pixels on a brushBrush
Re: Write pixels on a brushBrush
From that short example it's impossible to find out what's wrong. I recommend that you start with a simple example like this:
And then add step by step other features like clipping and mouse handling etc.
Code: Select all
CreateBrush(998, 200,200)
SelectBrush(998)
Line(50, 50, 100, 150, #RED,{ Thickness = 10})
EndSelect
DisplayBrush(998,0,0)
WaitLeftMouse()
Re: Write pixels on a brushBrush
Solved... code was corrected, however there is a diferent behaviour on mouse chordinates when retrieved absolute via MouseY() and Y and when used into a brush via Select. in this case the choordinate system is relative. Therefore from the mouseX and Y you need to detract the reference point X and Y of the brush.... Not one of my best explanations!