Functions
PrimitivesDrawer Namespace Reference

Functions for drawing 2D primitives into images. More...

Functions

void DrawCircle (CByteImage *pImage, float mx, float my, float radius, int r=255, int g=255, int b=255, int thickness=1, bool bAntiAlias=false)
 Draws a circle into a CByteImage.
void DrawCircle (CByteImage *pImage, const Vec2d &center, float radius, int r=255, int g=255, int b=255, int thickness=1, bool bAntiAlias=false)
 Draws a circle into a CByteImage.
void DrawCircle (CByteImage *pImage, const Circle2d &circle, int r=255, int g=255, int b=255, int thickness=1, bool bAntiAlias=false)
 Draws a circle into a CByteImage.
void DrawCross (CByteImage *pImage, const Vec2d &point, int length, int r, int g, int b)
 Draws a small cross into a CByteImage.
void DrawEllipse (CByteImage *pImage, const Ellipse2d &ellipse, int r=255, int g=255, int b=255, int thickness=1)
 Draws an ellipse into a CByteImage.
void DrawLine (CByteImage *pImage, const PointPair2d &line, int r=255, int g=255, int b=255, int thickness=1)
 Draws a line segment into a CByteImage, given its two end points.
void DrawLine (CByteImage *pImage, const Vec2d &p1, const Vec2d &p2, int r=255, int g=255, int b=255, int thickness=1)
 Draws a line segment into a CByteImage, given its two end points.
void DrawLine (CByteImage *pImage, const StraightLine2d &line, int r, int g, int b, int thickness=1)
 Draws a line into a CByteImage, given its representation as StraightLine2d.
void DrawLineNormal (CByteImage *pImage, float nx, float ny, float c, int r, int g, int b, int thickness=1)
 Draws a line into a CByteImage, given its parameters in normal form.
void DrawLinePolar (CByteImage *pImage, float theta, float r, int color_r, int color_g, int color_b, int thickness=1)
 Draws a straight line into a CByteImage, given its parameters in polar form.
void DrawPoint (CByteImage *pImage, const Vec2d &point, int r=255, int g=255, int b=255)
 Draws a point into a CByteImage.
void DrawPoint (CByteImage *pImage, int x, int y, int r=255, int g=255, int b=255)
 Draws a point into a CByteImage.
void DrawPointBlended (CByteImage *pImage, const Vec2d &point, int r=255, int g=255, int b=255, float blend=1.0f)
 Draws a point into a CByteImage, with blending.
void DrawPointBlended (CByteImage *pImage, int x, int y, int r=255, int g=255, int b=255, float blend=1.0f)
 Draws a point into a CByteImage, with blending.
void DrawPoints (CByteImage *pImage, const CVec2dArray &points, int r=255, int g=255, int b=255)
 Draws a list of points of type CVec2dArray into a CByteImage.
void DrawPolygon (CByteImage *pImage, const Vec2d *pPoints, int nPoints, int r, int g, int b, int thickness=1)
 Draws a polygon into a CByteImage.
void DrawPolygon (CByteImage *pImage, const CVec2dArray &points, int r, int g, int b, int thickness=1)
 Draws a polygon into a CByteImage.
void DrawRectangle (CByteImage *pImage, const Rectangle2d &rectangle, int r, int g, int b, int thickness=1)
 Draws a rectangle into a CByteImage.
void DrawRegion (CByteImage *pImage, const MyRegion &region, int r=255, int g=255, int b=255, int thickness=1)
 Draws a rectangle into a CByteImage.

Detailed Description

Functions for drawing 2D primitives into images.


Function Documentation

void PrimitivesDrawer::DrawCircle ( CByteImage pImage,
float  mx,
float  my,
float  radius,
int  r = 255,
int  g = 255,
int  b = 255,
int  thickness = 1,
bool  bAntiAlias = false 
)

Draws a circle into a CByteImage.

The function is safe, i.e. it checks for image boundaries. Circle points lying outside the image will not be drawn.

All types of CByteImage are supported (CByteImage::eGrayScale, CByteImage::eRGB24, CByteImage::eRGB24Split).

