A Module to handle background images. More...
Background images are handled through layout->backgroundTool, a backgroundModule. addBackground loads a pixel file such as png or jpg, or a plugin that supplies a live picture, and returns a handle you pass to the other members. backgroundOffset, backgroundScale, backgroundRotate and backgroundShear place that image in the drawing using database units as doubles so the alignment can be finer than an integer grid. vectorizePixel and vectorizeThreshold turn the picture into polygons on the activeLayer after you set shape colour, background colour, threshold and ignore size. show, showCell and hide choose which cells display which images; clearBackground removes them all.
Example:
int hd;
hd = layout->backgroundTool->addBackground("image.png");
layout->backgroundTool->backgroundShear(hd,0.0065,0);
layout->backgroundTool->backgroundRotate(hd,0.19);
layout->backgroundTool->backgroundScale(hd,54.7284,54.0324);
layout->backgroundTool->backgroundOffset(hd,915570,1060380);
layout->backgroundTool->show(hd);
The file with the name filename will be used as background. All common pixel format like png or jpg can be loaded. Also supported are plugin files. With a plugin a background images can supplier by a program code. So a live image or an image from a remote device can be shown. A plugin for TESCAN-SEMs is suppliert. If you want to create a plugin for your device, please contact sales for the interface specifications and an example plugin code.
Returns: handle of the background image
Sets the name of the background image as it is shown to the user. It has NO effect on the design like loading a new background image.
Sets offset of a background image. The value has to entered in database units of the upper left corner of the image. In contrast of any other size setting in the LayoutEditor in this case a database units has to entered as a double. This allows extreme exact position which would not be possible with an integer.
| Parameter: | |
|---|---|
| handle | background image handle from addBackground |
| x | x coordinate or offset |
| y | y coordinate or offset |
Returns: the x coordinate of the image offset
Returns: the y coordinate of the image offset
Sets rotation of a background image in degree.
Returns: the rotation angle of the background image
Sets scale of a background image. The scale is set in database units per pixel. In contrast of any other size setting in the LayoutEditor in this case a database units has to entered as a double. This allows extreme exact scaling factor which would not be possible with an integer.
| Parameter: | |
|---|---|
| handle | background image handle from addBackground |
| sx | x scale or shear |
| sy | y scale or shear |
Returns: the scaling factor in the x axis in database units per pixel
Returns: the scaling factor in the y axis in database units per pixel
Sets shear of a background image. Entered values are relative to the size of the image.
| Parameter: | |
|---|---|
| handle | background image handle from addBackground |
| sx | x scale or shear |
| sy | y scale or shear |
Returns: the shearing in the x axis
Returns: the shearing in the x axis
Sets transparency of a background image. Entered values are in procent. With a value of 100 the image will be fully visible. With a value of 0 the image will be completly transparent/invisible.
Returns: the transparency of the image in percent. A return value of 100 means fully visible.
Center the background image given by handle for a maximal sized view on the screen. The design view is scrolled and zoomed accordingly.
All previously loaded background images are removed.
Background image with handle will set to be invisible.
All background images wil get invisible.
Move the background image with handle so that the image anchor is at the location (x,y).
| Parameter: | |
|---|---|
| handle | background image handle from addBackground |
| x | x coordinate or offset |
| y | y coordinate or offset |
Sets the image anchor to the center of the background image.
Sets the image anchor to the upper left corner of the background image handle.
Pixel with the given ranged around the shape color will be used.
Set the background color for threshold vectorisation.
| Parameter: | |
|---|---|
| red | red 0–255 |
| green | green 0–255 |
| blue | blue 0–255 |
set the image anchor of the background image handle to (x,y). No movement is done. To move the image with the anchor use the command setAnchor(), see above.
| Parameter: | |
|---|---|
| handle | background image handle from addBackground |
| x | x coordinate or offset |
| y | y coordinate or offset |
Areas smaller the given size will be ignored during vectorisation.
Sets the scan direction for threshold vectorisation.
Pixel with the given ranged around the shape color will be used.
Set the shape color for pixel and threshold vectorisation
| Parameter: | |
|---|---|
| red | red 0–255 |
| green | green 0–255 |
| blue | blue 0–255 |
Sets the threshold for vectorisation. The value is relative to the background and shape color. a value of 0 means background color, 100 is shape color.
The background images with handle will be displayed in any cell of the design.
All background images will be displayed in any cell of the design.
All background images will be displayed in just cell with the cellname.
The background images with handle will be displayed in just cell with the cellname.
The background images with handle will be set to the front of all existing background images. With this operation the handel of all background images will change. The new handle of the front image will be returned.
Returns: the new handle of the image now in front; other handles change as well.
Performs a vectorisation to the active layer. All pixel match the shape color criteria will be vectorized. Area smaller ignore pixel will be ignored.
Perform a threshold vectorisation. The area between background and shape color is scanned for line matching the threshold criteria.