eVision C++ API 26.10.0-beta.2.dev
Loading...
Searching...
No Matches
eVision::EWindowsDrawAdapter Class Reference

A draw adapter using the GDI+ native API on Windows. This class is only usable on Windows and all its methods will throw NotImplemented errors if used on another platform. More...

#include <eVision/Easy/EWindowsDrawAdapter.h>

Inheritance diagram for eVision::EWindowsDrawAdapter:
Collaboration diagram for eVision::EWindowsDrawAdapter:

Public Member Functions

 EWindowsDrawAdapter (HDC dc)
 Creates an EWindowsDrawAdapter either by providing a drawing context or an image.
 EWindowsDrawAdapter (eVision::EImageBW8 *pImage)
 Creates an EWindowsDrawAdapter either by providing a drawing context or an image.
 EWindowsDrawAdapter (eVision::EImageC24 *pImage)
 Creates an EWindowsDrawAdapter either by providing a drawing context or an image.
virtual ~EWindowsDrawAdapter () throw ()
virtual void DrawPoint (int32_t x1, int32_t y1, eVision::EPen pen)
 Draws a point at the given coordinate.
virtual void DrawPoint (int32_t x1, int32_t y1)
 Draws a point at the given coordinate.
virtual void Line (int32_t x1, int32_t y1, int32_t x2, int32_t y2, eVision::EPen pen)
 Draws a line between two points.
virtual void Line (int32_t x1, int32_t y1, int32_t x2, int32_t y2)
 Draws a line between two points.
virtual void Arc (int32_t orgX, int32_t orgY, int32_t width, int32_t height, float startAngle, float amplitude, eVision::EPen pen)
 Draws an arc defined by a rectangle, angle, and amplitude.
virtual void Arc (int32_t orgX, int32_t orgY, int32_t width, int32_t height, float startAngle, float amplitude)
 Draws an arc defined by a rectangle, angle, and amplitude.
virtual void Rectangle (int32_t orgX, int32_t orgY, int32_t width, int32_t height, eVision::EPen pen)
 Draws a rectangle.
virtual void Rectangle (int32_t orgX, int32_t orgY, int32_t width, int32_t height)
 Draws a rectangle.
virtual void Polygon (const std::vector< eVision::EPoint > &points, eVision::EPen pen)
 Draws a polygon.
virtual void Polygon (const std::vector< eVision::EPoint > &points)
 Draws a polygon.
virtual void Ellipse (int32_t orgX, int32_t orgY, int32_t width, int32_t height, eVision::EPen pen)
 Draws an ellipse.
virtual void Ellipse (int32_t orgX, int32_t orgY, int32_t width, int32_t height)
 Draws an ellipse.
virtual void FilledRectangle (int32_t orgX, int32_t orgY, int32_t width, int32_t height, eVision::EPen pen, eVision::EBrush brush)
 Fills a rectangle.
virtual void FilledRectangle (int32_t orgX, int32_t orgY, int32_t width, int32_t height, eVision::EPen pen)
 Fills a rectangle.
virtual void FilledRectangle (int32_t orgX, int32_t orgY, int32_t width, int32_t height)
 Fills a rectangle.
virtual void FilledEllipse (int32_t orgX, int32_t orgY, int32_t width, int32_t height, eVision::EPen pen, eVision::EBrush brush)
 Fills an ellipse.
virtual void FilledEllipse (int32_t orgX, int32_t orgY, int32_t width, int32_t height, eVision::EPen pen)
 Fills an ellipse.
virtual void FilledEllipse (int32_t orgX, int32_t orgY, int32_t width, int32_t height)
 Fills an ellipse.
virtual void FilledPolygon (const std::vector< eVision::EPoint > &points, eVision::EPen pen, eVision::EBrush brush)
 Fills a polygon.
virtual void FilledPolygon (const std::vector< eVision::EPoint > &points, eVision::EPen pen)
 Fills a polygon.
virtual void FilledPolygon (const std::vector< eVision::EPoint > &points)
 Fills a polygon.
