4 Data Structures

4 Markers

A marker is a two-dimensional object typically used to indicate the position of an object (or part of an object) in a window. A marker is defined by the TQ3MarkerData data type, which contains a bitmap and a location, together with an optional set of attributes. The bitmap specifies the image that is to be drawn on top of a rendered scene at the specified location. The marker is drawn perpendicular to the viewing vector, aligned with the window, with its origin located at the specified location. A marker is always drawn with the same size, no matter which rotations, scalings, or other transformations might be active. Figure 4-20 shows a marker.

Figure 4-20 A marker

typedef struct TQ3MarkerData {
 TQ3Point3D         location;
 long         xOffset;
 long         yOffset;
 TQ3Bitmap         bitmap;
 TQ3AttributeSet         markerAttributeSet;
} TQ3MarkerData;
location The origin of the marker.
xOffset The number of pixels, in the horizontal direction, by which to offset the upper-left corner of the marker from the origin specified in the location field.
yOffset The number of pixels, in the vertical direction, by which to offset the upper-left corner of the marker from the origin specified in the location field.
bitmap A bitmap. Each bit of this bitmap corresponds to a pixel in the rendered image.
markerAttributeSet
A set of attributes for the marker. You can use these attributes to specify the color, transparency, or other attributes of the bits in bitmap that are set to 1. The value in this field is NULL if no marker attributes are defined.

3D Graphics Programming with QuickDraw 3D - 21 OCT 1995

© Apple Computer, Inc.

Let us know what you think of these prototype pages.

Generated with Harlequin WebMaker