Inheritance diagram for DzBackdrop:
Enumerations | |
enum | Rotation { NO_ROTATION = 0, ROTATE_LEFT_90, ROTATE_RIGHT_90, ROTATE_180 } |
Properties | |
Boolean | flipHorizontal |
Boolean | flipVertical |
Rotation | rotation |
Methods | |
void | clear () |
DzBoolProperty | getHorizontalFlipControl () |
DzMaterial | getMaterial () |
DzEnumProperty | getRotationControl () |
DzTexture | getTexture () |
DzBoolProperty | getVerticalFlipControl () |
void | setTexture (DzTexture img) |
void | showOptions () |
Constructors | |
DzBackdrop () | |
Signals | |
void | drawnDataChanged () |
Signature: "drawnDataChanged()" |
This class encapsulates a 2D image and the parameters for drawing the image as a backdrop for the scene. An instance of this class only contributes to the scene if it is set as the current backdrop for the scene.
enum DzBackdrop::Rotation |
DzBackdrop::DzBackdrop | ( | ) |
Default Constructor.
void DzBackdrop::clear | ( | ) |
Clears the current back drop image, and resets all parameters.
// get the backdrop for the scene DzBackdrop *backdrop = dzScene->getBackdrop(); // clear the backdrop backdrop->clear();
void DzBackdrop::drawnDataChanged | ( | ) | [signal] |
Signature: "drawnDataChanged()"
Emitted when the information in this backdrop changes.
DzBoolProperty DzBackdrop::getHorizontalFlipControl | ( | ) |
DzMaterial DzBackdrop::getMaterial | ( | ) |
// get the backdrop for the scene DzBackdrop *backdrop = dzScene->getBackdrop(); DzMaterial *mat = backdrop->getMaterial(); // set the color of the backdrop to red mat->setDiffuseColor( QColor( 255, 0, 0 ) );
DzEnumProperty DzBackdrop::getRotationControl | ( | ) |
DzTexture DzBackdrop::getTexture | ( | ) |
// get the backdrop for the scene DzBackdrop *backdrop = dzScene->getBackdrop(); DzTexture *img = backdrop->getTexture(); // log the file name of the current backdrop image if( img ) dzApp->log( QString( "Current Backdrop Image: %1" ).arg( img->getFilename() ); else dzApp->log( "No Current Backdrop Image" );
DzBoolProperty DzBackdrop::getVerticalFlipControl | ( | ) |
void DzBackdrop::setTexture | ( | DzTexture | img | ) |
Sets the backdrop image.
img | The backdrop image. |
// get the backdrop for the scene DzBackdrop *backdrop = dzScene->getBackdrop(); DzImageMgr *mgr = dzApp->getImageMgr(); // set the backdrop image backdrop->setImage( mgr->getImage( dzApp->getDocumentsPath() + "/Content/Backdrops/SomeBackdrop.jpg" ) );
void DzBackdrop::showOptions | ( | ) |
Show the options dialog for this backdrop.
// get the backdrop for the scene DzBackdrop *backdrop = dzScene->getBackdrop(); // display options for the backdrop to the user backdrop->showOptions( dzApp->getInterface() );
This property holds whether or not the backdrop is flipped horizontally
This property holds whether or not the backdrop is flipped vertically
This property holds the rotation applied to the backdrop