virtual void Text (const std::string &text, int32_t x, int32_t y, float orientation, eVision::EBrush textBrush, eVision::ETextSizeConstraint constraint)
 Draws a text.
virtual void Text (const std::string &text, int32_t x, int32_t y, float orientation, eVision::EBrush textBrush)
 Draws a text.
virtual void Text (const std::string &text, int32_t x, int32_t y, float orientation)
 Draws a text.
virtual void BackedText (const std::string &text, int32_t x, int32_t y, float orientation, eVision::EBrush textBrush, eVision::EBrush backgroundBrush, eVision::ETextSizeConstraint constraint)
 Draws a text with a background.
virtual void BackedText (const std::string &text, int32_t x, int32_t y, float orientation, eVision::EBrush textBrush, eVision::EBrush backgroundBrush)
 Draws a text with a background.
virtual void BackedText (const std::string &text, int32_t x, int32_t y, float orientation, eVision::EBrush textBrush)
 Draws a text with a background.
virtual void BackedText (const std::string &text, int32_t x, int32_t y, float orientation)
 Draws a text with a background.
virtual void Image (const eVision::EBaseROI &image, float orgX, float orgY, float width, float height)
 Draws an image.
virtual void Image (const eVision::EROIBW8 &image, eVision::EC24Vector *pColorScale, float orgX, float orgY, float width, float height)
 Draws an image.
virtual void Image (const eVision::EROIBW8 &image, eVision::EBW8Vector *pColorScale, float orgX, float orgY, float width, float height)
 Draws an image.
virtual eVision::EPoint GetTextSize (const std::string &text)
 Size of the given text using the default font (EWindowsDrawAdapter::SetFont).
virtual void UseCurrentPen ()
 Uses the current GDI pen.
virtual void UseCurrentBrush ()
 Use the current pen set in the drawing framework.
virtual void SetPen (const eVision::EPen &pen)
 Default pen.
virtual void SetBrush (const eVision::EBrush &brush)
 Default brush.
virtual void SetFont (const eVision::EFont &font)
 Default font.
HDC GetHDC ()
 Gets the HDC associated with this instance of EWindowsDrawAdapter.
void Close ()
 Closes the attached drawing context, if the current instance was initialized from an image.
virtual int32_t ComputeTextSize (const std::string &text, int32_t desiredWidth)
 Computes text size for given constraint. Constraint is the desired total width of the text to draw.
 EWindowsDrawAdapter (CppWrapperInternal::InternalConstructor)
Public Member Functions inherited from eVision::EDrawAdapter
virtual ~EDrawAdapter () throw ()
virtual void Polygon (const eVision::EPolygon &polygon, eVision::EPen pen)
 Draws a polygon.
virtual void Polygon (const eVision::EPolygon &polygon)
 Draws a polygon.
void Ellipse (const eVision::EEllipse &ellipse, eVision::EPen pen)
 Draws an ellipse.
void Ellipse (const eVision::EEllipse &ellipse)
 Draws an ellipse.
virtual void RotatedEllipse (float centerX, float centerY, float radianAngle, float longAxis, float shortAxis, bool drawDiagonals, eVision::EPen pen)
 Draws a rotated ellipse.
virtual void RotatedEllipse (float centerX, float centerY, float radianAngle, float longAxis, float shortAxis, bool drawDiagonals)
 Draws a rotated ellipse.
void RotatedEllipse (const eVision::EEllipse &ellipse, bool drawDiagonals, eVision::EPen pen)
 Draws a rotated ellipse.
void RotatedEllipse (const eVision::EEllipse &ellipse, bool drawDiagonals)
 Draws a rotated ellipse.
void FilledEllipse (const eVision::EEllipse &ellipse, eVision::EPen pen, eVision::EBrush brush)
 Fills an ellipse.
void FilledEllipse (const eVision::EEllipse &ellipse, eVision::EPen pen)
 Fills an ellipse.
void FilledEllipse (const eVision::EEllipse &ellipse)
 Fills an ellipse.
