iOS Guides | Samples

CoreGraphics Namespace

The CoreGraphics namespace provides access to a C-based low-level 2D graphics API.


This namespace contains a binding to the two-dimensional, bitmap and vector graphic APIs. To learn more about the capabilities of MonoTouch.CoreGraphics you can read Apple's Quartz 2D Programming Guide.

Many graphics use-cases can be addressed using higher-level APIs such as those provided in UIKit, GLKit, and SpriteKit. However, some Core Graphics classes such as CGLayer, CGContext, and CGImage are not uncommonly seen in general UI tasks. In such situations, the Core Graphics class will often have more flexibility in terms of lower-level manipulation but requires more attention from the developer in terms of resource and state management.


CGAffineTransform2D Affine transformation used to convert between coordinate spaces.
CGBitmapContextCGContext backed by an in-memory bitmap.
CGBitmapFlagsBitmap encoding.
CGBlendModeBlending mode used during composition.
CGColorColor structure.
CGColorConverterOpaque type that Core Graphics uses to convert colors between color spaces.
CGColorConverterTransformTypeEnumerates the relationships between color space transform starting and end points.
CGColorConverterTripleContains the rendering intent, color space, and transform for a color conversion.
CGColorRenderingIntentDetermines how Quartz maps colors from the source color space to the gamut of the destination.
CGColorSpaceColorspace, determines how Quartz interprets color information.
CGColorSpaceModelColor space model.
CGColorSpaceNamesProvides string constants whose values are known color spaces.
CGContextGraphics context and primitives to draw in them.
CGContextPDFPDF Rendering CGContext class. Use this class to create a CGContext that will output the results to a PDF file.
CGDataConsumerData sink for CGContextPDF or CGImageDestination to store data on.
CGDataProviderA class that wraps a data source and exposes it to the CGImage class.
CGFontFont support.
CGFunctionA callback function to be used with various CoreGraphics functions.
CGFunction+CGFunctionEvaluateA delegate used to specify the callback function of a CGFunction.
CGGradientGradient definitions.
CGGradientDrawingOptionsDrawing location for gradients.
CGImageRepresents bitmap images and bitmap masks.
CGImageAlphaInfoSpecifies the bitmap layout information.
CGImageColorModelAn enumeration of valid color models.
CGImagePropertiesProperties of bitmap images.
CGImagePropertiesExifStandard Exif metadata of an image.
CGImagePropertiesGpsLocation properties associated with an image.
CGImagePropertiesIptcProperties with IPTC metadata in an image.
CGImagePropertiesJfifProperties associated with JFIF bitmap images.
CGImagePropertiesPngProperties associated with PNG bitmap images.
CGImagePropertiesTiffProperties associated with TIFF images.
CGInterpolationQualityQuality of interpolation for drawing images.
CGLayerA hardware accelerated context.
CGLineCapStyle for line caps.
CGLineJoinJoin type for drawing operations.
CGPathA drawing path is made up of lines, arcs, beziers that can be used to paint.
CGPath+ApplierFunctionA function that can make changes to a CGPathElement.
CGPathDrawingModeDrawing mode.
CGPathElementAn individual element on a CGPath.
CGPathElementTypeThe type of an element in a CGPath.
CGPatternA pattern to draw in a CGContext.
CGPattern+DrawPatternCallback signature used to draw patterns on the screen.
CGPatternTilingPattern styling style.
CGPDFArrayRepresents a PDF array
CGPDFBoxType of box in a PDF document.
CGPDFContentStreamClass that gets PDF resources as an object or stream.
CGPDFDataFormatEnumerates values that indicate the data format of a PDF.
CGPDFDictionaryRepresents a PDF Dictionary.
CGPDFDocumentPDF Document.
CGPDFInfoAuxiliary parameters for constructing a CGContextPDF.
CGPDFObjectClass that represents various objects in a PDF document.
CGPDFObjectTypeEnumerates the various types of values that are found in a PDF document.
CGPDFOperatorTableClass for storing callbacks for processing PDF documents.
CGPDFPageA PDF Page in a PDF Document.
CGPDFPageInfoSpecifies various boxes for the CGContextPDF.BeginPage method.
CGPDFScannerClass that enables app developers to parse values from a PDF stream.
CGPDFStreamA PDF Stream.
CGPointStructure defining a 2D point.
CGRectStructure defining a rectangle in terms of location and size.
CGRectEdgeCoordinates used to establish the edge in RectangleFExtensions.Divide.
CGShadingA type that represents a Quartz shading.
CGSizeStructure containing height and width values.
CGTextDrawingModeText drawing mode used by Quartz.
CGTextEncodingText encoding, this enumeration is deprecated, use CoreText APIs instead.
CGVectorA mathematical vector, with value equality implemented.
RectangleFExtensionsExtensions to the RectangleF class that are useful when using CoreGraphics.