LibCapy - pen

Pen class to draw 2d graphics on an image.

Macros:

Enumerations:

Pen hardness

Typedefs:

None.

Struct CapyPen :

Struct CapyPen's properties:

Color

Size (radius in pixel)

Hardness

Struct CapyPen's methods:

Destructor

Draw a point on a CapyImage.

Input argument(s):

pos: the coordinate in pixel of the point
img: the image on which to draw

Draw a line on a CapyImage.

Input argument(s):

from: the coordinate in pixel of the start point
to: the coordinate in pixel of the end point
img: the image on which to draw

Draw a CapyBezier curve on a CapyImage. The curve is expected to have one input (in [0, 1]) and return two outputs (in pixel coordinates)

Input argument(s):

curve: the curve to draw
img: the image on which to draw

Draw a CapyBezierSpline curve on a CapyImage. The curve is expected to have one input (in [0, spline.nbSegment]) and return two outputs (in pixel coordinates)

Input argument(s):

spline: the spline to draw
img: the image on which to draw

Draw a quadrilateral on a CapyImage.

Input argument(s):

quad: the quadrialteral to draw
img: the image on which to draw

Draw a triangle on a CapyImage.

Input argument(s):

tri: the triangle to draw
img: the image on which to draw

Draw a circle on a CapyImage.

Input argument(s):

circle: the circle to draw
img: the image on which to draw

Draw a Geometry2D on a CapyImage.

Input argument(s):

geometry: the geometry to draw
img: the image on which to draw

Functions:

Create a CapyPen

Output and side effect(s):

Return a CapyPen with default color white, hardness HB and radius 1.5

Allocate memory for a new CapyPen and create it

Output and side effect(s):

Return a CapyPen with default color white, hardness HB and radius 1.5

Exception(s):

May raise CapyExc_MallocFailed.

Free the memory used by a CapyPen* and reset '*that' to NULL

Input argument(s):

that: a pointer to the CapyPen to free

2022-02-08
in LibCapy,
31 views
Copyright 2021-2023 Baillehache Pascal