virtual void FilledRotatedEllipse (float centerX, float centerY, float radianAngle, float longAxis, float shortAxis, eVision::EPen pen, eVision::EBrush brush)
 Fills a rotated ellipse.
virtual void FilledRotatedEllipse (float centerX, float centerY, float radianAngle, float longAxis, float shortAxis, eVision::EPen pen)
 Fills a rotated ellipse.
virtual void FilledRotatedEllipse (float centerX, float centerY, float radianAngle, float longAxis, float shortAxis)
 Fills a rotated ellipse.
void FilledRotatedEllipse (const eVision::EEllipse &ellipse, eVision::EPen pen, eVision::EBrush brush)
 Fills a rotated ellipse.
void FilledRotatedEllipse (const eVision::EEllipse &ellipse, eVision::EPen pen)
 Fills a rotated ellipse.
void FilledRotatedEllipse (const eVision::EEllipse &ellipse)
 Fills a rotated ellipse.
virtual void FilledPolygon (const eVision::EPolygon &polygon, eVision::EPen pen, eVision::EBrush brush)
 Fills a polygon.
virtual void FilledPolygon (const eVision::EPolygon &polygon, eVision::EPen pen)
 Fills a polygon.
virtual void FilledPolygon (const eVision::EPolygon &polygon)
 Fills a polygon.
virtual void Text (const std::string &text, int32_t x, int32_t y, eVision::EBrush textBrush, eVision::ETextSizeConstraint constraint)
 Draws a text.
virtual void Text (const std::string &text, int32_t x, int32_t y, eVision::EBrush textBrush)
 Draws a text.
virtual void Text (const std::string &text, int32_t x, int32_t y)
 Draws a text.
virtual void BackedText (const std::string &text, int32_t x, int32_t y, eVision::EBrush textBrush, eVision::EBrush backgroundBrush, eVision::ETextSizeConstraint constraint)
 Draws a text with a background.
virtual void BackedText (const std::string &text, int32_t x, int32_t y, eVision::EBrush textBrush, eVision::EBrush backgroundBrush)
 Draws a text with a background.
virtual void BackedText (const std::string &text, int32_t x, int32_t y, eVision::EBrush textBrush)
 Draws a text with a background.
virtual void BackedText (const std::string &text, int32_t x, int32_t y)
 Draws a text with a background.
virtual void Image (const eVision::EBaseROI &image)
 Draws an image.
virtual void Image (const eVision::EROIBW8 &image, eVision::EBW8Vector *pColorScale)
 Draws an image.
virtual void Image (const eVision::EROIBW8 &image, eVision::EC24Vector *pColorScale)
 Draws an image.
virtual void DrawMask (const eVision::EBaseROI &mask, const eVision::EBrush &brush)
 Draws a mask with a brush.
virtual void DrawMask (const eVision::EBaseROI &mask)
 Draws a mask with a brush.
virtual void DrawMask (const eVision::EBaseROI &mask, float orgX, float orgY, float width, float height, const eVision::EBrush &brush)
 Draws a mask with a brush.
virtual void DrawMask (const eVision::EBaseROI &mask, float orgX, float orgY, float width, float height)
 Draws a mask with a brush.
virtual eVision::EPen GetPen () const
 Default pen.
virtual eVision::EBrush GetBrush () const
 Default brush.
virtual eVision::EFont GetFont () const
 Default font.
 EDrawAdapter (CppWrapperInternal::InternalConstructor)

Additional Inherited Members

Public Attributes inherited from eVision::EDrawAdapter
CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

A draw adapter using the GDI+ native API on Windows. This class is only usable on Windows and all its methods will throw NotImplemented errors if used on another platform.

It is recommended to call EWindowsDrawAdapter::Close after using this class.

License(s): None

Constructor & Destructor Documentation

◆ EWindowsDrawAdapter() [1/4]

eVision::EWindowsDrawAdapter::EWindowsDrawAdapter ( HDC dc)

Creates an EWindowsDrawAdapter either by providing a drawing context or an image.

If a drawing context is provided EWindowsDrawAdapter will forward all drawing commands to that drawing context.

