Affine transformation

Summary
Affine transformation
Transform
gdTransformAffineGetImageApplies an affine transformation to a region and return an image containing the complete transformation.
gdTransformAffineCopyApplies an affine transformation to a region and copy the result in a destination to the given position.
gdTransformAffineBoundingBoxReturns the bounding box of an affine transformation applied to a rectangular area <gdRect>

Transform

gdTransformAffineGetImage

int gdTransformAffineGetImage(gdImagePtr *dst,
const gdImagePtr src,
gdRectPtr src_area,
const double affine[6])

Applies an affine transformation to a region and return an image containing the complete transformation.

Parameters

dstPointer to a gdImagePtr to store the created image, NULL when the creation or the transformation failed
srcSource image
src_arearectangle defining the source region to transform
dstYY position in the destination image
affineThe desired affine transformation

Returns

GD_TRUE if the affine is rectilinear or GD_FALSE

gdTransformAffineCopy

int gdTransformAffineCopy(gdImagePtr dst,
int dst_x,
int dst_y,
const gdImagePtr src,
gdRectPtr src_region,
const double affine[6])

Applies an affine transformation to a region and copy the result in a destination to the given position.

Parameters

dstImage to draw the transformed image
srcSource image
dstXX position in the destination image
dstYY position in the destination image
src_areaRectangular region to rotate in the src image

Returns

GD_TRUE if the affine is rectilinear or GD_FALSE

gdTransformAffineBoundingBox

int gdTransformAffineBoundingBox(gdRectPtr src,
const double affine[6],
gdRectPtr bbox)

Returns the bounding box of an affine transformation applied to a rectangular area <gdRect>

Parameters

srcRectangular source area for the affine transformation
affinethe affine transformation
bboxthe resulting bounding box

Returns

GD_TRUE if the affine is rectilinear or GD_FALSE

int gdTransformAffineGetImage(gdImagePtr *dst,
const gdImagePtr src,
gdRectPtr src_area,
const double affine[6])
Applies an affine transformation to a region and return an image containing the complete transformation.
int gdTransformAffineCopy(gdImagePtr dst,
int dst_x,
int dst_y,
const gdImagePtr src,
gdRectPtr src_region,
const double affine[6])
Applies an affine transformation to a region and copy the result in a destination to the given position.
int gdTransformAffineBoundingBox(gdRectPtr src,
const double affine[6],
gdRectPtr bbox)
Returns the bounding box of an affine transformation applied to a rectangular area gdRect
Close