The libart library | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
ArtVpath* art_vpath_perturb (ArtVpath *src); ArtVpath* art_vpath_affine_transform (const ArtVpath *src, const double matrix[6]); ArtBpath* art_bpath_affine_transform (const ArtBpath *src, const double matrix[6]); |
Once vpaths and bpaths are constructed, it is possible to apply a number of transformations to these vector paths: art_vpath_perturb should not be really used by applications (but you might have to use it so...) but art_vpath_affine_transform and art_bpath_affine_transform are both widely used to apply affine transformations.
ArtVpath* art_vpath_perturb (ArtVpath *src); |
Perturbs each of the points by a small random amount. This is helpful for cheating in cases when algorithms haven't attained numerical stability yet.
ArtVpath* art_vpath_affine_transform (const ArtVpath *src, const double matrix[6]); |
Computes the affine transform of the vpath, using matrix as the transform. matrix is stored in the same format as PostScript, ie. x' = matrix[0] * x + matrix[2] * y + matrix[4] y' = matrix[1] * x + matrix[3] * y + matrix[5]
ArtBpath* art_bpath_affine_transform (const ArtBpath *src, const double matrix[6]); |
Affine transform the bezpath, returning a newly allocated ArtBpath (allocated using art_alloc()).
Result (x', y') = (matrix[0] * x + matrix[2] * y + matrix[4], matrix[1] * x + matrix[3] * y + matrix[5])