Summary of QuickDraw GX Debugging
Constants and Data Types
Drawing Errors
typedef long gxDrawError;
enum gxDrawErrors {
no_draw_error,
/* gxShape type errors */
shape_emptyType,
shape_inverse_fullType,
rectangle_zero_width,
rectangle_zero_height,
polygon_empty,
path_empty,
bitmap_zero_width,
bitmap_zero_height,
text_empty,
glyph_empty,
layout_empty,
picture_empty,
/* general gxShape errors */
shape_no_fill,
shape_no_enclosed_area,
shape_no_enclosed_pixels,
shape_very_small,
shape_very_large,
shape_contours_cancel,
/* gxStyle errors */
pen_too_small,
text_size_too_small,
dash_empty,
start_cap_empty,
pattern_empty,
textFace_empty,
shape_primitive_empty,
shape_primitive_very_small,
/* gxInk errors */
transfer_equals_noMode,
transfer_matrix_ignores_source,
transfer_matrix_ignores_device,
transfer_source_reject,
transfer_mode_ineffective,
colorSet_no_entries,
bitmap_colorSet_one_entry,
/* gxTransform errors */
transform_scale_too_small,
transform_map_too_large,
transform_move_too_large,
transform_scale_too_large,
transform_rotate_too_large,
transform_perspective_too_large,
transform_skew_too_large,
transform_clip_no_intersection,
transform_clip_empty,
transform_no_viewPorts,
/* gxViewPort errors */
viewPort_disposed,
viewPort_clip_empty,
viewPort_clip_no_intersection,
viewPort_scale_too_small,
viewPort_map_too_large,
viewPort_move_too_large,
viewPort_scale_too_large,
viewPort_rotate_too_large,
viewPort_perspective_too_large,
viewPort_skew_too_large,
viewPort_viewGroup_offscreen,
/* gxViewDevice errors */
viewDevice_clip_no_intersection,
viewDevice_scale_too_small,
viewDevice_map_too_large,
viewDevice_move_too_large,
viewDevice_scale_too_large,
viewDevice_rotate_too_large,
viewDevice_perspective_too_large,
viewDevice_skew_too_large
};
Validation Levels
typedef long gxValidationLevel;
enum gxValidationLevels {
/*
These levels tell how to validate routines. Choose one.
*/
gxNoValidation = 0x00, /* no validation */
gxPublicValidation = 0x01, /* check parameters to public routines */
gxInternalValidation = 0x02, /* check parameters to internal routines */
/*
These levels tell how to validate types. Choose one.
*/
gxTypeValidation = 0x00, /* check types of objects */
gxStructureValidation = 0x10, /* check fields of private structures */
gxAllObjectValidation = 0x20, /* check every object over every call */
/*
These levels tell how to validate memory manager blocks. Choose any
combination.
*/
gxNoMemoryManagerValidation = 0x0000,/* no memory validation */
gxApBlockValidation = 0x0100, /* check the relevant block
structures after each Memory Manager
call */
gxFontBlockValidation = 0x0200/* check the system gxHeap as well */
gxApHeapValidation = 0x0400, /* check the memory manager's gxHeap after
every memory call */
gxFontHeapValidation= 0x0800, /* also check the system gxHeap */
gxCheckApHeapValidation = 0x1000,
/* check the memory manager's
gxHeap if checking routine
parameters */
gxCheckFontHeapValidation = 0x2000
/* check the system gxHeap as
well */
} ;
Functions
Obtaining Drawing Errors
gxDrawError GXGetShapeDrawError
(gxShape source);
Setting and Getting Validation Options and Errors
void GXSetValidation (gxValidationLevel);
gxValidationLevel GXGetValidation
(void);
void GXGetValidationError (char *procedureName, void **argument,
long *argumentNumber);
Validating Objects
void GXValidateShape (gxShape target);
void GXValidateStyle (gxStyle target);
void GXValidateInk (gxInk target);
void GXValidateTransform(gxTransform target);
void GXValidateColorSet (gxColorSet target);
void GXValidateColorProfile
(gxColorProfile target);
void GXValidateTag (gxTag target);
void GXValidateViewDevice(gxViewDevice target);
void GXValidateViewPort (gxViewPort target);
void GXValidateViewGroup(gxViewGroup target);
void GXValidateGraphicsClient
(gxGraphicsClient target);
void GXValidateAll (void);