If an image is provided a drawing context will be initialized on that image and that drawing context will be closed either on destruction of the EWindowsDrawAdapter or when the EWindowsDrawAdapter::Close method is called.

Parameters
dcThe Windows API drawing context.

◆ EWindowsDrawAdapter() [2/4]

eVision::EWindowsDrawAdapter::EWindowsDrawAdapter ( eVision::EImageBW8 * pImage)

Creates an EWindowsDrawAdapter either by providing a drawing context or an image.

If a drawing context is provided EWindowsDrawAdapter will forward all drawing commands to that drawing context.

If an image is provided a drawing context will be initialized on that image and that drawing context will be closed either on destruction of the EWindowsDrawAdapter or when the EWindowsDrawAdapter::Close method is called.

Parameters
pImageAn image to draw to.

◆ EWindowsDrawAdapter() [3/4]

eVision::EWindowsDrawAdapter::EWindowsDrawAdapter ( eVision::EImageC24 * pImage)

Creates an EWindowsDrawAdapter either by providing a drawing context or an image.

If a drawing context is provided EWindowsDrawAdapter will forward all drawing commands to that drawing context.

If an image is provided a drawing context will be initialized on that image and that drawing context will be closed either on destruction of the EWindowsDrawAdapter or when the EWindowsDrawAdapter::Close method is called.

Parameters
pImageAn image to draw to.

◆ ~EWindowsDrawAdapter()

eVision::EWindowsDrawAdapter::~EWindowsDrawAdapter ( )
throw ( )
virtual

◆ EWindowsDrawAdapter() [4/4]

eVision::EWindowsDrawAdapter::EWindowsDrawAdapter ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ Arc() [1/2]

void eVision::EWindowsDrawAdapter::Arc ( int32_t orgX,
int32_t orgY,
int32_t width,
int32_t height,
float startAngle,
float amplitude )
virtual

Draws an arc defined by a rectangle, angle, and amplitude.

Parameters
orgXX origin of the rectangle
orgYY origin of the rectangle
widthWidth of the rectangle
heightHeight of the rectangle
startAngleStarting angle of the arc in radians
amplitudeAmplitude of the arc in radians

Implements eVision::EDrawAdapter.

◆ Arc() [2/2]

void eVision::EWindowsDrawAdapter::Arc ( int32_t orgX,
int32_t orgY,
int32_t width,
int32_t height,
float startAngle,
float amplitude,
eVision::EPen pen )
virtual

Draws an arc defined by a rectangle, angle, and amplitude.

Parameters
orgXX origin of the rectangle
orgYY origin of the rectangle
widthWidth of the rectangle
heightHeight of the rectangle
startAngleStarting angle of the arc in radians
amplitudeAmplitude of the arc in radians
penOptional pen to use

Implements eVision::EDrawAdapter.

◆ BackedText() [1/4]

void eVision::EWindowsDrawAdapter::BackedText ( const std::string & text,
int32_t x,
int32_t y,
float orientation )
virtual

Draws a text with a background.

Parameters
textText to draw.
xX position of the text.
yY position of the text.
orientationOrientation of the text in radians.

If desiredWidth is greater than 0, current font size will be ignored and a new one will be temporally set so that the whole drawn text fills in desiredWidth pixels.

Implements eVision::EDrawAdapter.

◆ BackedText() [2/4]

void eVision::EWindowsDrawAdapter::BackedText ( const std::string & text,
int32_t x,
int32_t y,
float orientation,
eVision::EBrush textBrush )
virtual

Draws a text with a background.

Parameters
textText to draw.
xX position of the text.
yY position of the text.
orientationOrientation of the text in radians.
textBrushOptional brush to use for the color of the text.

If desiredWidth is greater than 0, current font size will be ignored and a new one will be temporally set so that the whole drawn text fills in desiredWidth pixels.

Implements eVision::EDrawAdapter.

◆ BackedText() [3/4]

