• 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: Drawing into a NSQuickDrawView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing into a NSQuickDrawView


  • Subject: Re: Drawing into a NSQuickDrawView
  • From: "Rafael K. Kobylinski" <email@hidden>
  • Date: Sat, 22 Sep 2001 19:50:56 +0200

At 12:01 Uhr +0200 22.09.2001, Rafael K. Kobylinski wrote:
If I use a buffered window, the results of my drawing appear continously in the view. It appears that using the port I draw directly to the screen, because I get flicker and I need to do my own double buffering to get rid of it.

well, I figured out this one, I think: I was in fact really drawing to the windows offscreen buffer and the reason why it appeared continuously was because I used the Image Compression Manager which probably called QDFlushPortBuffer() after each image.


If I use a non-buffered window, I get no automatic redrawing at all. The view only redraws its content if places something before it, thus forcing a redraw. So obiously in this case I cannot draw to the screen.


This is still a puzzle to me. If I create a non retained window - shouldn't the drawing commands appear on the screen even without calling QDFlushPortBuffer()?

Also, if I try to use QuickDraws CopyBits function to copy the pixel map to the destination port, I always draw a bit off the window - if I use QuickTime's decompress sequence things work fine (both set to the same port as the destination).

Using LockPortBits and QDFlushPortBuffer solved this issue.

The follwing document was helpful:
http://developer.apple.com/techpubs/macosx/Carbon/CarbonPortingTools/carbon_porting_guide/cpg_prepstruct/Additional_Porting_Issues.html
--
Rafael K. Kobylinski Email: email@hidden
Institut f|r Informatik Tel. : ++ 49 89 289 22391
Technische Universitdt M|nchen Cell.: ++ 49 177 7 495020


References: 
 >Drawing into a NSQuickDrawView (From: "Rafael K. Kobylinski" <email@hidden>)

  • Prev by Date: Questions about NSBitmapImageRep [Follow Up]
  • Next by Date: Re: static typing (Learning Cocoa Chapter 13)
  • Previous by thread: Drawing into a NSQuickDrawView
  • Next by thread: NSDate & NSCalendarDate
  • Index(es):
    • Date
    • Thread