Jump To:
Leopard Reference Library: Carbon
Developers can use the graphics & imaging frameworks in Mac OS X to implement custom 2D, 3D, and multimedia graphics features in their Carbon applications. Developers 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 Graphics & Imaging Reference Library.
Document Descriptions
On Off
Display

Sorted by
Title
Sort by
Resource Type
Sort by
Date
2D Graphics Release Notes for Mac OS X v10.5 (HTML)
Describes the changes and issues related to Core Image and Quartz 2D in Mac OS X v10.5.
Release Notes 2008-04-08
AGL Changes for Mac OS X Leopard (v. 10.5) (HTML)
QA1523: This Q&A describes the new and deprecated APIs for Apple OpenGL (AGL)
Technical Q&As 2008-01-04
AGL Reference (HTML) (PDF)
Describes the Apple graphics library for Carbon applications that use OpenGL.
Reference 2007-10-31
aglClipBufferRect (HTML) (DMG) (ZIP)
Shows the use of clip regions and buffer rects in AGL.
Sample Code 2003-01-14
AGLSurfaceTexture (HTML) (DMG) (ZIP)
Example of render to texture/texture from surface using aglSurfaceTexture.
Sample Code 2003-07-07
Animation Overview (HTML) (PDF)
Describes the animation facilities provided by Mac OS X.
Guides 2008-10-15
Apple Game Sprockets Reference (HTML) (PDF)
Deprecated - Describes the programming interface defined by Game Sprockets. Replaced by Quartz Display Services.
Reference 2006-07-13
Application Services Reference Update (HTML) (PDF)
Summarizes the symbols added to the Application Services framework.
Release Notes 2007-07-18
ATSUI Reference (HTML) (PDF)
Describes the C API for rendering Unicode-encoded text with advanced typographic features.
Reference 2007-06-28
CalcCMask and SeedCFill in Carbon (HTML) (日本語 HTML)
QD62: Explains how to use CalcCMask and SeedCFill in Carbon even though Carbon doesn't support OpenPort.
Technical Q&As 2000-11-08
Carbon GLSnapshot (HTML) (DMG) (ZIP)
Demonstrates the use of OpenGL with Quicktime to capture OpenGL content.
Sample Code 2003-07-07
Carbon Resolution Independence Release Notes (HTML)
Release Notes 2005-04-29
CarbonQuartzComposer_TV (HTML) (DMG) (ZIP)
Demonstrates how to integrate Cocoa based QuartzComposer window into a Carbon based application
Sample Code 2006-10-02
CarbonQuartzDrawingWPrinting (HTML) (DMG) (ZIP)
Deprecated - Demonstrates mixing QuickDraw and Quartz 2D drawing both on screen and during printing.
Sample Code 2003-01-14
CarbonSketch (HTML) (DMG) (ZIP)
Core Graphics only example of a Sketch application implemented with HIToolbox. Shows 1x1-CGBitmapContext for hit-testing, printing.
Sample Code 2005-03-23
CGBitmapContextCreate Supported Color Spaces (HTML)
QA1037: Lists the color space and alpha info combinations currently supported by CGBitmapContextCreate.
Technical Q&As 2007-07-18
CGContext Bounds (HTML)
QA1048: Explains how to determine the bounds of a CGContext.
Technical Q&As 2001-07-02
CGContextAddLineToPoint, CGContextAddCurveToPoint, et. al. (HTML)
QA1049: Explains why the CGContextAddXYZ APIs don't draw anything immediately.
Technical Q&As 2001-07-02
CGContextClosePath (HTML)
QA1046: Explains when you should call CGContextClosePath.
Technical Q&As 2001-10-02
The CGDirectPalette API (HTML) (日本語 HTML)
TN2008: Provides a reference for the CGDirectPalette API on Mac OS X
Technical Notes 2000-11-08
CGImageProperties Reference (HTML) (PDF)
Describes property constants for source and destination images.
Reference 2007-10-31
CGImageRef contents are immutable (HTML) (日本語 HTML)
QA1276: Explains that CGImageRef contents are considered immutable once created.
Technical Q&As 2003-07-17
CGL Reference (HTML) (PDF)
Describes Apple's low level interface for OpenGL contexts.
Reference 2007-06-28
CIColorTracking (HTML) (DMG) (ZIP)
An Objective-C applicaton that implements a GPU-based technique to find the location of a uniquely colored object in a scene
Sample Code 2008-04-24
Coalesced Updates (HTML)
TN2133: How to achieve the maxium frame rate in your Mac OS X application
Technical Notes 2006-01-20
Color Management Overview (HTML) (PDF)
Introduces basic concepts and defines color spaces.
Guides 2005-07-07
Color Picker Manager Reference (HTML) (PDF)
Describes the C API used in Classic Mac OS to solicit color choices from users.
Reference 2007-07-02
ColorBars (HTML) (DMG) (ZIP)
Shows how to enumerate, select, capture, manipulate, draw to, and release displays using the CGDirectDisplay API.
Sample Code 2003-01-14
ColorSync Color Matching on Intel-based Macs (HTML)
QA1464: Describes special considerations for byte ordering when performing ColorSync color matching on Intel-based Macs
Technical Q&As 2006-03-16
ColorSync Manager Reference (HTML) (PDF)
Describes the C API for ColorSync, the platform-independent color management system in Mac OS X.
Reference 2005-06-04
ColorSyncDevices (HTML) (DMG) (ZIP)
Demonstrates how to use the new ColorSync Device Support APIs introduced with Mac OS X.
Sample Code 2003-01-14
ColorSyncDevices-Cocoa (HTML) (DMG) (ZIP)
Demonstrates how to use the new ColorSync Device Manager routines in the Cocoa environment.
Sample Code 2003-01-14
ComboBoxPrefs (HTML) (DMG) (ZIP)
Use CFPrefs to store URLs to images for use in a browser style combo box.
Sample Code 2005-10-04
Compression Sessions - Enabling muti-pass encoding (HTML)
QA1450: Describes how to enable multi-pass encoding when using ICM compression sessions.
Technical Q&As 2006-01-12
Context Sharing Tips (HTML) (日本語 HTML)
QA1248: How to correctly share OpenGL contexts and what the limits on this sharing are.
Technical Q&As 2005-02-07
Converting RGB Colors to a Palette Index (HTML)
Deprecated - QD21: Explains how to convert RGB colors into the palette index created by an application.
Technical Q&As 1995-09-15
Core Image Kernel Language Reference (HTML) (PDF)
Describes the symbols for writing image-processing kernels.
Reference 2008-06-09
Core Image Programming Guide (HTML) (PDF)
Provides an overview and explains how to use and create image filters and image units.
Guides 2008-06-09
Creating Gray Scaled Images > 8 bits (HTML) (日本語 HTML)
Deprecated - QD51: Shows how to create gray-scaled images at resolutions greater than 8 bits for display.
Technical Q&As 1997-11-17
CTMClip (HTML) (DMG) (ZIP)
Deprecated - Shows how to manipulate the Quartz 2D Current Transform Matrix (CTM) for image drawing with clipping.
Sample Code 2003-01-14
CTMDemo (HTML) (DMG) (ZIP)
Deprecated - Shows how to manipulate the Quartz 2D Current Transform Matrix (CTM) for image drawing without clipping.
Sample Code 2003-01-14
Current GDevice Dependencies (HTML) (日本語 HTML)
QA1115: Describes potential problems with creating windows or ports when the current GDevice isn't the main device.
Technical Q&As 2002-02-13
Debugging Graphics with QuartzDebug (HTML) (日本語 HTML)
QA1236: Explains how to use QuartzDebug to debug graphics issues.
Technical Q&As 2006-01-12
Display Manager Reference (HTML) (PDF)
Deprecated - Describes the C API for dynamically changing the arrangement and display modes of attached monitors. Replaced by Quartz Display Services.
Reference 2007-12-04
Drawing a Path Multiple Times (HTML)
QA1047: Explains that path drawing operations consume the path.
Technical Q&As 2001-07-02
Error -151 and NewGWorld (HTML)
Deprecated - QD18: Explains what the error code -151 means when in NewGWorld.
Technical Q&As 1995-09-15
Font Manager Reference (HTML) (PDF)
Describes the C API for QuickDraw-based font access and management.
Reference 2007-12-11
The Font Panel for Carbon API (HTML) (日本語 HTML)
TN2058: The API to display and interact with the Font Panel from Carbon applications on Mac OS X.
Technical Notes 2006-10-26
Fonts Panel Reference (HTML) (PDF)
Describes the C API for providing a Fonts window in a Carbon application.
Reference 2007-02-26
FullScreen (HTML) (DMG) (ZIP)
Shows how to use BeginFullScreen and EndFullScreen to enter and exit full-screen mode.
Sample Code 2003-01-14
GetPortBitMapForCopyBits (HTML) (日本語 HTML)
Deprecated - QD61: Describes the proper usage of GetPortBitMapForCopyBits.
Technical Q&As 2000-11-08
GetProcAdress and OpenGL Entry Points (HTML) (日本語 HTML)
QA1188: Technique for finding function pointers for OpenGL entry points in Cocoa and Carbon
Technical Q&As 2002-11-25
Getting the pixel data from a CGImage object (HTML)
QA1509: Describes how to access the pixel data of a CGImage object
Technical Q&As 2008-08-27
GLCarbon1ContextPbuffer (HTML) (DMG) (ZIP)
Demostrates using OpenGL pixel buffers with a single shared context.
Sample Code 2004-03-26
GLCarbonSharedPbuffer (HTML) (DMG) (ZIP)
Demostrates sharing a single OpenGL pixel buffer with multiple other contexts.
Sample Code 2004-03-26
GLUTSurfaceTexture (HTML) (DMG) (ZIP)
Example of using the new glutSurfaceTexture.
Sample Code 2004-03-26
GlyphaIVOld (HTML) (DMG) (ZIP)
Deprecated - A basic game implementation in the spirit of Joust meant as demonstation of Sprocket usage.
Sample Code 2003-10-14
grayishTextOr and Mac OS 8.5 (HTML) (日本語 HTML)
Deprecated - QD59: Explains why text drawn using TextMode(grayishTextOr) is never drawn; provides a workaround.
Technical Q&As 1998-12-07
HIGeometry Reference (HTML) (PDF)
Describes the C API that defines basic geometric objects for HIToolbox.
Reference 2007-06-11
HIShape Reference (HTML) (PDF)
Describes the Carbon API for manipulating HIShape objects.
Reference 2004-06-28
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.
Technical Q&As 2002-12-02
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.
Technical Q&As 2002-12-04
How do I use PMSessionGetGraphicsContext to get a CGContextRef? (HTML) (日本語 HTML)
Deprecated - QA1216: Describes how to use PMSessionSetDocumentFormatGeneration and PMSessionGetGraphicsContext to get a CGContextRef for printing.
Technical Q&As 2003-02-25
How do I use QuickDraw with CGDirectDisplay? (HTML)
QA1011: Explains how to draw to a CGDirectDisplay-captured display using QuickDraw.
Technical Q&As 2001-04-11
How to measure CG text (HTML)
QA1051: Explains how to measure Core Graphics text.
Technical Q&As 2007-08-02
HTML Rendering Library Reference (HTML) (PDF)
Deprecated - Describes the legacy C API for drawing HTML text and images in a window. Replaced by the Web Kit.
Reference 2006-07-13
Image Capture Applications Programming Guide (HTML) (PDF)
Describes the interaction between applications programs and image capture devices such as cameras and scanners.
Guides 2007-05-16
Image I/O Programming Guide (HTML) (PDF)
Explains how to read and write image data using the Image I/O framework.
Guides 2007-07-02
Image I/O Reference Collection (HTML) (PDF)
Describes the API for reading and writing image data.
Reference 2007-04-09
Image Unit Tutorial (HTML) (PDF)
Describes how to write image processing kernels and package them for distribution.
Guides 2009-05-06
Improving ATSUI Text Drawing Performance (HTML)
QA1027: Talks about one way of improving ATSUI text drawing performance.
Technical Q&As 2001-04-17
Incorrect Inside Macintosh Volume V documentation (HTML)
Deprecated - QD15: Identifies incorrect documentation in Inside Macintosh Volume V regarding the formats of PnPixPat and BkPixPat opcodes.
Technical Q&As 1995-09-15
Is ColorSync thread safe? (HTML) (日本語 HTML)
QA1261: Discusses ColorSync thread-safety issues.
Technical Q&As 2003-04-17
Mac OS X QuickDraw Performance (HTML) (日本語 HTML)
TN2051: Some of the trouble spots in the Mac OS X windowing system and how to avoid them.
Technical Notes 2003-02-13
MassiveImage (HTML) (DMG) (ZIP)
Shows how to use a CGDataProvider to save a very large image with Image IO
Sample Code 2007-09-27
Mode (HTML) (DMG) (ZIP)
Shows how to enumerate displays and list the available modes for each display.
Sample Code 2003-01-14
ModeWhacker (HTML) (DMG) (ZIP)
Shows how to enumerate, select, capture, manipulate, and release displays using the CGDirectDisplay API.
Sample Code 2003-01-14
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
Sample Code 2003-10-27
MouseTracking (HTML) (DMG) (ZIP)
Sample code used in the WWDC 2005 Hands-On session 215 "Moving from QD to Quartz"
Sample Code 2005-06-01
NewCCursor (HTML) (DMG) (ZIP)
Deprecated - Shows how to create a black and white 'CURS' and a color 'crsr' cursor resource by hand.
Sample Code 2003-01-14
OpenGL Extensions Guide (HTML)
Information about OpenGL functionality supported in Mac OS X.
Guides 2003-09-10
OpenGL Release Highlights - Mac OS X 10.3 Panther (HTML)
TN2131: Contains a list of bugs along with a short description on a release-by-release basis
Technical Notes 2005-02-04
Out of This GWorld (HTML) (DMG) (ZIP)
Deprecated - Demonstrates the use of offscreen GWorlds and palette animation to simulate animation.
Sample Code 2003-03-12
Palette and GWorld (HTML) (DMG) (ZIP)
Deprecated - Demonstrates the use of palette and color tables with GWorlds.
Sample Code 2003-10-10
Palette Manager Reference (HTML) (PDF)
Deprecated - Describes the legacy C API used to select colors for display devices limited to an 8-bit pixel depth.
Reference 2006-07-13
Parsing the PICT File Format (HTML) (日本語 HTML)
Deprecated - QD56: Explains where to find information on the PICT file format and warns against parsing a PICT file.
Technical Q&As 1998-02-10
PDF Kit Programming Guide (HTML) (PDF)
Introduces basic PDF concepts and describes how to use PDF Kit to display PDF documents in your application.
Guides 2007-12-11
Picture Utilities Reference (HTML) (PDF)
Deprecated - Describes the legacy C API for reading and modifying image data stored in PICT-formatted files. Replaced by Quartz2D.
Reference 2006-07-13
Play Video Sample (HTML) (DMG) (ZIP)
Deprecated - The sample makes use of the RequestVideo sample code API.
Sample Code 2003-01-14
Preserving embedded ICC profiles when using QuickTime Graphics Importer/Exporters (HTML) (日本語 HTML)
QA1145: Shows how to preserve the embedded ICC profile when using the QuickTime Graphics Importer/Exporter routines
Technical Q&As 2002-09-04
Problem Getting PICTS to Display in Correct Colors (HTML)
Deprecated - QD24: Using a custom color table to get PICTs to display with the right colors in an offscreen GWorld.
Technical Q&As 1995-09-15
Problem with PaintRgn on 256-color Screens (HTML)
Deprecated - QD23: PaintRgn with RGBForeColor and transfer mode addOver doesn't return color to original on 256-color-screens.
Technical Q&As 1995-09-15
Problems Creating a Mask for a Picture (HTML)
Deprecated - QD27: Demonstrates creating a mask where the mask is 0 for pure white pixels and 1 everywhere else.
Technical Q&As 1995-09-15
Problems recording CopyBits into a PICT on Mac OS X 10.2 (HTML) (日本語 HTML)
QA1189: Identifies a problem with CopyBits and PICT on Mac OS X 10.2 and gives a simple workaround.
Technical Q&As 2002-11-19
QDFlushPortBuffer (HTML) (日本語 HTML)
QD65: Describes a possible solution for window update problems under Carbon.
Technical Q&As 2000-11-08
QDSwapPort (HTML) (日本語 HTML)
QA1128: Explains when to use QDSwapPort.
Technical Q&As 2002-11-06
Quartz 2D Interpolation (HTML) (日本語 HTML)
QA1186: Explains how to control Quartz 2D's image interpolation.
Technical Q&As 2002-10-29
Quartz 2D Programming Guide (HTML) (PDF)
Explains how to use Quartz 2D. Includes illustrations and sample code.
Guides 2007-12-11
Quartz 2D Reference Collection (HTML) (PDF)
Describes the C API for the native two-dimensional drawing engine in Mac OS X.
Reference 2006-12-18
Quartz 2D Shadings (HTML) (DMG) (ZIP)
Shows how to use CGShading and CGGradient objects to draw simple gradients.
Sample Code 2007-08-31
Quartz 2D Thread Safety (HTML) (日本語 HTML)
QA1238: Explains the thread-safety issues for the Quartz 2D API.
Technical Q&As 2003-02-25
Quartz 2D Transformer (HTML) (DMG) (ZIP)
Shows how to use Quartz 2D to manipulate an image
Sample Code 2007-06-21
Quartz Composer Programming Guide (HTML) (PDF)
Describes how to used the framework to load, play, and control compositions.
Guides 2008-10-15
Quartz Display Services Programming Topics (HTML) (PDF)
Shows how to configure and control display hardware using Quartz Display Services.
Guides 2006-06-28
Quartz Display Services Reference (HTML) (PDF)
Describes the interface for configuring and controlling display hardware.
Reference 2008-11-19
Quartz Programming Guide for QuickDraw Developers (HTML) (PDF)
Provides strategies to help Carbon programmers replace QuickDraw code with Quartz.
Guides 2006-09-05
Quartz Window Services Reference (HTML)
Describes the interface for capturing the contents of a window.
Reference 2009-01-15
Quartz2DBasics (HTML) (DMG) (ZIP)
Carbon and Cocoa sample code demonstrating some basic usage of the Quartz 2D API
Sample Code 2006-09-11
QuartzLines (HTML) (DMG) (ZIP)
Drawing Lines using Quartz's CGPath & CGContextStrokeLineSegments functions.
Sample Code 2005-06-01
QuartzShapes (HTML) (DMG) (ZIP)
Example Quartz functions that implement equivalents to the QuickDraw PaintArc, FrameArc, PaintOval, FrameOval, PaintRect, and FrameRect
Sample Code 2005-03-08
QuickDraw Reference (HTML) (PDF)
Describes the C API for the legacy two-dimensional drawing engine in Mac OS. Replaced by Quartz 2D.
Reference 2007-06-29
QuickDraw Text Anti-Aliasing using Quartz 2D (HTML) (日本語 HTML)
QA1193: Describes APIs added to Mac OS X to allow applications to draw QD text using CG anti-aliasing.
Technical Q&As 2002-10-29
Requirements for Quartz GL (HTML)
QA1536: Describes the requirements for enabling Quartz GL.
Technical Q&As 2008-08-08
Resolution Independence Guidelines (HTML) (PDF)
Describes resolution independence and how to start updating applications to support high-resolution monitors.
Guides 2007-05-04
Resolution Independent UI Release Notes (HTML)
Release Notes 2005-04-29
SampleScannerApp (HTML) (DMG) (ZIP)
This project implements a simple client accessing an ICA scanning device.
Sample Code 2008-05-07
Saving the current Core Graphics Path (HTML)
QA1056: Explains that the Core Graphics save and restore GState APIs do not affect the path.
Technical Q&As 2001-10-02
Simple DrawSprocket (HTML) (DMG) (ZIP)
Deprecated - Simple use of DrawSprocket to set screen resolution and size.
Sample Code 2003-07-22
Son of Grab (HTML) (DMG) (ZIP)
Shows how to use the new CGWindow to get window images from the Window Server.
Sample Code 2007-11-01
Spooling in or out of CompressPicture or CompressImage (HTML)
Deprecated - QD17: Recommends alternatives to spooling the results of CompressPicture or CompressImage to or from disk.
Technical Q&As 1995-09-15
Supporting Printing in Your Carbon Application (HTML) (PDF)
Explains how to support printing in Carbon applications. Includes creating PDFs and porting from Mac OS 9.
Guides 2004-08-31
TE Over Background (HTML) (DMG) (ZIP)
Deprecated - A textEdit that shows old text editing over a colored background
Sample Code 2003-07-22
TextNameTool (HTML) (DMG) (ZIP)
A command line tool sample illustrating how to use various graphical facilities and services without a login.
Sample Code 2003-10-27
Tiger Developer Overview Series: Developing with Core Image (HTML)
Learn how Core Image can help you take your graphics development to the next level.
Articles 2005-03-09
TubeTest (HTML) (DMG) (ZIP)
Deprecated - The program is a simple demonstration of how to use the Palette Manager in a color program.
Sample Code 2003-03-12
Turning Off Core Graphics Clipping (HTML)
QA1050: Explains how to clear the clipping path for a CGContext.
Technical Q&As 2001-07-02
Understanding and Detecting OpenGL Functionality (HTML)
TN2080: Discusses OpenGL API design, and how to access the full power of hardware and software renderers.
Technical Notes 2003-12-29
Unexpected CG state changes (HTML)
QA1045: Explains why the Core Graphics drawing state sometimes changes for no apparent reason.
Technical Q&As 2001-07-02
Updating OpenGL Contexts (HTML) (日本語 HTML)
QA1209: When and why to update an OpenGL context in response to system and user actions.
Technical Q&As 2003-06-19
Using Clip Region and Buffer Rectangles with OpenGL Carbon (HTML) (日本語 HTML)
QA1222: Shows the basics of using buffer rectangles and clip regions with AGL.
Technical Q&As 2002-12-19
Using cmPathBased profile locations on Mac OS X (HTML) (日本語 HTML)
QA1203: Shows how to correctly specify cmPath-based profile locations on Mac OS X
Technical Q&As 2002-11-06
Using qd and QDGlobals (HTML) (日本語 HTML)
Deprecated - QD40: Why a sample program compiled with SC may give the link error: undefined entry qd. Provides a solution.
Technical Q&As 1996-02-09
Using Temporary Memory with OpenPicture (HTML)
Deprecated - QD20: Provides several techniques of causing OpenPicture to allocate temporary memory for a picture handle.
Technical Q&As 1996-02-01
vImage Reference Collection (HTML) (PDF)
Describes the C programming interface for high-performance image processing.
Reference 2007-07-12
Window Manager and EraseRect (HTML)
Deprecated - QD26: Why WindowManager causes a flicker using EraseRect and provides a solution for this problem.
Technical Q&As 1995-09-15
Working with Quartz Composer (HTML)
Learn to build a sample composition without having to write code.
Articles 2006-02-13