• 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: [OT] Bitmaps for controls
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OT] Bitmaps for controls


  • Subject: Re: [OT] Bitmaps for controls
  • From: Art Gillespie <email@hidden>
  • Date: Wed, 16 Oct 2002 07:34:14 -0400

Hi Urs,

I'm not using the offscreen graphics world for double-buffering but rather to get the PICT resource's PixMap... the only way I've found to blit an isolated segment of a picture to the screen is via CopyBits... there's no DrawPicture(pic, srcRect, destRect), only DrawPicture(pic, destRect) so the solution I came up with was to draw the entire picture into an appropriately sized offscreen graphics context and blit from the associated PixMap.

You'll notice in VSTGUI a class called CCashedPict (sic)... for Mac-only... I suspect that Yvan did something similar, though the header file doesn't give much hint as to the implementation.

Oh, and Quartz2D isn't an option if you have to maintain a commercial product line on 9... :(

Best,

Art
>>0xBA


On Wednesday, October 16, 2002, at 07:17 AM, Urs Heckmann wrote:

Hi Art,

as far as I can see, when you use the VSTGUI-approach, you don't need doublebuffering and no offscreen graphics world. In (standard) VSTGUI all bitmaps are always "final" and do not need compositing. (Even VU-meters can be drawn directly without flickering)

However, if you have something generic that needs to draw on a bitmap (envelopes the like), I have made quite some good experience with CG drawing (thanks to your help :-)

I don't know where I read it, but it is stated somewhere that Quartz will automatically take over the doublebuffering for you regardless if you use CG or QuickDraw. So it might be a wasted effort to draw in a GWorld first and then copy that to the windowport.

I think it is this way: Your controls draw driven by a draw-event, and after successful return the windowmanager will update the control's region. I don't doublebuffer and there's no flickering at all.

Cheers,

;) Urs

Am Mittwoch, 16.10.02, um 12:42 Uhr (Europe/Berlin) schrieb Art Gillespie:

Hi all,

For obvious reasons, I'm working on a VSTGUI drop-in replacement... when it comes to dealing with bitmaps I'm loading a PICT resource and drawing it into a offscreen graphics world, and then using CopyBits on the graphics world's PixelMap to get segments of the bitmap onto the screen.

Now, my question is this: is keeping the offscreen graphics world around the right way to cache the bitmap in Mac-Land? This is how I'm doing it now, and it works great, but it seems a bit heavyweight. 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.

If anyone can point me to 'best-practice' resources on this kind of low-level graphics asset management in QuickDraw I'd be much appreciative.

Thanks,

Art
>>0xBA
_______________________________________________
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.

  • Follow-Ups:
    • Re: [OT] Bitmaps for controls
      • From: Urs Heckmann <email@hidden>
References: 
 >Re: [OT] Bitmaps for controls (From: Urs Heckmann <email@hidden>)

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