eVision Python API
Loading...
Searching...
No Matches
eVision.EWindowsDrawAdapter Class Reference

A draw adapter using the GDI+ native API on Windows. More...

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

Public Member Functions

None __init__ (self, ctypes.c_void_p dc)
 Creates an eVision.EWindowsDrawAdapter either by providing a drawing context or an image.
None __init__ (self, ctypes.c_void_p dc, bool enhancedDisplay)
 Creates an eVision.EWindowsDrawAdapter either by providing a drawing context or an image.
None __init__ (self, eVision.EImageBW8|None pImage)
 Creates an eVision.EWindowsDrawAdapter either by providing a drawing context or an image.
None __init__ (self, eVision.EImageBW8|None pImage, bool enhancedDisplay)
 Creates an eVision.EWindowsDrawAdapter either by providing a drawing context or an image.
None __init__ (self, eVision.EImageC24|None pImage)
 Creates an eVision.EWindowsDrawAdapter either by providing a drawing context or an image.
None __init__ (self, eVision.EImageC24|None pImage, bool enhancedDisplay)
 Creates an eVision.EWindowsDrawAdapter either by providing a drawing context or an image.
None DrawPoint (self, int x1, int y1, eVision.EPen pen)
 Draws a point at the given coordinate.
None DrawPoint (self, int x1, int y1)
 Draws a point at the given coordinate.
None Line (self, int x1, int y1, int x2, int y2, eVision.EPen pen)
 Draws a line between two points.
None Line (self, int x1, int y1, int x2, int y2)
 Draws a line between two points.
None Arc (self, int orgX, int orgY, int width, int height, float startAngle, float amplitude, eVision.EPen pen)
 Draws an arc defined by a rectangle, angle, and amplitude.
None Arc (self, int orgX, int orgY, int width, int height, float startAngle, float amplitude)
 Draws an arc defined by a rectangle, angle, and amplitude.
None Rectangle (self, int orgX, int orgY, int width, int height, eVision.EPen pen)
 Draws a rectangle.
None Rectangle (self, int orgX, int orgY, int width, int height)
 Draws a rectangle.
None Polygon (self, list[eVision._eVision.EPoint] points, eVision.EPen pen)
 Draws a polygon.
None Polygon (self, list[eVision._eVision.EPoint] points)
 Draws a polygon.
None Ellipse (self, int orgX, int orgY, int width, int height, eVision.EPen pen)
 Draws an ellipse.
None Ellipse (self, int orgX, int orgY, int width, int height)
 Draws an ellipse.
None FilledRectangle (self, int orgX, int orgY, int width, int height, eVision.EPen pen, eVision.EBrush brush)
 Fills a rectangle.
None FilledRectangle (self, int orgX, int orgY, int width, int height, eVision.EPen pen)
 Fills a rectangle.
None FilledRectangle (self, int orgX, int orgY, int width, int height)
 Fills a rectangle.
None FilledEllipse (self, int orgX, int orgY, int width, int height, eVision.EPen pen, eVision.EBrush brush)
 Fills an ellipse.
None FilledEllipse (self, int orgX, int orgY, int width, int height, eVision.EPen pen)
 Fills an ellipse.
None FilledEllipse (self, int orgX, int orgY, int width, int height)
 Fills an ellipse.
None FilledPolygon (self, list[eVision._eVision.EPoint] points, eVision.EPen pen, eVision.EBrush brush)
 Fills a polygon.
None FilledPolygon (self, list[eVision._eVision.EPoint] points, eVision.EPen pen)
 Fills a polygon.
None FilledPolygon (self, list[eVision._eVision.EPoint] points)
 Fills a polygon.
None Text (self, str text, int x, int y, float orientation, eVision.EBrush textBrush, eVision.ETextSizeConstraint constraint)
 Draws a text.
None Text (self, str text, int x, int y, float orientation, eVision.EBrush textBrush)
 Draws a text.
None Text (self, str text, int x, int y, float orientation)
 Draws a text.
None BackedText (self, str text, int x, int y, float orientation, eVision.EBrush textBrush, eVision.EBrush backgroundBrush, eVision.ETextSizeConstraint constraint)
 Draws a text with a background.
None BackedText (self, str text, int x, int y, float orientation, eVision.EBrush textBrush, eVision.EBrush backgroundBrush)
 Draws a text with a background.