Parameters:
[out]pImageThe target image.
[in]mxThe x-coordinate of the center of the circle.
[in]myThe x-coordinate of the center of the circle.
[in]radiusThe radius of the circle.
[in]rThe red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]gThe green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]bThe blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]thicknessThis parameter specifies the thickness of the lines.
[in]bAntiAliasIf set to true, anti-aliasing will be applied for drawing.

Definition at line 417 of file PrimitivesDrawer.cpp.

void PrimitivesDrawer::DrawCircle ( CByteImage pImage,
const Vec2d center,
float  radius,
int  r = 255,
int  g = 255,
int  b = 255,
int  thickness = 1,
bool  bAntiAlias = false 
)

Draws a circle into a CByteImage.

The function is safe, i.e. it checks for image boundaries. Circle points lying outside the image will not be drawn.

All types of CByteImage are supported (CByteImage::eGrayScale, CByteImage::eRGB24, CByteImage::eRGB24Split).

Internally, the function PrimitivesDrawer::DrawCircle(CByteImage*, float, float, float, int, int, int, int, bool) is called.

Parameters:
[out]pImageThe target image.
[in]centerThe center of the circle.
[in]radiusThe radius of the circle.
[in]rThe red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]gThe green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]bThe blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]thicknessThis parameter specifies the thickness of the lines.
[in]bAntiAliasIf set to true, anti-aliasing will be applied for drawing.

Definition at line 539 of file PrimitivesDrawer.cpp.

void PrimitivesDrawer::DrawCircle ( CByteImage pImage,
const Circle2d circle,
int  r = 255,
int  g = 255,
int  b = 255,
int  thickness = 1,
bool  bAntiAlias = false 
)

Draws a circle into a CByteImage.

The function is safe, i.e. it checks for image boundaries. Circle points lying outside the image will not be drawn.

All types of CByteImage are supported (CByteImage::eGrayScale, CByteImage::eRGB24, CByteImage::eRGB24Split).

Internally, the function PrimitivesDrawer::DrawCircle(CByteImage*, float, float, float, int, int, int, int, bool) is called.

Parameters:
[out]pImageThe target image.
[in]circleThe circle representation.
[in]rThe red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]gThe green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]bThe blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]thicknessThis parameter specifies the thickness of the lines.
[in]bAntiAliasIf set to true, anti-aliasing will be applied for drawing.

Definition at line 544 of file PrimitivesDrawer.cpp.

void PrimitivesDrawer::DrawCross ( CByteImage pImage,
const Vec2d point,
int  length,
int  r,
int  g,
int  b 
)

Draws a small cross into a CByteImage.

The cross consists of two line segments (a vertical and a horizontal one) of same size intersecting each other in the center of the cross.

The function is safe, i.e. it checks for image boundaries. Points lying outside the image will not be drawn.

All types of CByteImage are supported (CByteImage::eGrayScale, CByteImage::eRGB24, CByteImage::eRGB24Split).

Parameters:
[out]pImageThe target image.
[in]pointThe center of the cross.
[in]lengthThe length of each of the two lines of the cross.
[in]rThe red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]gThe green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]bThe blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.

Definition at line 615 of file PrimitivesDrawer.cpp.

void PrimitivesDrawer::DrawEllipse ( CByteImage pImage,
const Ellipse2d ellipse,
int  r = 255,
int  g = 255,
int  b = 255,
int  thickness = 1 
)

Draws an ellipse into a CByteImage.

The function is safe, i.e. it checks for image boundaries. Ellipse points lying outside the image will not be drawn.

All types of CByteImage are supported (CByteImage::eGrayScale, CByteImage::eRGB24, CByteImage::eRGB24Split).

Parameters:
[out]pImageThe target image.
[in]ellipseThis parameter specifies the location, orientation and shape of the ellipse.
[in]rThe red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]gThe green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]bThe blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]thicknessThis parameter specifies the thickness of the lines.

Definition at line 990 of file PrimitivesDrawer.cpp.

