User Tools

Site Tools


DzLayeredTexture

Class that handles sharing of data for layered image maps.

More...

Inherits :

Properties

Methods

Signals

voidaboutToInsertLayers ( Number index, Number count )
voidaboutToRemoveLayers ( Number index, Number count )
voidassetModified ()
voidassetWasSaved ()
voidlayerListChanged ()
voidlayersInserted ( Number index, Number count )
voidlayersRemoved ( Number index, Number count )
voidsizeChanged ( Size size )

Detailed Description

This is a sharable object that stores information for a layered texture (image map) that is used in OpenGL. Do not create a layered texture, rather, request one from DzImageMgr - this insures that there is only one instance of a given image in memory at a time, and also ensures that necessary conversions for rendering the image via OpenGL and offline renderers occurs correctly.

Properties


DzAuthor : assetAuthor

Holds the author of the file for this texture. (Read Only)

Since:

  • 4.8.1.21

DzVersion : assetFileRevision

Holds the revision version of the asset file for this texture. (Read Only)

Since:

  • 4.8.1.21

String : assetId

Holds the asset id for this texture.

Since:

  • 4.8.1.18

Date : assetModifiedDate

Holds the modified date of the asset file for this texture. (Read Only)

Since:

  • 4.8.1.21

Boolean : assetNeedSave

Holds whether or not the asset for this texture needs to be saved. (Read Only)

Since:

  • 4.11.0.249

DzUri : assetSource

Holds the URI of the asset source for this texture; only valid when the asset is in an embedded state - i.e. modified. (Read Only)

Since:

  • 4.8.1.21

DzUri : assetUri

Holds the asset URI for this texture. (Read Only)

Since:

  • 4.8.1.18

Boolean : size

Holds the size of the texture.

Methods


void : addLayer( DzTextureLayer layer )

Adds a layer to (the bottom of) this layered texture.

Parameter(s):

  • layer - The layer to add.

void : beginEditing()

Must be called before editing and paired with a call to endEditing().


void : copyFrom( DzLayeredTexture texture )

Copies the settings of the given layered texture to this layered texture.

Parameter(s):

  • texture - The layered texture to cupy settings from.

DzTextureLayer : createLayer( String name )

Creates a new (white) layer with the specified name in this layered texture.

Parameter(s):

  • name - The name to assign to the layer.

Return Value:

  • The new layer.

void : endEditing()

Must be called after editing is completed and after beginEditing() is called.


Number : findLayer( DzTextureLayer layer )

Parameter(s):

  • layer - The layer to find the index of in this layered texture.

Return Value:

  • The index of the found layer (if any), otherwise -1.

DzTextureLayer : getLayer( Number index )

Parameter(s):

  • index - The index of the layer to get.

Return Value:

  • The layer at the specified index (if valid), otherwise null.

Number : getNumLayers()

Return Value:

  • The number of layers in this layered texture.

String : getSourceDSI()

Return Value:

  • The full path of the image file for this layered texture.

void : insertLayer( Number index, DzTextureLayer layer )

Inserts a layer into this layered texture at the specified index.

Parameter(s):

  • index - The index to insert the layer at.
  • layer - The layer to insert.

Boolean : moveLayer( Number fromIndex, Number toIndex )

Parameter(s):

  • fromIndex - The index of the layer to move.
  • toIndex - The index to move the layer to.

Return Value:

  • true if the layer is moved, otherwise false.

void : refeshLayeredTexture()

Refreshes each layer of this layered texture.


void : removeAllLayers()

Removes (deletes) all layers from this layered texture.


Boolean : removeLayer( Number index )

Parameter(s):

  • index - The index of the layer to remove (and delete).

Return Value:

  • true if the specified layer is removed from this layered texture, otherwise false.

Boolean : removeLayer( DzTextureLayer layer )

Parameter(s):

  • layer - The layer to remove (and delete).

Return Value:

  • true if the specified layer is removed from this layered texture, otherwise false.

Boolean : replaceLayer( DzTextureLayer oldLayer, DzTextureLayer newLayer )

Parameter(s):

  • oldLayer - The layer in this layered texture to replace.
  • newLayer - The new layer to replace the old layer with.

Return Value:

  • true if replacing the layer succeeds, otherwise false.

DzTextureLayer : takeLayer( Number index )

Removes the layer at the specified index.

Parameter(s):

  • index - The index of the layer to remove.

Return Value:

  • The layer at the specified index (if valid), otherwise null.

Signals


void : aboutToInsertLayers( Number index, Number count )

Signature:“aboutToInsertLayers(int,int)”

Emitted immediately before layers are inserted into this layered texture.

Parameter(s):

  • index - The index of the first layer about to be inserted.
  • count - The number of layers about to be inserted.

void : aboutToRemoveLayers( Number index, Number count )

Signature:“aboutToRemoveLayers(int,int)”

Emitted immediately before layers are removed from this layered texture.

Parameter(s):

  • index - The index of the first layer about to be removed.
  • count - The number of layers about to be removed.

void : assetModified()

Signature:“assetModified()”

Emitted when the layered texture has been modified.


void : assetWasSaved()

Signature:“assetWasSaved()”

Emitted after the layered texture has been saved.


void : layerListChanged()

Signature:“layerListChanged()”

Emitted when the layer list has changed.


void : layersInserted( Number index, Number count )

Signature:“layersInserted(int,int)”

Emitted when layers are inserted into this layered texture.

Parameter(s):

  • index - The index of the first layer inserted.
  • count - The number of layers inserted.

void : layersRemoved( Number index, Number count )

Signature:“layersRemoved(int,int)”

Emitted when layers are removed from this layered texture.

Parameter(s):

  • index - The index of the first layer removed.
  • count - The number of layers removed.

void : sizeChanged( Size size )

Signature:“sizeChanged(const QSize&)”

Emitted when the size of this layered texture has changed.

Parameter(s):

  • size - The new size.