Le 13 sept. 11 à 16:27, Christian Schmitz a écrit:
> Am 13.09.2011 um 14:55 schrieb Arnaud Nicolet:
>
>> So, my code (method 1) currently does this, according to the steps
>> quoted above:
>> DisableScreenUpdatesMBS (disable updates)
>> Create the CGImage (draw)
>
> how do you draw?
Here's the draw method:
dim b As Integer
if not AlreadyInited then b=me.MakeTransparentMBS
dim p,q As Picture
dim x As Integer
dim y As Integer
p=DefaultPicture
q=MaskPicture
self.Width=p.Width
self.Height=p.Height
DisableScreenUpdatesMBS
Pict=CGCreateImageMBS(p,q)
AlreadyInited=True
'me.Refresh
self.InvalidateShadowMBS
EnableScreenUpdatesMBS
AlreadyInited is a property of type boolean, DefaultPicture and
MaskPicture are parameters of type picture and Pict is a CGImageMBS
property.
This method is called both in the open event of the window and in the
method to change the current picture.
This is the paint event:
dim c as CGContextMBS
if pict=nil then Return
c=self.CGContextMBS
c.ClearRect CGMakeRectMBS(0, 0, g.width, g.height)
c.drawPicture pict, CGMakeRectMBS(0, 0, pict.width, pict.height)
> Is this a window, an overlayWindowMBS, an OverlayMBS or a NSWindowMBS?
It's a plain RS window, with MacProcID 1104.
> And if you draw with CGContextMBS, there is a flush method you could
> use.
I draw with a CGContext only in the paint event, but I need to
invalidate in the other method (look at the commented "me.refresh"
line above, it's what I need to replace by flush), where the CGContext
object of the paint event doesn't exist (and doesn't make sense
outside of it).
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info