|
|
|
|
CPML reference manual |
|
|---|---|---|---|---|
| Top | Description | ||||
struct CpmlExtents;void cpml_extents_add (CpmlExtents *extents,const CpmlExtents *src);void cpml_extents_copy (CpmlExtents *extents,const CpmlExtents *src);int cpml_extents_equal (const CpmlExtents *extents,const CpmlExtents *src);void cpml_extents_from_cairo_text (CpmlExtents *extents,const);cairo_text_extents_t *cairo_extentsint cpml_extents_is_inside (const CpmlExtents *extents,const CpmlExtents *src);void cpml_extents_pair_add (CpmlExtents *extents,const CpmlPair *src);int cpml_extents_pair_is_inside (const CpmlExtents *extents,const CpmlPair *src);void cpml_extents_transform (CpmlExtents *extents,const);cairo_matrix_t *matrix
The CpmlExtents struct groups two pairs representing the rectangular area of a bounding box.
struct CpmlExtents {
int is_defined;
CpmlPair org;
CpmlVector size;
};
A structure defining a bounding box area. These APIs expect the
size of the extents to be always positives, so be careful while
directly accessing the size field.
set to 0 |
|
|
CpmlPair |
the lowest x,y coordinates |
|
CpmlVector |
the width (x) and height (y) of the extents |
Since 1.0
void cpml_extents_add (CpmlExtents *extents,const CpmlExtents *src);
Merges extents and src and store the result in extents.
|
|
the destination CpmlExtents. [inout] |
|
|
the extents to add. [in] |
Since 1.0
void cpml_extents_copy (CpmlExtents *extents,const CpmlExtents *src);
Copies src in extents.
|
|
the destination CpmlExtents. [out] |
|
|
the source CpmlExtents. [in] |
Since 1.0
int cpml_extents_equal (const CpmlExtents *extents,const CpmlExtents *src);
Compares extents to src and returns 1 if the extents are equals.
Two NULLNULL
|
|
the first extents to compare |
|
|
the second extents to compare |
|
Returns : |
1extents is equal to src,
0 |
Since 1.0
void cpml_extents_from_cairo_text (CpmlExtents *extents,const);cairo_text_extents_t *cairo_extents
Converts cairo_extents in a CpmlExtents format and stores the
result in extents.
|
|
the destination CpmlExtents. [out] |
|
|
the source |
Since 1.0
int cpml_extents_is_inside (const CpmlExtents *extents,const CpmlExtents *src);
Checks wheter src is enterely contained by extents. If extents
is undefined, 0src is undefined, 1extents is considered inside.
|
|
the container CpmlExtents |
|
|
the subject CpmlExtents |
|
Returns : |
1src is totally inside extents,
0 |
Since 1.0
void cpml_extents_pair_add (CpmlExtents *extents,const CpmlPair *src);
Extends extents, if required, to include src. If extents is
undefined, the origin of extents is set to src and its size
will be (0,0).
|
|
the source and destination CpmlExtents. [inout] |
|
|
the |
Since 1.0
int cpml_extents_pair_is_inside (const CpmlExtents *extents,const CpmlPair *src);
Checks wheter src is inside extents. If extents is undefined,
0extents is considered inside.
|
|
the container CpmlExtents |
|
|
the subject CpmlPair |
|
Returns : |
1src is inside extents,
0 |
Since 1.0
void cpml_extents_transform (CpmlExtents *extents,const);cairo_matrix_t *matrix
Transforms the four corners of extents with matrix and
recomputes extents. This will logically equivalent to transform
an extents box and gets the extents of the resulting shape.
|
|
the container CpmlExtents. [inout] |
|
|
the transformation matrix. [in] |
Since 1.0