|
AIRealBezierSuite Struct Reference
[API Suite List]
This suite provides utilities for working with cubic Beziers curves.
More...
#include <AIRealBezier.h>
List of all members.
Public Attributes |
AIAPI void(* | Set )(AIRealBezier *b, AIRealPoint *p0, AIRealPoint *p1, AIRealPoint *p2, AIRealPoint *p3) |
| Sets the four control points that define a cubic Bezier.
|
AIAPI void(* | Offset )(AIRealBezier *b, AIReal dh, AIReal dv) |
| Translates a cubic Bezier by a vector.
|
AIAPI void(* | Transform )(AIRealBezier *b, AIRealMatrix *m) |
| Applies a transformation matrix to a cubic Bezier.
|
AIAPI void(* | Evaluate )(AIRealBezier *b, AIReal t, AIRealPoint *p) |
| Finds a point for a given input to a cubic Bezier.
|
AIAPI void(* | Tangent )(AIRealBezier *b, AIReal t, AIRealPoint *v) |
| Finds a tangent for a given input to a cubic Bezier.
|
AIAPI void(* | Normal )(AIRealBezier *b, AIReal t, AIRealPoint *v) |
| Finds the normal for a given input to a cubic Bezier.
|
AIAPI void(* | Divide )(AIRealBezier *b, AIReal t, AIRealBezier *b1, AIRealBezier *b2) |
| Splits a cubic Bezier at a point that results from a given input value.
|
AIAPI AIBoolean(* | IntersectsRect )(AIRealBezier *b, AIRealRect *r, AIReal scale) |
| Reports whether a cubic Bezier intersects a rectangle.
|
AIAPI AIReal(* | Length )(AIRealBezier *b, AIReal flatness) |
| Calculates the length of a cubic Bezier curve.
|
AIAPI void(* | PointAndTangent )(AIRealBezier *b, AIReal t, AIRealPoint *p, AIRealPoint *v) |
| Finds the point and tangent for a given input to a cubic Bezier.
|
AIAPI ai::uint16(* | AdjustThroughPoint )(AIRealBezier *b, AIRealPoint *p, AIReal t) |
| Adjusts a cubic Bezier such that it passes through a given input value.
|
AIAPI AIErr(* | TAtLength )(AIRealBezier *bez, AIReal length, AIReal total_length, AIReal flatness, AIReal *t) |
| Finds the input value to a cubic Bezier that results in a point at a given distance along the curve.
|
Detailed Description
This suite provides utilities for working with cubic Beziers curves.
Most of the functions in this suite do not return AIErr values. For the most part, they return nothing, or return the result of the operation.
Member Data Documentation
Adjusts a cubic Bezier such that it passes through a given input value.
(Note that this function returns a constant value, not an error code.)
- Parameters:
-
| b | The Bezier object. |
| p | The point. |
| t | The input value. |
- Returns:
- An
AIAdjustThroughPointResult value that indicates how the Bezier was adjusted.
Splits a cubic Bezier at a point that results from a given input value.
Either b1 or b2 may be null.
- Parameters:
-
| b | The Bezier object. |
| t | The input value for the point at which to split. |
| b1 | [out] A buffer in which to return the cubic Bezier for the first half. |
| b2 | [out] A buffer in which to return the cubic Bezier for the second half. |
Finds a point for a given input to a cubic Bezier.
- Parameters:
-
| b | The Bezier object. |
| t | The input value. |
| p | [out] A buffer in which to return the corresponding point. |
Reports whether a cubic Bezier intersects a rectangle.
Draws the Bezier curve into a bitmap, and tests whether any of the marked pixels are contained within the supplied rectangle. (Note that this function returns a boolean value, not an error code.)
- Parameters:
-
| b | The Bezier object. |
| r | The rectangle. |
| scale | The scale factor for bitmap resolution, a percentage value where 1.0 (100%) is 72 DPI. |
- Returns:
- True if the bezier intersects the rectangle, false otherwise.
Calculates the length of a cubic Bezier curve.
(Note that this function returns a numeric value, not an error code.)
- Parameters:
-
| b | The Bezier object. |
| flatness | The accuracy with which to approximate the curve. A number of document points that is the maximum allowed distance of any line segment, at its furthest point, from the curve it approximates. |
- Returns:
- The length in document points.
Finds the normal for a given input to a cubic Bezier.
- Parameters:
-
| b | The Bezier object. |
| t | The input value. |
| v | [out] A buffer in which to return the corresponding normal. |
Translates a cubic Bezier by a vector.
- Parameters:
-
| b | The Bezier object. |
| dh | The horizontal vector value. |
| dv | The vertical vector value. |
Finds the point and tangent for a given input to a cubic Bezier.
This convenience function is the same as calling both Evaluate() and Tangent() .
- Parameters:
-
| b | The Bezier object. |
| t | The input value. |
| p | [out] A buffer in which to return the point. |
| v | [out] A buffer in which to return the tangent. |
Sets the four control points that define a cubic Bezier.
- Parameters:
-
| b | The Bezier object. |
| p0 | The first point. |
| p1 | The second point. |
| p2 | The third point. |
| p3 | The fourth point. |
Finds a tangent for a given input to a cubic Bezier.
- Parameters:
-
| b | The Bezier object. |
| t | The input value. |
| v | [out] A buffer in which to return the corresponding tangent. |
Finds the input value to a cubic Bezier that results in a point at a given distance along the curve.
- Parameters:
-
| bez | The Bezier object. |
| length | The distance in points, must be less than the total length of the curve. |
| total_length | the total length of the curve. See Length() . |
| flatness | The accuracy with which to approximate the curve. A value of 1e-2 is suggested. |
| t | [out] A buffer in which to return the input value. |
Applies a transformation matrix to a cubic Bezier.
- Parameters:
-
| b | The Bezier object. |
| m | The transformation matrix. |
The documentation for this struct was generated from the following file:
|