void PrimitivesDrawer::DrawLine ( CByteImage pImage,
const PointPair2d line,
int  r = 255,
int  g = 255,
int  b = 255,
int  thickness = 1 
)

Draws a line segment into a CByteImage, given its two end points.

The function is safe, i.e. it checks for image boundaries. Line points lying outside the image will not be drawn.

All types of CByteImage are supported (CByteImage::eGrayScale, CByteImage::eRGB24, CByteImage::eRGB24Split).

Internally, the function DrawLine(CByteImage*, const Vec2d&, const Vec2d&, int, int, int, int) is called.

Parameters:
[out]pImageThe target image.
[in]lineThis parameter specifies the two end points of the straight line segment.
[in]rThe red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]gThe green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]bThe blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]thicknessThis parameter specifies the thickness of the line.

Definition at line 298 of file PrimitivesDrawer.cpp.

void PrimitivesDrawer::DrawLine ( CByteImage pImage,
const Vec2d p1,
const Vec2d p2,
int  r = 255,
int  g = 255,
int  b = 255,
int  thickness = 1 
)

Draws a line segment into a CByteImage, given its two end points.

The function is safe, i.e. it checks for image boundaries. Line points lying outside the image will not be drawn.

All types of CByteImage are supported (CByteImage::eGrayScale, CByteImage::eRGB24, CByteImage::eRGB24Split).

Parameters:
[out]pImageThe target image.
[in]p1The first end point of the straight line segment.
[in]p2The second end point of the straight line segment.
[in]rThe red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]gThe green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]bThe blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]thicknessThis parameter specifies the thickness of the line.

Definition at line 201 of file PrimitivesDrawer.cpp.

void PrimitivesDrawer::DrawLine ( CByteImage pImage,
const StraightLine2d line,
int  r,
int  g,
int  b,
int  thickness = 1 
)

Draws a line into a CByteImage, given its representation as StraightLine2d.

The function is safe, i.e. it checks for image boundaries. Line points lying outside the image will not be drawn.

All types of CByteImage are supported (CByteImage::eGrayScale, CByteImage::eRGB24, CByteImage::eRGB24Split).

Internally, the function PrimitivesDrawer::DrawLineNormal(CByteImage*, float, float, float, int, int, int) is called.

Parameters:
[out]pImageThe target image.
[in]lineThe line representation.
[in]rThe red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]gThe green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]bThe blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]thicknessThis parameter specifies the thickness of the line.

Definition at line 610 of file PrimitivesDrawer.cpp.

void PrimitivesDrawer::DrawLineNormal ( CByteImage pImage,
float  nx,
float  ny,
float  c,
int  r,
int  g,
int  b,
int  thickness = 1 
)

Draws a line into a CByteImage, given its parameters in normal form.

The equation of the straight line reads:

$c = x \cdot n_x + y \cdot n_y$

The function is safe, i.e. it checks for image boundaries. Line points lying outside the image will not be drawn.

All types of CByteImage are supported (CByteImage::eGrayScale, CByteImage::eRGB24, CByteImage::eRGB24Split).

Parameters:
[out]pImageThe target image.
[in]nxThe x-component of the normal vector.
[in]nyThe y-component of the normal vector.
[in]cIf nx and ny are normalized, this parameter specifies the distance of the straight line to the origin in pixels.
[in]rThe red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]gThe green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]bThe blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]thicknessThis parameter specifies the thickness of the line.

Definition at line 549 of file PrimitivesDrawer.cpp.

void PrimitivesDrawer::DrawLinePolar ( CByteImage pImage,
float  theta,
float  r,
int  color_r,
int  color_g,
int  color_b,
int  thickness = 1 
)

Draws a straight line into a CByteImage, given its parameters in polar form.

The equation of the straight line reads:

$r = x\cdot\cos\theta + y\cdot\sin\theta$.

The function is safe, i.e. it checks for image boundaries. Line points lying outside the image will not be drawn.

All types of CByteImage are supported (CByteImage::eGrayScale, CByteImage::eRGB24, CByteImage::eRGB24Split).

