[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-Toolbox] BitMapToRegion & 'cicn'



Kevin Reid writes 15/9/99:

>[ A copy of this message has been posted to the newsgroup ]
>[     comp.sys.mac.programmer.help                        ]

Any help?

>I am trying to create a region out of the mask of a 'cicn' resource.
>
>Am I doing something wrong in this code, or is MacPerl's definition of a
>CIconHandle broken?

With a minor change to the CopyBits() statements, 'iconBMap' and 'iconMask'
are drawn to the window as expected, so it would seem the handle returned
by GetCIcon() is healthy.

  CopyBits($icon->iconBMap, GetPort->portBits, ltwh(0,0,32,32), $bm1r, srcCopy);
  CopyBits($icon->iconMask, GetPort->portBits, ltwh(0,0,32,32), $bm2r, srcCopy);

Whatever 'cicn' icon resource might be used however, PaintRgn($rgn) always
'paints' the _same_ (unrelated) pattern. I am inclined to the view
therefore that maybe BitMapToRegion() is broken. (?)

I can't see anything wrong with the code, but I just wonder a little how
BitMapToRegion() is _supposed_ to be used. IM doesn't shed much light on
the matter.

Alan Fry




==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-toolbox-request@macperl.org