Jump To:
Leopard Technical Q&As: Graphics & Imaging
Cocoa provides classes for custom drawing based on Quartz graphics, and utility functions for common graphics tasks such as copying and drawing bitmap data. To go beyond what Cocoa provides, developers can use the graphics and imaging frameworks in Mac OS X. Cocoa applications have access to a wide variety of graphics technologies including Quartz 2D, Quartz Services, OpenGL, QuickTime, and the Mac OS X printing system.

View all Cocoa Technical Q&As.
Document Descriptions
On Off

Sorted by
Sort by
Animating the frame of a CALayer. (HTML)
QA1620: Explains how the frame property of a layer interacts with animations.
Availability of Quartz Composer Patches in Web Kit (HTML)
QA1505: Details which Quartz Composer patches are available in Web Kit
CGBitmapContextCreate Supported Color Spaces (HTML)
QA1037: Lists the color space and alpha info combinations currently supported by CGBitmapContextCreate.
CGContextAddLineToPoint, CGContextAddCurveToPoint, et. al. (HTML)
QA1049: Explains why the CGContextAddXYZ APIs don't draw anything immediately.
CGContextClosePath (HTML)
QA1046: Explains when you should call CGContextClosePath.
CGImageRef contents are immutable (HTML) (日本語 HTML)
QA1276: Explains that CGImageRef contents are considered immutable once created.
Core Animation properties and Reference Counting (HTML)
QA1565: Describes a discrepancy between the property declarations in Core Animation and the actual behavior.
Drawing a Path Multiple Times (HTML)
QA1047: Explains that path drawing operations consume the path.
Driving OpenGL Rendering Loops (HTML)
QA1385: Using Core Video display links (CVDisplayLink) or Cocoa timers (NSTimer) to drive an OpenGL rendering loop
Finding an NSView's current magnification. (HTML)
QA1346: How to discover the current magnification (zoom level) of any NSView.
Getting the pixel data from a CGImage object (HTML)
QA1509: Describes how to access the pixel data of a CGImage object
How can I optimize a Quartz Composer composition depending on the hardware it runs on? (HTML)
QA1433: Explains how to design compositions that adapt to the hardware limitations.
How can I programmatically determine the DPI of the current video mode? (HTML) (日本語 HTML)
QA1217: Describes how to compute the DPI for a given display in a given mode using Core Graphics.
How do I determine how much VRAM is available on my video card? (HTML)
QA1168: Using Core Graphics and IOKit to find the physical size of VRAM on installed hardware.
How do I get the hexadecimal value of an NSColor object? (HTML)
QA1576: Describes how to convert an NSColor object to its Hexadecimal value.
How do I tell if a particular display is being hardware accelerated by Quartz Extreme? (HTML) (日本語 HTML)
QA1218: Describes how to use CGDisplayUsesOpenGLAcceleration to see if a display is accelerated or not.
How to measure CG text (HTML)
QA1051: Explains how to measure Core Graphics text.
Is ColorSync thread safe? (HTML) (日本語 HTML)
QA1261: Discusses ColorSync thread-safety issues.
NSOpenGLView redraw problems after a window is closed and re-opened. (HTML)
QA1353: Workaround for NSOpenGLView failure to draw after its window is closed and re-opened.
QTKit Capture - Specifying Media Compression Settings (HTML)
QA1586: Describes how to configure a file output object to save compressed captured media.
Quartz 2D Interpolation (HTML) (日本語 HTML)
QA1186: Explains how to control Quartz 2D's image interpolation.
Quartz 2D Thread Safety (HTML) (日本語 HTML)
QA1238: Explains the thread-safety issues for the Quartz 2D API.
Requirements for Quartz GL (HTML)
QA1536: Describes the requirements for enabling Quartz GL.
Saving the current Core Graphics Path (HTML)
QA1056: Explains that the Core Graphics save and restore GState APIs do not affect the path.
Setting the ColorSync profile for a NSBitmapImageRep object (HTML)
QA1369: Setting the ColorSync profile for a NSBitmapImageRep object
Shearing a Coordinate Space with NSAffineTransform (HTML) (日本語 HTML)
QA1332: Describes a simple way to shear coordinate spaces by adding a few methods to the NSAffineTransform class.
Turning Off Core Graphics Clipping (HTML)
QA1050: Explains how to clear the clipping path for a CGContext.
Unexpected CG state changes (HTML)
QA1045: Explains why the Core Graphics drawing state sometimes changes for no apparent reason.
Using Interface Builder's NSOpenGLView or Custom View objects for an OpenGL application (HTML)
QA1167: Describes usage cases for both NSOpenGLViews and Custom Views for Cocoa OpenGL applications
Using UTIs to Identify Image Files (HTML)
QA1518: Explains how to use Uniform Type Identifiers to identify what files can be opened at images.