void eVision::EWindowsDrawAdapter::BackedText ( const std::string & text,
int32_t x,
int32_t y,
float orientation,
eVision::EBrush textBrush,
eVision::EBrush backgroundBrush )
virtual

Draws a text with a background.

Parameters
textText to draw.
xX position of the text.
yY position of the text.
orientationOrientation of the text in radians.
textBrushOptional brush to use for the color of the text.
backgroundBrushOptional brush to use for the background.

If desiredWidth is greater than 0, current font size will be ignored and a new one will be temporally set so that the whole drawn text fills in desiredWidth pixels.

Implements eVision::EDrawAdapter.

◆ BackedText() [4/4]

void eVision::EWindowsDrawAdapter::BackedText ( const std::string & text,
int32_t x,
int32_t y,
float orientation,
eVision::EBrush textBrush,
eVision::EBrush backgroundBrush,
eVision::ETextSizeConstraint constraint )
virtual

Draws a text with a background.

Parameters
textText to draw.
xX position of the text.
yY position of the text.
orientationOrientation of the text in radians.
textBrushOptional brush to use for the color of the text.
backgroundBrushOptional brush to use for the background.
constraintText size constraint. By default, no constraint is to be applied.

If desiredWidth is greater than 0, current font size will be ignored and a new one will be temporally set so that the whole drawn text fills in desiredWidth pixels.

Implements eVision::EDrawAdapter.

◆ Close()

void eVision::EWindowsDrawAdapter::Close ( )

Closes the attached drawing context, if the current instance was initialized from an image.

This is method is always called implicitly during the destruction of the current object. It is still recommended to call it explicitly when using non-C++ programming languages to ensure all ressources are properly released.

This method never throws exceptions.

◆ ComputeTextSize()

int32_t eVision::EWindowsDrawAdapter::ComputeTextSize ( const std::string & text,
int32_t desiredWidth )
virtual

Computes text size for given constraint. Constraint is the desired total width of the text to draw.

Parameters
textText to measure before drawing.
desiredWidthWidth constraint.

Reimplemented from eVision::EDrawAdapter.

◆ DrawPoint() [1/2]

void eVision::EWindowsDrawAdapter::DrawPoint ( int32_t x1,
int32_t y1 )
virtual

Draws a point at the given coordinate.

Parameters
x1X coordinate
y1Y coordinate

Implements eVision::EDrawAdapter.

◆ DrawPoint() [2/2]

void eVision::EWindowsDrawAdapter::DrawPoint ( int32_t x1,
int32_t y1,
eVision::EPen pen )
virtual

Draws a point at the given coordinate.

Parameters
x1X coordinate
y1Y coordinate
penOptional pen to use

Implements eVision::EDrawAdapter.

◆ Ellipse() [1/2]

void eVision::EWindowsDrawAdapter::Ellipse ( int32_t orgX,
int32_t orgY,
int32_t width,
int32_t height )
virtual

Draws an ellipse.

Parameters
orgXX origin of the rectangle containing the ellipse
orgYY origin of the rectangle containing the ellipse
widthWidth of the rectangle containing the ellipse
heightHeight of the rectangle containing the ellipse

This method only draws axis-aligned ellipses, if the given ellipse has an angle, it is ignored. To draw rotated ellipses, use EDrawAdapter::RotatedEllipse instead. An ellipse with full angular amplitude is always drawn.

Implements eVision::EDrawAdapter.

◆ Ellipse() [2/2]

void eVision::EWindowsDrawAdapter::Ellipse ( int32_t orgX,
int32_t orgY,
int32_t width,
int32_t height,
eVision::EPen pen )
virtual

Draws an ellipse.

Parameters
orgXX origin of the rectangle containing the ellipse
orgYY origin of the rectangle containing the ellipse
widthWidth of the rectangle containing the ellipse
heightHeight of the rectangle containing the ellipse
penOptional pen to use

This method only draws axis-aligned ellipses, if the given ellipse has an angle, it is ignored. To draw rotated ellipses, use EDrawAdapter::RotatedEllipse instead. An ellipse with full angular amplitude is always drawn.

