• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [slightly OT] Bitmaps for controls
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [slightly OT] Bitmaps for controls


  • Subject: Re: [slightly OT] Bitmaps for controls
  • From: Alberto Ricci <email@hidden>
  • Date: Wed, 16 Oct 2002 14:18:17 +0200

However, my efforts to copy the PixelMap and then dispose the graphics world results in weird graphics and/or crashes on subsequent calls to CopyBits.

Yeah, if you dispose of the GWorld your pixmap becomes invalid. That's because the pixmap simply points to data in your GWorld storage. By the way, remember to bracket every access to the pixmap's data with LockPixels() (making sure it returns true) and UnlockPixels().

And should you end up using Quartz 2D, remember that if you use CGDataProviderCreateWithData in order to get a CG data provider for your offscreen world, you need to keep pixels locked and the GWorld alive throughout the life of the CGDataProviderRef.

There is a big advantage to using Quartz 2D in AudioUnit UIs. If you have knobs, you can just have a single image for the knob indicator and then apply a rotation matrix before drawing the knob in a certain position. And if you want the shadow, simply overlay a black image with an appropriate alpha channel.

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

References: 
 >[OT] Bitmaps for controls (From: Art Gillespie <email@hidden>)

  • Prev by Date: Re: Getting node class data
  • Next by Date: Re: [OT] Bitmaps for controls
  • Previous by thread: AudioConverter problems...
  • Next by thread: Re: AudioConverter problems...
  • Index(es):
    • Date
    • Thread