Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: creating image for a text drag



On 28 Nov 2003, at 23:03, Mike Kluev wrote:

On 27/11/2003 21:29, Dario Accornero <email@hidden> wrote:

On 27 Nov 2003, at 16:12, Alexander Cohen wrote:

in an app, i need to create a drag image for some text. I create the
image, then i need to create the region for that text so only the text
is dragged, not the whole background. Just like OSX drags text. How
can i create the drag region so only the text is dragged and not the
background?

If you're using CoreGraphics, you can create a bitmap context, fill it
with transparency, then draw your text and create a CGImage from your
context. This way you don't have to fiddle with regions. There might
be other techniques using Quickdraw.

Namely BitMapToRegion.

Although I wouldn't recommend either of these. Just create an opaque
image with text and use a transparent drag that drag manager supports.

Won't that still show, albeit with a light transparency, the GWorld's background colour?

Dario
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: creating image for a text drag (From: Mike Kluev <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.