None BackedText (self, str text, int x, int y, float orientation, eVision.EBrush textBrush)
 Draws a text with a background.
None BackedText (self, str text, int x, int y, float orientation)
 Draws a text with a background.
None Image (self, eVision.EBaseROI image, float orgX, float orgY, float width, float height)
 Draws an image.
None Image (self, eVision.EROIBW8 image, eVision.EC24Vector|None pColorScale, float orgX, float orgY, float width, float height)
 Draws an image.
None Image (self, eVision.EROIBW8 image, eVision.EBW8Vector|None pColorScale, float orgX, float orgY, float width, float height)
 Draws an image.
eVision.EPoint GetTextSize (self, str text)
 Size of the given text using the default font (eVision.EWindowsDrawAdapter.Font).
None UseCurrentPen (self)
 Uses the current GDI pen.
None UseCurrentBrush (self)
 Use the current pen set in the drawing framework.
None Close (self)
 Closes the attached drawing context.
int ComputeTextSize (self, str text, int desiredWidth)
 Computes text size for given constraint.
Public Member Functions inherited from eVision.EDrawAdapter
None RotatedEllipse (self, float centerX, float centerY, float radianAngle, float longAxis, float shortAxis, bool drawDiagonals, eVision.EPen pen)
 Draws a rotated ellipse.
None RotatedEllipse (self, float centerX, float centerY, float radianAngle, float longAxis, float shortAxis, bool drawDiagonals)
 Draws a rotated ellipse.
None RotatedEllipse (self, eVision.EEllipse ellipse, bool drawDiagonals, eVision.EPen pen)
 Draws a rotated ellipse.
None RotatedEllipse (self, eVision.EEllipse ellipse, bool drawDiagonals)
 Draws a rotated ellipse.
None FilledRotatedEllipse (self, float centerX, float centerY, float radianAngle, float longAxis, float shortAxis, eVision.EPen pen, eVision.EBrush brush)
 Fills a rotated ellipse.
None FilledRotatedEllipse (self, float centerX, float centerY, float radianAngle, float longAxis, float shortAxis, eVision.EPen pen)
 Fills a rotated ellipse.
None FilledRotatedEllipse (self, float centerX, float centerY, float radianAngle, float longAxis, float shortAxis)
 Fills a rotated ellipse.
None FilledRotatedEllipse (self, eVision.EEllipse ellipse, eVision.EPen pen, eVision.EBrush brush)
 Fills a rotated ellipse.
None FilledRotatedEllipse (self, eVision.EEllipse ellipse, eVision.EPen pen)
 Fills a rotated ellipse.
None FilledRotatedEllipse (self, eVision.EEllipse ellipse)
 Fills a rotated ellipse.
None DrawMask (self, eVision.EBaseROI mask, eVision.EBrush brush)
 Draws a mask with a brush.
None DrawMask (self, eVision.EBaseROI mask)
 Draws a mask with a brush.
None DrawMask (self, eVision.EBaseROI mask, float orgX, float orgY, float width, float height, eVision.EBrush brush)
 Draws a mask with a brush.
None DrawMask (self, eVision.EBaseROI mask, float orgX, float orgY, float width, float height)
 Draws a mask with a brush.

Properties

 Pen = property(_Pen__getter, _Pen__setter)
 Default pen.
 Brush = property(_Brush__getter, _Brush__setter)
 Default brush.
 Font = property(_Font__getter, _Font__setter)
 Default font.
 HDC = property(_HDC__getter, None)
 Gets the HDC associated with this instance of eVision.EWindowsDrawAdapter.
Properties inherited from eVision.EDrawAdapter
 Pen = property(_Pen__getter, _Pen__setter)
 Default pen.
 Brush = property(_Brush__getter, _Brush__setter)
 Default brush.
 Font = property(_Font__getter, _Font__setter)
 Default font.

Detailed Description

A draw adapter using the GDI+ native API on Windows.

Remarks:

This class is only usable on Windows and all its methods will throw NotImplemented errors if used on another platform.

This draw adapter is recommended specifically for direct drawing on screen in C++ programs based on the MFC framework. Please also see:

In programming languages other than C++, it is necessary to call eVision.EWindowsDrawAdapter.Close in a try/finally block after instanciating objects from the class.

License(s): None

Constructor & Destructor Documentation

◆ __init__() [1/6]

