2012年3月10日 星期六

Filter4Cam 學習之 Graphics 小記

since: 2012/03/02
update: 2012/03/02

reference: Developing iPad Applications for Visualization and Insight
                    => Lecture 12: Graphics

   1. Graphics Stack

   2. Blitting
        blit = Bit-Block Image Transfer (位元區塊影像轉換)

   3. CoreGraphics is a Vector graphics API
       Coordinate system:


   4. CoreGraphics is a CoreFoundation API
       a. CoreFoundation takes the ideas of Objective-C and applies them to C
           (p.s. CoreFoundation is a C API; Foundation is a Objective-C API )

       b. Memory management:
          (1). CFRetain / CFRelease
          (2). Methods with Create in the name: you need to release
          (3). Methods with Get in the name: same semantics as autorelease

          (4). Many CF types have their own free.
                 For example, CGPathRelease instead of CFRelease.
                 You can use either one. (使用 CGPathRelease, 讓程式碼更清楚)
              (唯一的差異: 將 nill 傳入 CFRelease 會 crash 掉; CGPathRelease 則不會)

       c. Toll-Free Bridging:
          (1). Any CF object type can be cast to id
          (2). NSArray* and CFArrayRef are compatible
          (3). Same with NSDictionary* and CFDictionaryRef


沒有留言:

張貼留言

注意:只有此網誌的成員可以留言。