Implements eVision::EDrawAdapter.

◆ FilledEllipse() [1/3]

void eVision::EWindowsDrawAdapter::FilledEllipse ( int32_t orgX,
int32_t orgY,
int32_t width,
int32_t height )
virtual

Fills an ellipse.

Parameters
orgXX origin of the rectangle containing the ellipse
orgYY origin of the rectangle containing the ellipse
widthWidth of the rectangle containing the ellipse
heightHeight of the rectangle containing the ellipse

This method only draws axis-aligned ellipses, if the given ellipse has an angle, it is ignored. To draw filled and rotated ellipses, use EDrawAdapter::FilledRotatedEllipse instead. An ellipse with full angular amplitude is always drawn.

Implements eVision::EDrawAdapter.

◆ FilledEllipse() [2/3]

void eVision::EWindowsDrawAdapter::FilledEllipse ( int32_t orgX,
int32_t orgY,
int32_t width,
int32_t height,
eVision::EPen pen )
virtual

Fills an ellipse.

Parameters
orgXX origin of the rectangle containing the ellipse
orgYY origin of the rectangle containing the ellipse
widthWidth of the rectangle containing the ellipse
heightHeight of the rectangle containing the ellipse
penOptional pen to use for drawing the contour of the ellipse

This method only draws axis-aligned ellipses, if the given ellipse has an angle, it is ignored. To draw filled and rotated ellipses, use EDrawAdapter::FilledRotatedEllipse instead. An ellipse with full angular amplitude is always drawn.

Implements eVision::EDrawAdapter.

◆ FilledEllipse() [3/3]

void eVision::EWindowsDrawAdapter::FilledEllipse ( int32_t orgX,
int32_t orgY,
int32_t width,
int32_t height,
eVision::EPen pen,
eVision::EBrush brush )
virtual

Fills an ellipse.

Parameters
orgXX origin of the rectangle containing the ellipse
orgYY origin of the rectangle containing the ellipse
widthWidth of the rectangle containing the ellipse
heightHeight of the rectangle containing the ellipse
penOptional pen to use for drawing the contour of the ellipse
brushOptional pen to use for drawing the inside of the ellipse

This method only draws axis-aligned ellipses, if the given ellipse has an angle, it is ignored. To draw filled and rotated ellipses, use EDrawAdapter::FilledRotatedEllipse instead. An ellipse with full angular amplitude is always drawn.

Implements eVision::EDrawAdapter.

◆ FilledPolygon() [1/3]

void eVision::EWindowsDrawAdapter::FilledPolygon ( const std::vector< eVision::EPoint > & points)
virtual

Fills a polygon.

Parameters
pointsPoints of the polygon

Implements eVision::EDrawAdapter.

◆ FilledPolygon() [2/3]

void eVision::EWindowsDrawAdapter::FilledPolygon ( const std::vector< eVision::EPoint > & points,
eVision::EPen pen )
virtual

Fills a polygon.

Parameters
pointsPoints of the polygon
penOptional pen to use for drawing the contour of the polygon

Implements eVision::EDrawAdapter.

◆ FilledPolygon() [3/3]

void eVision::EWindowsDrawAdapter::FilledPolygon ( const std::vector< eVision::EPoint > & points,
eVision::EPen pen,
eVision::EBrush brush )
virtual

Fills a polygon.

Parameters
pointsPoints of the polygon
penOptional pen to use for drawing the contour of the polygon
brushOptional pen to use for drawing the inside of the polygon

Implements eVision::EDrawAdapter.

◆ FilledRectangle() [1/3]

void eVision::EWindowsDrawAdapter::FilledRectangle ( int32_t orgX,
int32_t orgY,
int32_t width,
int32_t height )
virtual

Fills a rectangle.

Parameters
orgXX origin of the rectangle
orgYY origin of the rectangle
widthWidth of the rectangle
heightHeight of the rectangle

Implements eVision::EDrawAdapter.

◆ FilledRectangle() [2/3]