None eVision.EWindowsDrawAdapter.__init__ ( self,
ctypes.c_void_p dc )

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

If a drawing context is provided eVision.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 eVision.EWindowsDrawAdapter or when the eVision.EWindowsDrawAdapter.Close method is called.

Parameters
dcThe Windows API drawing context.

◆ __init__() [2/6]

None eVision.EWindowsDrawAdapter.__init__ ( self,
ctypes.c_void_p dc,
bool enhancedDisplay )

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

If a drawing context is provided eVision.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 eVision.EWindowsDrawAdapter or when the eVision.EWindowsDrawAdapter.Close method is called.

Parameters
dcThe Windows API drawing context.
enhancedDisplayWhether to activate enhanced display. When enabled, enhanced mode performs advanced interpolation for image display. By default, enhanced mode is disabled. Please note that enhanced mode has a significant impact on drawing performances.

◆ __init__() [3/6]

None eVision.EWindowsDrawAdapter.__init__ ( self,
eVision.EImageBW8 | None pImage )

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

If a drawing context is provided eVision.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 eVision.EWindowsDrawAdapter or when the eVision.EWindowsDrawAdapter.Close method is called.

Parameters
pImageAn image to draw to.

◆ __init__() [4/6]

None eVision.EWindowsDrawAdapter.__init__ ( self,
eVision.EImageBW8 | None pImage,
bool enhancedDisplay )

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

If a drawing context is provided eVision.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 eVision.EWindowsDrawAdapter or when the eVision.EWindowsDrawAdapter.Close method is called.

Parameters
pImageAn image to draw to.
enhancedDisplayWhether to activate enhanced display. When enabled, enhanced mode performs advanced interpolation for image display. By default, enhanced mode is disabled. Please note that enhanced mode has a significant impact on drawing performances.

◆ __init__() [5/6]

None eVision.EWindowsDrawAdapter.__init__ ( self,
eVision.EImageC24 | None pImage )

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

If a drawing context is provided eVision.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 eVision.EWindowsDrawAdapter or when the eVision.EWindowsDrawAdapter.Close method is called.

Parameters
pImageAn image to draw to.

◆ __init__() [6/6]

None eVision.EWindowsDrawAdapter.__init__ ( self,
eVision.EImageC24 | None pImage,
bool enhancedDisplay )

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

If a drawing context is provided eVision.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 eVision.EWindowsDrawAdapter or when the eVision.EWindowsDrawAdapter.Close method is called.

Parameters
pImageAn image to draw to.
enhancedDisplayWhether to activate enhanced display. When enabled, enhanced mode performs advanced interpolation for image display. By default, enhanced mode is disabled. Please note that enhanced mode has a significant impact on drawing performances.

Member Function Documentation

◆ Arc() [1/2]

None eVision.EWindowsDrawAdapter.Arc ( self,
int orgX,
int orgY,
int width,
int height,
float startAngle,
float amplitude )

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

Reimplemented from eVision.EDrawAdapter.

◆ Arc() [2/2]

None eVision.EWindowsDrawAdapter.Arc ( self,
int orgX,
int orgY,
int width,
int height,
float startAngle,
float amplitude,
eVision.EPen pen )

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

Reimplemented from eVision.EDrawAdapter.

◆ BackedText() [1/4]

None eVision.EWindowsDrawAdapter.BackedText ( self,
str text,
int x,
int y,
float orientation )

Draws a text with a background.

Remarks:

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.

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

Reimplemented from eVision.EDrawAdapter.

◆ BackedText() [2/4]

None eVision.EWindowsDrawAdapter.BackedText ( self,
str text,
int x,
int y,
float orientation,
eVision.EBrush textBrush )

Draws a text with a background.

Remarks:

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.

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.

Reimplemented from eVision.EDrawAdapter.

◆ BackedText() [3/4]

None eVision.EWindowsDrawAdapter.BackedText ( self,
str text,
int x,
int y,
float orientation,
eVision.EBrush textBrush,
eVision.EBrush backgroundBrush )

Draws a text with a background.

Remarks:

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.

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.

Reimplemented from eVision.EDrawAdapter.

◆ BackedText() [4/4]

None eVision.EWindowsDrawAdapter.BackedText ( self,
str text,
int x,
int y,
float orientation,
eVision.EBrush textBrush,
eVision.EBrush backgroundBrush,
eVision.ETextSizeConstraint constraint )

