Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

AUGUI Namespace Reference


[NOHEADER]

template<class V> CFStringRef CopyCanonicalClassID ()
 These two functions are inline duplicates of the members of TViewNoCompositingCompatible.

template<class V> CFStringRef CopyClassIDForBundleID (CFStringRef bundleID)

Functions

void HIRectToQDRect (const HIRect *inHIRect, Rect *outQDRect)
TRect RectForCGImage (CGImageRef theImage)
float DegreesToRadians (float deg)
 Simple utility to calculate radians from degrees.

void ConvertWindowPointToGlobal (WindowRef theWindow, Point &thePoint)
 Converts a point from local window coordinates to global coordinates.

void ConvertGlobalToWindowPoint (WindowRef theWindow, Point &thePoint)
 Converts a point from global to local window coordinates.

void SetFontFromFontStyleRec (CGContextRef context, ControlFontStyleRec &rec, ThemeFontID baseThemeFont, ThemeTextColor themeColor)
 Sets the font face, size, style, and color based on the fields and flags of the rec argument.

void * malloc_aligned (UInt32 numBytes, void **realPointer)
 Allocates a block of memory that is 16-byte aligned and zeroed.


Function Documentation

void AUGUI::ConvertGlobalToWindowPoint WindowRef  theWindow,
Point &  thePoint
 

Converts a point from global to local window coordinates.

This would be easy enough to do by simply calling GlobalToLocal(), but you have to guarantee that the port is properly set. So we have this utility.

void AUGUI::ConvertWindowPointToGlobal WindowRef  theWindow,
Point &  thePoint
 

Converts a point from local window coordinates to global coordinates.

This would be easy enough to do by simply calling LocalToGlobal(), but you have to guarantee that the port is properly set. So we have this utility.

template<class V>
CFStringRef CopyCanonicalClassID  )  [inline]
 

These two functions are inline duplicates of the members of TViewNoCompositingCompatible.

They are here because they are extremely useful and pulling them out of the class makes them a little easier to use (much less to type).

CopyCanonicalClassID() will use the bundle stored as a static member of the class that you pass as the template argument.

template<class V>
CFStringRef CopyClassIDForBundleID CFStringRef  bundleID  )  [inline]
 

float DegreesToRadians float  deg  )  [inline]
 

Simple utility to calculate radians from degrees.

Parameters:
deg Input value in degrees, from 0.0 to 360.0
Returns:
The output in radians.

void AUGUI::HIRectToQDRect const HIRect *  inHIRect,
Rect *  outQDRect
 

void * AUGUI::malloc_aligned UInt32  numBytes,
void **  realPointer
 

Allocates a block of memory that is 16-byte aligned and zeroed.

This makes it possible to use Altivec routines on the data in the buffer. The buffer is allocated with malloc() and so must be disposed with free().

Parameters:
numBytes The number of bytes to allocate. The buffer will not necessarily be this size, as it may need to be rounded up.
realPointer On exit, this contains a pointer to the actual buffer that must be passed to free() to be disposed.
Returns:
Pointer to aligned buffer at least numBytes in size.

TRect AUGUI::RectForCGImage CGImageRef  theImage  ) 
 

void AUGUI::SetFontFromFontStyleRec CGContextRef  context,
ControlFontStyleRec &  rec,
ThemeFontID  baseThemeFont,
ThemeTextColor  baseThemeColor
 

Sets the font face, size, style, and color based on the fields and flags of the rec argument.

This allows you to call the QuickDraw Text routines to measure text since there is no way to measure text in CoreGraphics (unbelievable!). Well, OK. You can draw a string invisibly and subtract, but it's not the same. For one thing, you have to have a context to draw into. You can't pre-compute sizes this way.






Generated on Sun May 23 19:32:07 2004 for AUGUI Framework by doxygen1.3.7

hosted on SourceForge.net Logo