Internally, the function PrimitivesDrawer::DrawLineNormal(CByteImage*, float, float, float, int, int, int) is called.

Parameters:
[out]pImageThe target image.
[in]thetaThe angle of the normal to the line in radians. theta = 0.0f draws a vertical line.
[in]rThe distance of the straight line to the origin in pixels.
[in]color_rThe red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]color_gThe green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]color_bThe blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]thicknessThis parameter specifies the thickness of the line.

Definition at line 605 of file PrimitivesDrawer.cpp.

void PrimitivesDrawer::DrawPoint ( CByteImage pImage,
const Vec2d point,
int  r = 255,
int  g = 255,
int  b = 255 
)

Draws a point into a CByteImage.

The function is safe, i.e. it checks for image boundaries. If the point is outside the image, this function returns.

All types of CByteImage are supported (CByteImage::eGrayScale, CByteImage::eRGB24, CByteImage::eRGB24Split).

Parameters:
[out]pImageThe target image.
[in]pointThe location of the point to be drawn.
[in]rThe red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]gThe green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]bThe blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.

Definition at line 82 of file PrimitivesDrawer.cpp.

void PrimitivesDrawer::DrawPoint ( CByteImage pImage,
int  x,
int  y,
int  r = 255,
int  g = 255,
int  b = 255 
)

Draws a point into a CByteImage.

The function is safe, i.e. it checks for image boundaries. If the point is outside the image, this function returns.

All types of CByteImage are supported (CByteImage::eGrayScale, CByteImage::eRGB24, CByteImage::eRGB24Split).

Parameters:
[out]pImageThe target image.
[in]xThe x-coordinate of the point to be drawn.
[in]yThe y-coordinate of the point to be drawn.
[in]rThe red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]gThe green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]bThe blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.

Definition at line 87 of file PrimitivesDrawer.cpp.

void PrimitivesDrawer::DrawPointBlended ( CByteImage pImage,
const Vec2d point,
int  r = 255,
int  g = 255,
int  b = 255,
float  blend = 1.0f 
)

Draws a point into a CByteImage, with blending.

The function is safe, i.e. it checks for image boundaries. If the point is outside the image, this function returns.

All types of CByteImage are supported (CByteImage::eGrayScale, CByteImage::eRGB24, CByteImage::eRGB24Split).

Parameters:
[out]pImageThe target image.
[in]pointThe location of the point to be drawn.
[in]rThe red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]gThe green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]bThe blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]blendThe parameter for adjusting the amount of blending. It must be 0.0f <= blend <= 1.0f. blend = 1.0f means that no transparency will be applied.

Definition at line 116 of file PrimitivesDrawer.cpp.

void PrimitivesDrawer::DrawPointBlended ( CByteImage pImage,
int  x,
int  y,
int  r = 255,
int  g = 255,
int  b = 255,
float  blend = 1.0f 
)

Draws a point into a CByteImage, with blending.

The function is safe, i.e. it checks for image boundaries. If the point is outside the image, this function returns.

All types of CByteImage are supported (CByteImage::eGrayScale, CByteImage::eRGB24, CByteImage::eRGB24Split).

Parameters:
[out]pImageThe target image.
[in]xThe x-coordinate of the point to be drawn.
[in]yThe y-coordinate of the point to be drawn.
[in]rThe red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]gThe green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]bThe blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]blendThe parameter for adjusting the amount of blending. It must be 0.0f <= blend <= 1.0f. blend = 1.0f means that no transparency will be applied.

Definition at line 121 of file PrimitivesDrawer.cpp.

void PrimitivesDrawer::DrawPoints ( CByteImage pImage,
const CVec2dArray points,
int  r = 255,
int  g = 255,
int  b = 255 
)

Draws a list of points of type CVec2dArray into a CByteImage.

The function is safe, i.e. it checks for image boundaries. If the point is outside the image, this function returns.

All types of CByteImage are supported (CByteImage::eGrayScale, CByteImage::eRGB24, CByteImage::eRGB24Split).

