the fair gds editor MacroClassBackgroundModule

BackgroundModule Class Reference

A Module to handle background images. More...

See also: List of Classes


Detailed Description

This module has some functions to handle background images and vectorization.

Here an example. It loads a background image and place it:

   1 int hd;
   2 hd = layout->backgroundTool->addBackground("image.png");
   3 layout->backgroundTool->backgroundShear(hd,0.0065,0);
   4 layout->backgroundTool->backgroundRotate(hd,0.19);
   5 layout->backgroundTool->backgroundScale(hd,54.7284,54.0324);
   6 layout->backgroundTool->backgroundOffset(hd,915570,1060380);

See also: SetBackgroundImage, VectorizeImages

Member Function Documentation

int backgroundModule::addBackground(string filename)

The file with the name filename will be used as background

Returns: handle of the background image

void backgroundModule::backgroundName(int handle, string name)

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.

void backgroundModule::backgroundOffset(int handle, double x, double y)

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.

double backgroundModule::backgroundOffsetGetX(int handle)

Returns: the x coordinate of the image offset

double backgroundModule::backgroundOffsetGetY(int handle)

Returns: the y coordinate of the image offset

void backgroundModule::backgroundRotate(int handle, double angle)

Sets rotation of a background image in degree.

double backgroundModule::backgroundRotateGet(int handle)

Returns: the rotation angle of the background image

void backgroundModule::backgroundScale(int handle, double sx, double sy)

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.

double backgroundModule::backgroundScaleGetX(int handle)

Returns: the scaling factor in the x axis in database units per pixel

double backgroundModule::backgroundScaleGetY(int handle)

Returns: the scaling factor in the y axis in database units per pixel

void backgroundModule::backgroundShear(int handle, double sx, double sy)

Sets shear of a background image. Entered values are relative to the size of the image.

double backgroundModule::backgroundShearGetX(int handle)

Returns: the shearing in the x axis

double backgroundModule::backgroundShearGetY(int handle)

Returns: the shearing in the x axis

void backgroundModule::backgroundTransparency(int handel,int value)

Sets transparency of a background image. Entered values are in procent. With a value of 100 the image will be fully visible. (introduced with version 20141229)

int backgroundModule::backgroundTransparencyGet(int handel)

Returns: the transparency of the image in percent. A return value of 100 means fully visible. (introduced with version 20141229)

void backgroundModule::centerView(int handle)

Center the given background image for a maximal view on the screen

void backgroundModule::clearBackground()

all background image are removed

void backgroundModule::hide(int handle)

Background image with handle will set to be invisible.

void backgroundModule::hideAll()

All background images wil get invisible.

void backgroundModule::setAnchor(int handle,double x, double y)

move the background image with handle so that the image anchor is at the location (x,y).

void backgroundModule::setAnchorCenter(int handle)

set the image anchor to the center of the background image

void backgroundModule::setAnchorTopLeft(int handle)

set the image anchor to the upper left corner of the background image handle

void backgroundModule::setBackgroundColorRange(int range)

Pixel with the given ranged around the shape color will be used.

void backgroundModule::setBackgroundColor(int red, int green,int blue)

Set the background color for threshold vectorisation

void backgroundModule::setImageAnchor(int handle,int x, int y)

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.

void backgroundModule::setIgnorePixel(int ignore)

Areas smaller the given size will be ignored during vectorisation.

void backgroundModule::setRisingThreshold(bool b)

set the scan direction for threshold vectorisation.

void backgroundModule::setShapeColorRange(int range)

Pixel with the given ranged around the shape color will be used.

void backgroundModule::setShapeColor(int red, int green,int blue)

Set the shape color for pixel and threshold vectorisation

void backgroundModule::setThreshold(double d)

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.

void backgroundModule::show(int handle)

The background images with handle will be displayed in any cell of the design.

void backgroundModule::showAll()

All background images will be displayed in any cell of the design.

void backgroundModule::showAllCell(string cellname)

All background images will be displayed in just cell with the cellname.

void backgroundModule::showCell(int handle,string cellname)

The background images with handle will be displayed in just cell with the cellname.

int backgroundModule::toFront(int handle)

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.

void backgroundModule::vectorizePixel(int handle)

Performs a vectorisation to the active layer. All pixel match the shape color criteria will be vectoriuzed. Area smaller ignore pixel will be ignored.

void backgroundModule::vectorizeThreshold(int handle)

Perform a threshold vectorisation. The area between background and shape color is scanned for line matching the threshold creteria.

See also


CategoryMacroClass


MacroClassBackgroundModule (last edited 2017-03-22 13:50:11 by JurgenThies)