void eVision::EWindowsDrawAdapter::FilledRectangle ( int32_t orgX,
int32_t orgY,
int32_t width,
int32_t height,
eVision::EPen pen )
virtual

Fills a rectangle.

Parameters
orgXX origin of the rectangle
orgYY origin of the rectangle
widthWidth of the rectangle
heightHeight of the rectangle
penOptional pen to use for drawing the contour of the rectangle

Implements eVision::EDrawAdapter.

◆ FilledRectangle() [3/3]

void eVision::EWindowsDrawAdapter::FilledRectangle ( int32_t orgX,
int32_t orgY,
int32_t width,
int32_t height,
eVision::EPen pen,
eVision::EBrush brush )
virtual

Fills a rectangle.

Parameters
orgXX origin of the rectangle
orgYY origin of the rectangle
widthWidth of the rectangle
heightHeight of the rectangle
penOptional pen to use for drawing the contour of the rectangle
brushOptional brush to use for filling the inside of the rectangle

Implements eVision::EDrawAdapter.

◆ GetHDC()

HDC eVision::EWindowsDrawAdapter::GetHDC ( )

Gets the HDC associated with this instance of EWindowsDrawAdapter.

◆ GetTextSize()

eVision::EPoint eVision::EWindowsDrawAdapter::GetTextSize ( const std::string & text)
virtual

Size of the given text using the default font (EWindowsDrawAdapter::SetFont).

Parameters
textText

Implements eVision::EDrawAdapter.

◆ Image() [1/3]

void eVision::EWindowsDrawAdapter::Image ( const eVision::EBaseROI & image,
float orgX,
float orgY,
float width,
float height )
virtual

Draws an image.

Parameters
imageImage.
orgXX coordinate of the point where to draw the image.
orgYY coordinate of the point where to draw the image.
widthWidth of the destination rectangle in which to draw the image.
heightHeight of the destination rectangle in which to draw the image.

Implements eVision::EDrawAdapter.

◆ Image() [2/3]

void eVision::EWindowsDrawAdapter::Image ( const eVision::EROIBW8 & image,
eVision::EBW8Vector * pColorScale,
float orgX,
float orgY,
float width,
float height )
virtual

Draws an image.

Parameters
imageImage.
pColorScaleColor scale to draw a grayscale image with.
orgXX coordinate of the point where to draw the image.
orgYY coordinate of the point where to draw the image.
widthWidth of the destination rectangle in which to draw the image.
heightHeight of the destination rectangle in which to draw the image.

Implements eVision::EDrawAdapter.

◆ Image() [3/3]

void eVision::EWindowsDrawAdapter::Image ( const eVision::EROIBW8 & image,
eVision::EC24Vector * pColorScale,
float orgX,
float orgY,
float width,
float height )
virtual

Draws an image.

Parameters
imageImage.
pColorScaleColor scale to draw a grayscale image with.
orgXX coordinate of the point where to draw the image.
orgYY coordinate of the point where to draw the image.
widthWidth of the destination rectangle in which to draw the image.
heightHeight of the destination rectangle in which to draw the image.

Implements eVision::EDrawAdapter.

◆ Line() [1/2]

void eVision::EWindowsDrawAdapter::Line ( int32_t x1,
int32_t y1,
int32_t x2,
int32_t y2 )
virtual

Draws a line between two points.

Parameters
x1X coordinate of line origin point
y1Y coordinate of line origin point
x2X coordinate of line end point
y2Y coordinate of line end point

Implements eVision::EDrawAdapter.

◆ Line() [2/2]

void eVision::EWindowsDrawAdapter::Line ( int32_t x1,
int32_t y1,
int32_t x2,
int32_t y2,
eVision::EPen pen )
virtual

Draws a line between two points.

Parameters
x1X coordinate of line origin point
y1Y coordinate of line origin point
x2X coordinate of line end point
y2Y coordinate of line end point
penOptional pen to use

Implements eVision::EDrawAdapter.

◆ Polygon() [1/2]

void eVision::EWindowsDrawAdapter::Polygon ( const std::vector< eVision::EPoint > & points)
virtual