Draws a text with a background.

Remarks:

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.

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.

Reimplemented from eVision.EDrawAdapter.

◆ Close()

None eVision.EWindowsDrawAdapter.Close ( self)

Closes the attached drawing context.

In C++, This method is always called implicitly during the destruction of the current object. In other programming languages it is necessary to call it explicitly in a try/finally block to ensure all ressources are properly cleaned after usage of objects from this class.

This method never throws exceptions.

◆ ComputeTextSize()

int eVision.EWindowsDrawAdapter.ComputeTextSize ( self,
str text,
int desiredWidth )

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]

None eVision.EWindowsDrawAdapter.DrawPoint ( self,
int x1,
int y1 )

Draws a point at the given coordinate.

Parameters
x1X coordinate
y1Y coordinate

Reimplemented from eVision.EDrawAdapter.

◆ DrawPoint() [2/2]

None eVision.EWindowsDrawAdapter.DrawPoint ( self,
int x1,
int y1,
eVision.EPen pen )

Draws a point at the given coordinate.

Parameters
x1X coordinate
y1Y coordinate
penOptional pen to use

Reimplemented from eVision.EDrawAdapter.

◆ Ellipse() [1/2]

None eVision.EWindowsDrawAdapter.Ellipse ( self,
int orgX,
int orgY,
int width,
int height )

Draws an ellipse.

Remarks:

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

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

Reimplemented from eVision.EDrawAdapter.

◆ Ellipse() [2/2]

None eVision.EWindowsDrawAdapter.Ellipse ( self,
int orgX,
int orgY,
int width,
int height,
eVision.EPen pen )

Draws an ellipse.

Remarks:

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

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

Reimplemented from eVision.EDrawAdapter.

◆ FilledEllipse() [1/3]

None eVision.EWindowsDrawAdapter.FilledEllipse ( self,
int orgX,
int orgY,
int width,
int height )

Fills an ellipse.

Remarks:

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

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

Reimplemented from eVision.EDrawAdapter.

◆ FilledEllipse() [2/3]

None eVision.EWindowsDrawAdapter.FilledEllipse ( self,
int orgX,
int orgY,
int width,
int height,
eVision.EPen pen )

Fills an ellipse.

Remarks:

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

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

Reimplemented from eVision.EDrawAdapter.

◆ FilledEllipse() [3/3]

None eVision.EWindowsDrawAdapter.FilledEllipse ( self,
int orgX,
int orgY,
int width,
int height,
eVision.EPen pen,
eVision.EBrush brush )

Fills an ellipse.

Remarks:

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

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

Reimplemented from eVision.EDrawAdapter.

◆ FilledPolygon() [1/3]

None eVision.EWindowsDrawAdapter.FilledPolygon ( self,
list[eVision._eVision.EPoint] points )

Fills a polygon.

Parameters
pointsPoints of the polygon

Reimplemented from eVision.EDrawAdapter.

◆ FilledPolygon() [2/3]

None eVision.EWindowsDrawAdapter.FilledPolygon ( self,
list[eVision._eVision.EPoint] points,
eVision.EPen pen )

Fills a polygon.

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

Reimplemented from eVision.EDrawAdapter.

◆ FilledPolygon() [3/3]

None eVision.EWindowsDrawAdapter.FilledPolygon ( self,
list[eVision._eVision.EPoint] points,
eVision.EPen pen,
eVision.EBrush brush )

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

Reimplemented from eVision.EDrawAdapter.

◆ FilledRectangle() [1/3]

None eVision.EWindowsDrawAdapter.FilledRectangle ( self,
int orgX,
int orgY,
int width,
int height )

Fills a rectangle.

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

Reimplemented from eVision.EDrawAdapter.

◆ FilledRectangle() [2/3]

None eVision.EWindowsDrawAdapter.FilledRectangle ( self,
int orgX,
int orgY,
int width,
int height,
eVision.EPen pen )

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

Reimplemented from eVision.EDrawAdapter.

◆ FilledRectangle() [3/3]

None eVision.EWindowsDrawAdapter.FilledRectangle ( self,
int orgX,
int orgY,
int width,
int height,
eVision.EPen pen,
eVision.EBrush brush )

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

Reimplemented from eVision.EDrawAdapter.

◆ GetTextSize()

eVision.EPoint eVision.EWindowsDrawAdapter.GetTextSize ( self,
str text )

