Welcome to our Support Center

Draw

Description

Draw geometric objects in an image. Type : polymorphic.

 

Input parameters

 

Image Src : class, type accepted U8, I16, RGB and HSL.
Coordinates : array,
is an array of four elements. A line is specified by the two points forming it. Rectangles and ovals are specified by their bounding rectangle, with the format (Left/Top/Right/Bottom). In these cases, the tracing of a rectangle or oval stops at the column (Right – 1) and at the row (Bottom – 1). The values by default are (0, 0, SizeX, SizeY) where (SizeX, SizeY) is the resolution of the image. The default is used if the input is 0 or is not connected.
Shape To Draw : integer,
is the form to draw.

    • Line : defined by the two points specified in the array Coordinates
    • Rectangle : defined by the bounding rectangle specified in the array Coordinates
    • Oval : defined by the bounding oval specified in the array Coordinates
    • Polygon : defined by the bounding polygon specified in the array Coordinates
  •  

Pixel Color : integer, pixel value used for tracing the design. This value is not used when in the mode Invert Frame or Invert Paint.
Draw Mode : integer,
defines how to draw the object.

    • Frame : specifies to use Pixel Color when tracing the contour
    • Paint : specifies to use Pixel Color when tracing the contour and the interior of the shape
    • Invert Frame : specifies to use the inverse of the pixel values when drawing the contour
    • Invert Paint : specifies to use the inverse of the pixel values when drawing the contour and the interior of the shape

 

Features : cluster

  • thickness : integer, line thickness of geometric object.
    transparency : float, transparency percentage of geometric object. This value is not used when in the mode Invert Frame or Invert Paint.
  •  

 

Output parameters

 

Image Dst : class

Example

All these exemples are snippets PNG, you can drop these Snippet onto the block diagram and get the depicted code added to your VI (Do not forget to install TIGR library to run it).

Table of Contents