PyANGKernel.GKImage

class GKImage

Inheritance diagram of PyANGKernel.GKImage

Inherited by: GKGeoImage

Synopsis

Methods

Virtual methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

Base class for raster and vector images (not for CAD or GIS files, these have its own classes) used as backgrounds to either draw over the network or for decoration.

__init__()
__init__(awidth, aheight)
Parameters:
  • awidth – int

  • aheight – int

getAngle()
Return type:

float

Gets the rotation angle

getImagePath()
Return type:

str

Gets the system path to the image file

getPixelHeight()
Return type:

int

Gets the image Height in pixels

getPixelWidth()
Return type:

int

Gets the image Width in pixels

getScale()
Return type:

float

Gets the image scale factor

isAutoRestore()
Return type:

bool

Returns true if the image is auto restore. A GKImage with auto restore will load the image data when the project is loaded.

abstractmethod isNull()
Return type:

bool

Returns true if the GKImage contains image data and false if the GKImage does not contain image data.

abstractmethod restoreContent()

Read the image from its file. If “firstRestore” is true then the image is read for the first time (so, maybe, it will read the position of the image from the meta data. In subsequent restores this data will be read from the GKImage .

setAngle(value)
Parameters:

value – float

Sets the rotation angle

setAutoRestore(value)
Parameters:

value – bool

Sets the auto restore state of the image. A GKImage with auto restore will load the image data when the project is loaded.

See also

isAutoRestore()

setImagePath(apath)
Parameters:

apath – str

Sets the system path to the image file

setScale(ascale)
Parameters:

ascale – float

Sets the image scale factor

abstractmethod unload()
Return type:

bool

Unloads the image from memory. Returns false if the image cannot be unloaded (improbable).