Class Reference backgroundModule

A Module to handle background images. More...

Member

int addBackground(string filename)
void backgroundName(int handle, string name)
void backgroundOffset(int handle, double x, double y)
double backgroundOffsetGetX(int handle)
double backgroundOffsetGetY(int handle)
void backgroundRotate(int handle, double angle)
double backgroundRotateGet(int handle)
void backgroundScale(int handle, double sx, double sy)
double backgroundScaleGetX(int handle)
double backgroundScaleGetY(int handle)
void backgroundShear(int handle, double sx, double sy)
double backgroundShearGetX(int handle)
double backgroundShearGetY(int handle)
void backgroundTransparency(int handel,int value)
int backgroundTransparencyGet(int handel)
void centerView(int handle)
void clearBackground()
void hide(int handle)
void hideAll()
void setAnchor(int handle,double x, double y)
void setAnchorCenter(int handle)
void setAnchorTopLeft(int handle)
void setBackgroundColorRange(int range)
void setBackgroundColor(int red, int green,int blue)
void setImageAnchor(int handle,int x, int y)
void setIgnorePixel(int ignore)
void setRisingThreshold(bool b)
void setShapeColorRange(int range)
void setShapeColor(int red, int green,int blue)
void setThreshold(double d)
void show(int handle)
void showAll()
void showAllCell(string cellname)
void showCell(int handle,string cellname)
int toFront(int handle)
void vectorizePixel(int handle)
void vectorizeThreshold(int handle)

Detailed Description

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

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

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);

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.


int backgroundModule::backgroundTransparencyGet(int handel)

Returns: the transparency of the image in percent. A return value of 100 means fully visible.


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 criteria.