Skip to main content

Module basics

Module basics 

Source
Expand description

Foundation types, constants, and path command utilities.

Port of agg_basics.h — the most fundamental types in AGG that everything else depends on.

Structs§

ConstRowInfo
Const version of row info.
PointBase
A 2D point. Port of C++ point_base<T>.
Rect
A rectangle defined by two corner points. Port of C++ rect_base<T>.
RowInfo
Information about a row in a rendering buffer. Port of C++ row_info<T> — used with raw pointers for pixel buffer access.
VertexBase
A vertex with coordinates and a path command. Port of C++ vertex_base<T>.

Enums§

FillingRule
Filling rule for polygon rasterization.

Constants§

COVER_FULL
COVER_MASK
COVER_NONE
COVER_SHIFT
COVER_SIZE
PATH_CMD_CATROM
PATH_CMD_CURVE3
PATH_CMD_CURVE4
PATH_CMD_CURVE_N
PATH_CMD_END_POLY
PATH_CMD_LINE_TO
PATH_CMD_MASK
PATH_CMD_MOVE_TO
PATH_CMD_STOP
PATH_CMD_UBSPLINE
PATH_FLAGS_CCW
PATH_FLAGS_CLOSE
PATH_FLAGS_CW
PATH_FLAGS_MASK
PATH_FLAGS_NONE
PI
POLY_SUBPIXEL_MASK
POLY_SUBPIXEL_SCALE
POLY_SUBPIXEL_SHIFT
These constants determine the subpixel accuracy (number of fractional bits). With 8-bit fractional part and 32-bit integers, coordinate capacity is 24 bits.

Traits§

VertexSource
The fundamental vertex source interface. Every shape, path, and converter in AGG implements this trait to produce a stream of vertices.

Functions§

clear_orientation
Remove orientation flags from a command.
deg2rad
Convert degrees to radians.
get_close_flag
Extract the close flag from a command.
get_orientation
Extract the orientation flags from a command.
iceil
Ceiling of a double as a signed integer. Matches C++ AGG’s iceil.
ifloor
Floor a double to the nearest integer toward negative infinity. Matches C++ AGG’s ifloor.
intersect_rectangles
Compute the intersection of two rectangles.
iround
Round a double to the nearest integer (round half away from zero). Matches C++ AGG’s iround (non-FISTP, non-QIFIST path).
is_ccw
Returns true if c has the counter-clockwise flag set.
is_close
Returns true if c is a close polygon command.
is_closed
Returns true if c has the close flag set.
is_curve
Returns true if c is a curve command (curve3 or curve4).
is_curve3
Returns true if c is a quadratic curve command.
is_curve4
Returns true if c is a cubic curve command.
is_cw
Returns true if c has the clockwise flag set.
is_drawing
Returns true if c is a drawing command (line_to through curveN).
is_end_poly
Returns true if c is an end_poly command (with any flags).
is_equal_eps
Compare two floating-point values for approximate equality using relative comparison scaled by the smaller exponent. Port of C++ is_equal_eps.
is_line_to
Returns true if c is a line_to command.
is_move_to
Returns true if c is a move_to command.
is_next_poly
Returns true if c starts a new polygon (stop, move_to, or end_poly).
is_oriented
Returns true if c has any orientation flag set.
is_stop
Returns true if c is the stop command.
is_vertex
Returns true if c is a vertex command (move_to through curveN).
mul_one
Fixed-point multiply: (a * b + half) >> shift, with rounding. Replaces C++ template mul_one<Shift>::mul.
rad2deg
Convert radians to degrees.
saturation_iround
Round v to int, clamping to [-limit, limit]. Replaces C++ template saturation<Limit>::iround.
set_orientation
Set the orientation flags on a command.
uceil
Ceiling of a double as an unsigned integer. Matches C++ AGG’s uceil.
ufloor
Floor a double to the nearest unsigned integer (truncation toward zero). Matches C++ AGG’s ufloor.
unite_rectangles
Compute the union (bounding box) of two rectangles.
uround
Round a double to the nearest unsigned integer (round half up). Matches C++ AGG’s uround.

Type Aliases§

CoverType
The type used for anti-aliasing coverage values.
PointD
PointF
PointI
RectD
Rectangle with f64 coordinates.
RectF
Rectangle with f32 coordinates.
RectI
Rectangle with i32 coordinates.
VertexD
VertexF
VertexI