Draws a polygon.

Parameters
pointsPoints of the polygon

Implements eVision::EDrawAdapter.

◆ Polygon() [2/2]

void eVision::EWindowsDrawAdapter::Polygon ( const std::vector< eVision::EPoint > & points,
eVision::EPen pen )
virtual

Draws a polygon.

Parameters
pointsPoints of the polygon
penOptional pen to use

Implements eVision::EDrawAdapter.

◆ Rectangle() [1/2]

void eVision::EWindowsDrawAdapter::Rectangle ( int32_t orgX,
int32_t orgY,
int32_t width,
int32_t height )
virtual

Draws a rectangle.

Parameters
orgXX origin of the rectangle
orgYY origin of the rectangle
widthWidth of the rectangle
heightHeight of the rectangle

Implements eVision::EDrawAdapter.

◆ Rectangle() [2/2]

void eVision::EWindowsDrawAdapter::Rectangle ( int32_t orgX,
int32_t orgY,
int32_t width,
int32_t height,
eVision::EPen pen )
virtual

Draws a rectangle.

Parameters
orgXX origin of the rectangle
orgYY origin of the rectangle
widthWidth of the rectangle
heightHeight of the rectangle
penOptional pen to use

Implements eVision::EDrawAdapter.

◆ SetBrush()

void eVision::EWindowsDrawAdapter::SetBrush ( const eVision::EBrush & brush)
virtual

Default brush.

Parameters
brushBrush.

Reimplemented from eVision::EDrawAdapter.

◆ SetFont()

void eVision::EWindowsDrawAdapter::SetFont ( const eVision::EFont & font)
virtual

Default font.

Parameters
fontFont.

Reimplemented from eVision::EDrawAdapter.

◆ SetPen()

void eVision::EWindowsDrawAdapter::SetPen ( const eVision::EPen & pen)
virtual

Default pen.

Parameters
penPen.

Reimplemented from eVision::EDrawAdapter.

◆ Text() [1/3]

void eVision::EWindowsDrawAdapter::Text ( const std::string & text,
int32_t x,
int32_t y,
float orientation )
virtual

Draws a text.

Parameters
textText to draw.
xX position of the text.
yY position of the text.
orientationOrientation of the text in radians.

If desiredWidth is greater than 0, current font size will be ignored and a new one will be temporally set so that the whole drawn text fills in desiredWidth pixels.

Implements eVision::EDrawAdapter.

◆ Text() [2/3]

void eVision::EWindowsDrawAdapter::Text ( const std::string & text,
int32_t x,
int32_t y,
float orientation,
eVision::EBrush textBrush )
virtual

Draws a text.

Parameters
textText to draw.
xX position of the text.
yY position of the text.
orientationOrientation of the text in radians.
textBrushOptional brush to use for the color of the text.

If desiredWidth is greater than 0, current font size will be ignored and a new one will be temporally set so that the whole drawn text fills in desiredWidth pixels.

Implements eVision::EDrawAdapter.

◆ Text() [3/3]

void eVision::EWindowsDrawAdapter::Text ( const std::string & text,
int32_t x,
int32_t y,
float orientation,
eVision::EBrush textBrush,
eVision::ETextSizeConstraint constraint )
virtual

Draws a text.

Parameters
textText to draw.
xX position of the text.
yY position of the text.
orientationOrientation of the text in radians.
textBrushOptional brush to use for the color of the text.
constraintText size constraint. By default, no constraint is to be applied.

If desiredWidth is greater than 0, current font size will be ignored and a new one will be temporally set so that the whole drawn text fills in desiredWidth pixels.

Implements eVision::EDrawAdapter.

◆ UseCurrentBrush()

void eVision::EWindowsDrawAdapter::UseCurrentBrush ( )
virtual

Use the current pen set in the drawing framework.

Implements eVision::EDrawAdapter.

◆ UseCurrentPen()

void eVision::EWindowsDrawAdapter::UseCurrentPen ( )
virtual

Uses the current GDI pen.

Implements eVision::EDrawAdapter.