Inheritance diagram for DzImageMgr:
Methods | |
void | deleteUnusedTextureObjects () |
DzTexture | findImage (String fullPath) |
String | findLayerImageFile (String path, Boolean askUser) |
Boolean | findLayerImageFiles (String filename) |
DzTexture | getImage (String fullPath) |
DzTexture | getImage (Number which) |
String | getImageOpenPath () |
String | getImageSavePath () |
Number | getNumImages () |
void | imagePrepared (DzTexture img, String tempName) |
DzError | loadImage (String filename, Image img, Number importerIdx=-1) |
DzError | loadLayeredImage (String filename, DzLayeredImage img, Number importerIdx=-1) |
void | prepareAllImages (DzRenderer r) |
void | refresh () |
DzError | saveImage (String filename, Image image, Number exporterIdx=-1) |
DzError | saveLayeredImage (String filename, DzLayeredImage image, Number exporterIdx=-1) |
void | setImageOpenPath (String path) |
void | setImageSavePath (String path) |
Signals | |
void | autoRefreshChanged (Boolean onOff) |
Signature: "autoRefreshChanged(bool)" | |
void | imageListChanged () |
Signature: "imageListChanged()" |
There is only one instance of this manager in an application. This instance is created and owned by DzApp. Don't create an instance of this class, but rather request a pointer to it from DzApp via DzApp::getImageMgr().
DzImageMgr::autoRefreshChanged | ( | Boolean | onOff | ) | [signal] |
Signature: "autoRefreshChanged(bool)"
Emitted when the auto refresh state changes
void DzImageMgr::deleteUnusedTextureObjects | ( | ) |
This method is called from the 3D viewports to clear out any texture objects that are no longer being used. It has to be called only when a Studio OGL context is current.
path | The full path of the image file to find a DzTexture instance for. |
Attempts to locate a file referenced by a layered image.
path | The path of the file referenced by a layered image. | |
askUser | If true, the user will be prompted to locate the file if it is not found in a mapped directory. If false, the user will not be prompted. |
Attempts to locate all the files referenced by a layered image.
filename | The layered image to locate files for. |
fullPath | The full path of the image file to get a DzTexture instance for. |
which | The index of the image to return. |
String DzImageMgr::getImageOpenPath | ( | ) |
String DzImageMgr::getImageSavePath | ( | ) |
void DzImageMgr::imageListChanged | ( | ) | [signal] |
Signature: "imageListChanged()"
Emitted when an image is added to or removed from the list.
Called by the framework to notify the manager that the image has been prepared for the offline renderer.
img | A pointer to the image that has been prepared. | |
tempName | The new temporary name for the image. |
Reads an image from a file.
filename | Name of the image file to load. | |
img | The image that the file will be loaded into. | |
importerIdx | The index of the importer to use to load the image. If less than zero, the manager will attempt to find an importer that can load the file. |
DzError DzImageMgr::loadLayeredImage | ( | String | filename, | |
DzLayeredImage | img, | |||
Number | importerIdx = -1 | |||
) |
Reads an image from a file.
filename | Name of the image file to load. | |
img | The image that the file will be loaded into. | |
importerIdx | The index of the importer to use to load the image. If less than zero, the manager will attempt to find an importer that can load the file. |
void DzImageMgr::prepareAllImages | ( | DzRenderer | r | ) |
Forces a flush of the background image processing buffer. A renderer should call this function before rendering to ensure that prepareImage() has been called for all the images in use.
r | A pointer to the renderer that is about to render the scene. |
void DzImageMgr::refresh | ( | ) |
Reloads any images whose source files have changed
Writes an image to a file.
filename | Name of the image file to save. | |
image | The image to save. | |
exporterIdx | The index of the exmporter to use to save the image. If less than zero, the manager will attempt to find an appropriate exporter based on the filename extension. |
DzError DzImageMgr::saveLayeredImage | ( | String | filename, | |
DzLayeredImage | image, | |||
Number | exporterIdx = -1 | |||
) |
Writes an image to a file.
filename | Name of the image file to save. | |
image | The image to save. | |
exporterIdx | The index of the exmporter to use to save the image. If less than zero, the manager will attempt to find an appropriate exporter based on the filename extension. |
void DzImageMgr::setImageOpenPath | ( | String | path | ) |
Sets the file path that a file open dialog will point to for images.
path | The folder path that the open image dialogs will default to. |
void DzImageMgr::setImageSavePath | ( | String | path | ) |
Sets the file path that a file save dialog will point to for images.
path | The folder path that the save image dialogs will default to. |