|
GLG Toolkit, C / C++ API Library
Version 4.6
|
This group contains methods for positioning objects in the drawing, as well as scaling and rotating them. More...
This group contains methods for positioning objects in the drawing, as well as scaling and rotating them.
It also includes the LayoutObjects method that can be used to align and distribute objects, as well as to set their width and height.
Functions | |
| GlgBoolean | FitObject (GlgCoordType coord_type, GlgCube *box, GlgBoolean keep_ratio) |
| Fits an object to the specified rectangular area. More... | |
| GlgBoolean | LayoutObjects (GlgObject anchor, GlgLayoutType type, double distance, GlgBoolean use_box, GlgBoolean process_subobjects) |
| Performs operations ranging from setting an object's width and height to aligning and layout of groups of objects. More... | |
| GlgBoolean | MoveObject (GlgCoordType coord_type, GlgPoint *start_point, GlgPoint *end_point) |
| Moves an object by a move vector. More... | |
| GlgBoolean | MoveObjectBy (GlgCoordType coord_type, double x, double y, double z) |
| Moves an object by the specified distances. More... | |
| GlgBoolean | PositionObject (GlgCoordType coord_type, GlgLong anchoring, double x, double y, double z) |
| Positions an object at the specified location. More... | |
| GlgBoolean | RotateObject (GlgCoordType coord_type, GlgPoint *center, double x_angle, double y_angle, double z_angle) |
| Rotates an object. More... | |
| GlgBoolean | ScaleObject (GlgCoordType coord_type, GlgPoint *center, double x_scale, double y_scale, double z_scale) |
| Scales an object. More... | |
| GlgBoolean | TransformObject (GlgObjectC &xform, GlgCoordType coord_type, GlgObjectC *parent=NULL) |
| ADVANCED: Transforms all control points of an object with an arbitrary transformation. More... | |
| GlgBoolean FitObject | ( | GlgCoordType | coord_type, |
| GlgCube * | box, | ||
| GlgBoolean | keep_ratio | ||
| ) |
Fits an object to the specified rectangular area.
This is a wrapper for GlgFitObject.
| coord_type | Specifies the coordinate system for interpreting coordinates of the area to fit to:
|
| box | The area to fit the object to.
|
| keep_ratio | Controls how the object's X/Y ratio is handled:
|
This method transforms the object to fit it to the area defined by the box parameter, calculating new control point values. The object's hierarchy must be set up to use this method.
| GlgBoolean LayoutObjects | ( | GlgObject | anchor, |
| GlgLayoutType | type, | ||
| double | distance, | ||
| GlgBoolean | use_box, | ||
| GlgBoolean | process_subobjects | ||
| ) |
Performs operations ranging from setting an object's width and height to aligning and layout of groups of objects.
This is a wrapper for GlgLayoutObjects.
| anchor | The anchor object for alignment operations. If NULL, the first encountered object in the specified alignment direction is used. |
| type | The type of the layout action to perform. See GlgLayoutObjects for a list of possible values. |
| distance | The distance in screen coordinates for positioning objects, it is interpreted depending on the layout action. |
| use_box | Controls how the objects extent is determined:
|
| process_subobjects | Controls how to apply the layout action if the object is a group:
|
The object's hierarchy must be set up to use this method.
| GlgBoolean MoveObject | ( | GlgCoordType | coord_type, |
| GlgPoint * | start_point, | ||
| GlgPoint * | end_point | ||
| ) |
Moves an object by a move vector.
This is a wrapper for GlgMoveObject.
| coord_type | Specifies the coordinate system for interpreting the move vector:
|
| start_point | The start point of the move vector. If NULL, (0,0,0) is used as the start point. |
| end_point | The end point of the move vector. |
This method moves an object's control points by the distance defined by the move vector, calculating new control point values. The object's hierarchy must be set up to use this method.
| GlgBoolean MoveObjectBy | ( | GlgCoordType | coord_type, |
| double | x, | ||
| double | y, | ||
| double | z | ||
| ) |
Moves an object by the specified distances.
This is a wrapper for GlgMoveObjectBy.
| coord_type | Specifies the coordinate system for interpreting move distances:
|
| x,y,z | The X, Y and Z move distances. |
This method moves an object's control points by the specified X, Y and Z distances, calculating new control point values. The object's hierarchy must be set up to use this method.
| GlgBoolean PositionObject | ( | GlgCoordType | coord_type, |
| GlgLong | anchoring, | ||
| double | x, | ||
| double | y, | ||
| double | z | ||
| ) |
Positions an object at the specified location.
This is a wrapper for GlgPositionObject.
| coord_type | Specifies the coordinate system for interpreting position coordinates:
|
| anchoring | Specifies what part of the object's bounding box will be anchored at the specified position. It is formed as a bitwise OR of the horizontal anchoring constant (GLG_HLEFT, GLG_HCENTER or GLG_HRIGHT) with the vertical anchoring constants (GLG_VTOP, GLG_VCENTER or GLG_BOTTOM). For example, using ( GLG_VTOP | GLG_HLEFT ) causes the upper left corner of the object's bounding box to be positioned at the specified location. |
| x,y,z | The X, Y and Z coordinates of the desired object position. |
This method positions the object, calculating new control point values. The object's hierarchy must be set up to use this method.
| GlgBoolean RotateObject | ( | GlgCoordType | coord_type, |
| GlgPoint * | center, | ||
| double | x_angle, | ||
| double | y_angle, | ||
| double | z_angle | ||
| ) |
Rotates an object.
This is a wrapper for GlgRotateObject.
| coord_type | Specifies the coordinate system for interpreting the rotation's center:
|
| center | The center of rotation. If the parameter is NULL, the object is rotated relative to the center of its bounding box. |
| x_angle,y_angle,z_angle | The X, Y and Z rotation angles in degrees. |
This method rotates the object's control points by the specified rotation angles and relative to the specified center, calculating new control point values. If more than one rotation angle is specified, X rotation is applied the first, then Y and Z. The object's hierarchy must be set up to use this method.
| GlgBoolean ScaleObject | ( | GlgCoordType | coord_type, |
| GlgPoint * | center, | ||
| double | x_scale, | ||
| double | y_scale, | ||
| double | z_scale | ||
| ) |
Scales an object.
This is a wrapper for GlgScaleObject.
| coord_type | Specifies the coordinate system for interpreting the scale center:
|
| center | The center of scaling. If the parameter is NULL, the object is scaled relative to the center of its bounding box. |
| x_scale,y_scale,z_scale | The X, Y and Z scaling factors. Use the same value for all three factors to scale the object uniformly in all dimensions. |
This method scales the object's control points by the specified scale factors and relative to the specified center, calculating new control point values. The object's hierarchy must be set up to use this method.
| GlgBoolean TransformObject | ( | GlgObjectC & | xform, |
| GlgCoordType | coord_type, | ||
| GlgObjectC * | parent = NULL |
||
| ) |
ADVANCED: Transforms all control points of an object with an arbitrary transformation.
This is a wrapper for GlgTransformObject.
| xform | The transformation to be applied to the object's points. |
| coord_type | The coordinate system to interpret the transformation in:
|
| parent | The object's parent. It is required if coord_type=GLG_PARENT_COORD, or if the this object is a G data object representing a control point. NULL may be passed in all other cases. |
This method applies the given transformation to an object's control points, calculating new control point values. The object's hierarchy must be set up to use this method.