Parameters:
[out]pImageThe target image.
[in]pointsThe list of type CVec2dArray, containing the points to be drawn.
[in]rThe red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]gThe green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]bThe blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.

Definition at line 170 of file PrimitivesDrawer.cpp.

void PrimitivesDrawer::DrawPolygon ( CByteImage pImage,
const Vec2d pPoints,
int  nPoints,
int  r,
int  g,
int  b,
int  thickness = 1 
)

Draws a polygon into a CByteImage.

The provided points must build a polygon in the given order.

The function is safe, i.e. it checks for image boundaries. Polygon points lying outside the image will not be drawn.

All types of CByteImage are supported (CByteImage::eGrayScale, CByteImage::eRGB24, CByteImage::eRGB24Split).

Parameters:
[out]pImageThe target image.
[in]pPointsAn array of points containing the points of the polygon in order.
[in]nPointsThe number of points. Must be >= 3.
[in]rThe red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]gThe green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]bThe blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]thicknessThis parameter specifies the thickness of the lines. The polygon will be closed if the first and last point are not equal. If set to -1 the polygon is filled, otherwise must be >= 1.

Definition at line 954 of file PrimitivesDrawer.cpp.

void PrimitivesDrawer::DrawPolygon ( CByteImage pImage,
const CVec2dArray points,
int  r,
int  g,
int  b,
int  thickness = 1 
)

Draws a polygon into a CByteImage.

The provided points must build a polygon in the given order.

The function is safe, i.e. it checks for image boundaries. Polygon points lying outside the image will not be drawn.

All types of CByteImage are supported (CByteImage::eGrayScale, CByteImage::eRGB24, CByteImage::eRGB24Split).

This is a convenience function calling DrawPolygon(CByteImage*, const Vec2d*, int, int, int, int, int);

Parameters:
[out]pImageThe target image.
[in]pointsThe list of points containing the points of the polygon in order.
[in]rThe red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]gThe green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]bThe blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]thicknessThis parameter specifies the thickness of the lines. The polygon will be closed if the first and last point are not equal. If set to -1 the polygon is filled, otherwise must be >= 1.

Definition at line 976 of file PrimitivesDrawer.cpp.

void PrimitivesDrawer::DrawRectangle ( CByteImage pImage,
const Rectangle2d rectangle,
int  r,
int  g,
int  b,
int  thickness = 1 
)

Draws a rectangle into a CByteImage.

The function is safe, i.e. it checks for image boundaries. Polygon points lying outside the image will not be drawn.

All types of CByteImage are supported (CByteImage::eGrayScale, CByteImage::eRGB24, CByteImage::eRGB24Split).

Parameters:
[out]pImageThe target image.
[in]rectangleThe rectangle representation.
[in]rThe red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]gThe green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]bThe blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]thicknessThis parameter specifies the thickness of the lines. The polygon will be closed if the first and last point are not equal. If set to -1 the polygon is filled, otherwise must be >= 1.

Definition at line 1096 of file PrimitivesDrawer.cpp.

void PrimitivesDrawer::DrawRegion ( CByteImage pImage,
const MyRegion region,
int  r = 255,
int  g = 255,
int  b = 255,
int  thickness = 1 
)

Draws a rectangle into a CByteImage.

The function is safe, i.e. it checks for image boundaries. Rectangle points lying outside the image will not be drawn.

All types of CByteImage are supported (CByteImage::eGrayScale, CByteImage::eRGB24, CByteImage::eRGB24Split).

Parameters:
[out]pImageThe target image.
[in]regionThis parameter specifies the location and size of the rectangle.
[in]rThe red component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]gThe green component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]bThe blue component (RGB) of the color to be used for drawing. It must be 0 <= r <= 255.
[in]thicknessThis parameter specifies the thickness of the lines.

Definition at line 179 of file PrimitivesDrawer.cpp.



asr_ivt
Author(s): Allgeyer Tobias, Hutmacher Robin, Kleinert Daniel, Meißner Pascal, Scholz Jonas, Stöckle Patrick
autogenerated on Thu Jun 6 2019 21:46:59