Mac OS 9
CGPattern.h File Reference

CoreGraphics patterns. More...

#include <CGBase.h>
#include <CGContext.h>

Go to the source code of this file.

Data Structures

struct  CGPatternCallbacks
 

Typedefs

typedef enum CGPatternTiling CGPatternTiling
 
typedef CGContextRef c
 
typedef struct CGPatternCallbacks CGPatternCallbacks
 

Enumerations

enum  CGPatternTiling { kCGPatternTilingNoDistortion = 0 , kCGPatternTilingConstantSpacingMinimalDistortion = 1 , kCGPatternTilingConstantSpacing = 2 }
 

Functions

typedef CALLBACK_API_C (void, CGDrawPatternProcPtr)(void *info
 
typedef CALLBACK_API_C (void, CGReleaseInfoProcPtr)(void *info)
 
CGPatternRef CGPatternCreate (void *info, CGRect bounds, CGAffineTransform matrix, float xStep, float yStep, CGPatternTiling tiling, int isColored, const CGPatternCallbacks *callbacks)
 
CGPatternRef CGPatternRetain (CGPatternRef pattern)
 
void CGPatternRelease (CGPatternRef pattern)
 

Detailed Description

CoreGraphics patterns.

Introduced In: CoreGraphics-122 (Mac OS X 10.1)
Avaliable From: Universal Interfaces 3.4.1
Copyright: © 2001 by Apple Computer, Inc., all rights reserved.

For bug reports, consult the following page on the World Wide Web:

http://developer.apple.com/bugreporter/

Enumeration Type Documentation

◆ CGPatternTiling

kCGPatternTilingNoDistortion: The pattern cell is not distorted when painted, however the spacing between pattern cells may vary by as much as 1 device pixel.

kCGPatternTilingConstantSpacingMinimalDistortion: Pattern cells are spaced consistently, however the pattern cell may be distorted by as much as 1 device pixel when the pattern is painted.

kCGPatternTilingConstantSpacing: Pattern cells are spaced consistently as with kCGPatternTilingConstantSpacingMinimalDistortion, however the pattern cell may be distorted additionally to permit a more efficient implementation.

Function Documentation

◆ CALLBACK_API_C()

typedef CALLBACK_API_C ( void  ,
CGDrawPatternProcPtr   
)

The drawing of the pattern is delegated to the callbacks. The callbacks may be called one or many times to draw the pattern.

‘version’ is the version number of the structure passed in as a parameter to the CGPattern creation functions. The structure defined below is version 0.

‘drawPattern’ should draw the pattern in the context ‘c’. ‘info’ is the parameter originally passed to the CGPattern creation functions.

‘releaseInfo’ is called when the pattern is deallocated.

◆ CGPatternCreate()

CGPatternRef CGPatternCreate ( void *  info,
CGRect  bounds,
CGAffineTransform  matrix,
float  xStep,
float  yStep,
CGPatternTiling  tiling,
int  isColored,
const CGPatternCallbacks callbacks 
)

Create a pattern. CGPatternCreate()

Non-Carbon CFM: not available
Carbon Lib: not available
Mac OS X: in version 10.1 and later

◆ CGPatternRelease()

void CGPatternRelease ( CGPatternRef  pattern)

Decrement the retain count of ‘pattern’. If the retain count reaches 0, then free it and release any associated resources. CGPatternRelease()

Non-Carbon CFM: not available
Carbon Lib: not available
Mac OS X: in version 10.1 and later

◆ CGPatternRetain()

CGPatternRef CGPatternRetain ( CGPatternRef  pattern)

Increment the retain count of ‘pattern’ and return it. All patterns are created with an initial retain count of 1. CGPatternRetain()

Non-Carbon CFM: not available
Carbon Lib: not available
Mac OS X: in version 10.1 and later