Size of the given text using the default font (eVision.EWindowsDrawAdapter.Font).

Parameters
textText

Reimplemented from eVision.EDrawAdapter.

◆ Image() [1/3]

None eVision.EWindowsDrawAdapter.Image ( self,
eVision.EBaseROI image,
float orgX,
float orgY,
float width,
float height )

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.

Reimplemented from eVision.EDrawAdapter.

◆ Image() [2/3]

None eVision.EWindowsDrawAdapter.Image ( self,
eVision.EROIBW8 image,
eVision.EBW8Vector | None pColorScale,
float orgX,
float orgY,
float width,
float height )

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.

Reimplemented from eVision.EDrawAdapter.

◆ Image() [3/3]

None eVision.EWindowsDrawAdapter.Image ( self,
eVision.EROIBW8 image,
eVision.EC24Vector | None pColorScale,
float orgX,
float orgY,
float width,
float height )

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.

Reimplemented from eVision.EDrawAdapter.

◆ Line() [1/2]

None eVision.EWindowsDrawAdapter.Line ( self,
int x1,
int y1,
int x2,
int y2 )

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

Reimplemented from eVision.EDrawAdapter.

◆ Line() [2/2]

None eVision.EWindowsDrawAdapter.Line ( self,
int x1,
int y1,
int x2,
int y2,
eVision.EPen pen )

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

Reimplemented from eVision.EDrawAdapter.

◆ Polygon() [1/2]

None eVision.EWindowsDrawAdapter.Polygon ( self,
list[eVision._eVision.EPoint] points )

Draws a polygon.

Parameters
pointsPoints of the polygon

Reimplemented from eVision.EDrawAdapter.

◆ Polygon() [2/2]

None eVision.EWindowsDrawAdapter.Polygon ( self,
list[eVision._eVision.EPoint] points,
eVision.EPen pen )

Draws a polygon.

Parameters
pointsPoints of the polygon
penOptional pen to use

Reimplemented from eVision.EDrawAdapter.

◆ Rectangle() [1/2]

None eVision.EWindowsDrawAdapter.Rectangle ( self,
int orgX,
int orgY,
int width,
int height )

Draws a rectangle.

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

Reimplemented from eVision.EDrawAdapter.

◆ Rectangle() [2/2]

None eVision.EWindowsDrawAdapter.Rectangle ( self,
int orgX,
int orgY,
int width,
int height,
eVision.EPen pen )

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

Reimplemented from eVision.EDrawAdapter.

◆ Text() [1/3]

None eVision.EWindowsDrawAdapter.Text ( self,
str text,
int x,
int y,
float orientation )

Draws a text.

Remarks:

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.

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

Reimplemented from eVision.EDrawAdapter.

◆ Text() [2/3]

None eVision.EWindowsDrawAdapter.Text ( self,
str text,
int x,
int y,
float orientation,
eVision.EBrush textBrush )

Draws a text.

Remarks:

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.

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.

Reimplemented from eVision.EDrawAdapter.

◆ Text() [3/3]

None eVision.EWindowsDrawAdapter.Text ( self,
str text,
int x,
int y,
float orientation,
eVision.EBrush textBrush,
eVision.ETextSizeConstraint constraint )

Draws a text.

Remarks:

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.

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.

Reimplemented from eVision.EDrawAdapter.

◆ UseCurrentBrush()

None eVision.EWindowsDrawAdapter.UseCurrentBrush ( self)

Use the current pen set in the drawing framework.

Reimplemented from eVision.EDrawAdapter.

◆ UseCurrentPen()

None eVision.EWindowsDrawAdapter.UseCurrentPen ( self)

Uses the current GDI pen.

Reimplemented from eVision.EDrawAdapter.

Property Documentation

◆ Brush

eVision.EWindowsDrawAdapter.Brush = property(_Brush__getter, _Brush__setter)
static

Default brush.

◆ Font

eVision.EWindowsDrawAdapter.Font = property(_Font__getter, _Font__setter)
static

Default font.

◆ HDC

eVision.EWindowsDrawAdapter.HDC = property(_HDC__getter, None)
static

Gets the HDC associated with this instance of eVision.EWindowsDrawAdapter.

◆ Pen

eVision.EWindowsDrawAdapter.Pen = property(_Pen__getter, _Pen__setter)
static

Default pen.