Le 23 août 11 à 16:06, Christian Schmitz a écrit:

> Am 23.08.2011 um 15:35 schrieb Arnaud Nicolet:
>
>> Greetings,
>> I'm getting a crash with CGCreateImageMBS in Cocoa. Is there a
>> replacement?
>
> How about fixing it instead of replacing?

Well, the exact same code works fine on Carbon, so I thought it was  
not available in Cocoa.

>  dim p as new Picture(100,100,32)
>  dim i as CGImageMBS = CGCreateImageMBS(p)
>
> works for me. What are you doing differently?

I'm using this for the transparent window methods. Here's the crashing  
method:

Sub Init(DefaultPicture As Picture,DefaultMask As Picture)
   #if TargetMacOS then
     dim b As Integer

     b=me.MakeTransparentMBS

     dim x As Integer
     dim y As Integer

     Pict=CGCreateImageMBS(DefaultPicture,DefaultMask)
   #endif
End Sub

And here's how the window is built:
   dim i As Integer
   dim m,p As Picture
   dim w As Win1

   w=new Win1
   p=new Picture(400,400,32)
   p.RGBSurface.FloodFill(0,0,RGB(0,0,0))
   m=new Picture(400,400,32)
   m.Graphics.AntiAlias=False

   for i=0 to 255
     m.Graphics.ForeColor=RGB(255-i,255-i,255-i)
     m.Graphics.DrawOval i-400,i-400,800-(i*2),800-(i*2)
   next
   w.Init p,m

Any idea?
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to