|
TorqueScript Reference
|
#include <ImageAsset_ScriptBinding.h>
Inherits AssetBase.
| Boolean addExplicitCell | ( | int | cellOffsetX, |
| int | cellOffsetY, | ||
| int | cellWidth, | ||
| int | cellHeight, | ||
| string | cellName | ||
| ) |
Add an explicit cell.
| cellOffsetX | The offset in the X axis to the top-left of the cell. |
| cellOffsetY | The offset in the Y axis to the top-left of the cell. |
| cellWidth | The width of the cell. |
| cellHeight | The height of the cell. |
| cellName | The name of the cell's region. The image asset must be in explicit mode for this operation to succeed. |
| void addLayer | ( | imageFile | , |
| position | , | ||
| blendColor | |||
| ) |
Adds a layer to the ImageAsset
| imageFile | The file for the image to layer over the texture. |
| position | The position for the layer to be at with (0, 0) in the top left corner. |
| blendColor | The blending color to be applied to this new layer. |
| doRedraw | Optional value that prevents a redraw of the texture when false. Defaults to true. |
| Boolean clearExplicitCells | ( | ) |
Clears all explicit cells. The image asset stays in explicit mode however with no explicit cells a single full-frame cell becomes default.
| void forceRedraw | ( | ) |
Forces the texture to redraw its layers. Redrawing can be expensive and is automatically done on every change to a layer unless prevented.
| String getBlendColor | ( | ) |
Returns the blend color for the base texture when using layers.
| Integer getCellCountX | ( | ) |
Gets the CELL count X.
| Integer getCellCountY | ( | ) |
Gets the CELL count Y.
| Integer getCellHeight | ( | ) |
Gets the CELL height.
| Integer getCellOffsetX | ( | ) |
Gets the CELL offset X.
| Integer getCellOffsetY | ( | ) |
Gets the CELL offset Y.
| Boolean getCellRowOrder | ( | ) |
Gets whether CELL row order should be used or not.
| Integer getCellStrideX | ( | ) |
Gets the CELL stride X.
| Integer getCellStrideY | ( | ) |
Gets the CELL stride Y.
| Integer getCellWidth | ( | ) |
Gets the CELL width.
| Integer getExplicitCellCount | ( | ) |
Gets the explicit cell count.
| Integer getExplicitCellHeight | ( | cell | ) |
Gets the CELL height in Explicit Mode.
| cell | The cell index or cell name to use to find the specific height. |
| Integer getExplicitCellIndex | ( | cellName | ) |
Gets the CELL index number in Explicit Mode.
| cellName | The cell name to use to find the specific index. |
| String getExplicitCellName | ( | cell | ) |
Gets the CELL region name in Explicit Mode.
| cell | The cell index to use to find the specific name. |
| String getExplicitCellOffset | ( | cell | ) |
Gets the CELL offset in Explicit Mode.
| cell | The cell index or cell name to use to find the specific offset. |
| Integer getExplicitCellWidth | ( | cell | ) |
Gets the CELL width in Explicit Mode.
| cell | The cell index or cell name to use to find the specific width. |
| Boolean getExplicitMode | ( | ) |
Gets the status of Explicit mode
| String getFilterMode | ( | ) |
Gets the filter mode.
| Boolean getForce16Bit | ( | ) |
Gets whether 16-bit image is forced or not.
| Integer getFrameCount | ( | ) |
Gets the frame count.
| String getFrameSize | ( | int | frame | ) |
Gets the specified frames size.
| frame | The frame number to use. |
| String getImageFile | ( | ) |
Gets the image file.
| Integer getImageHeight | ( | ) |
Gets the image height.
| String getImageSize | ( | ) |
Gets the image size.
| Integer getImageWidth | ( | ) |
Gets the image width.
| Boolean getIsImagePOT | ( | ) |
Gets whether the image has a power-of-two dimensions or not.
| String getLayerBlendColor | ( | index | ) |
Returns the blend color for a given layer.
| index | The one-based index to move to the back. Must be less or equal to the number of layers. |
| Integer getLayerCount | ( | ) |
Returns the number of layers.
| String getLayerImage | ( | index | ) |
Returns image used for a given layer.
| index | The one-based index to move to the back. Must be less or equal to the number of layers. |
| String getLayerPosition | ( | index | ) |
Returns position for a given layer.
| index | The one-based index to move to the back. Must be less or equal to the number of layers. |
| String getRelativeImageFile | ( | ) |
Gets the image file.
| Boolean insertExplicitCell | ( | int | cellIndex, |
| int | cellOffsetX, | ||
| int | cellOffsetY, | ||
| int | cellWidth, | ||
| int | cellHeight, | ||
| string | cellName | ||
| ) |
Insert an explicit cell at the specified index.
| cellIndex | The zero-based index to insert the cell. This will work when no cells are present. If the index is beyond the cell count then the cell is simply added. |
| cellOffsetX | The offset in the X axis to the top-left of the cell. |
| cellOffsetY | The offset in the Y axis to the top-left of the cell. |
| cellWidth | The width of the cell. |
| cellHeight | The height of the cell. |
| cellName | The name of the cell's region. The image asset must be in explicit mode for this operation to succeed. |
| void insertLayer | ( | index | , |
| imageFile | , | ||
| position | , | ||
| blendColor | |||
| ) |
Inserts a layer into the stack of layers on a texture at a given index.
| index | The one-based index to insert the new layer at. Must be less or equal to the number of layers. |
| imageFile | The file for the image to layer over the texture. |
| position | The position for the layer to be at with (0, 0) in the top left corner. |
| blendColor | The blending color to be applied to this new layer. |
| doRedraw | Optional value that prevents a redraw of the texture when false. Defaults to true. |
| void moveLayerBackward | ( | index | ) |
Moves the layer at the index backward.
| index | The one-based index to move backward. Must be less or equal to the number of layers. |
| doRedraw | Optional value that prevents a redraw of the texture when false. Defaults to true. |
| void moveLayerForward | ( | index | ) |
Moves the layer at the index forward.
| index | The one-based index to move forward. Must be less or equal to the number of layers. |
| doRedraw | Optional value that prevents a redraw of the texture when false. Defaults to true. |
| void moveLayerToBack | ( | index | ) |
Moves the layer at the index to the back.
| index | The one-based index to move to the back. Must be less or equal to the number of layers. |
| doRedraw | Optional value that prevents a redraw of the texture when false. Defaults to true. |
| void moveLayerToFront | ( | index | ) |
Moves the layer at the index to the front.
| index | The one-based index to move to the front. Must be less or equal to the number of layers. |
| doRedraw | Optional value that prevents a redraw of the texture when false. Defaults to true. |
| Boolean removeExplicitCell | ( | int | cellIndex | ) |
Remove an explicit cell from the specified index.
| cellIndex | The zero-based index to remove the cell from. |
| void removeLayer | ( | index | ) |
Removes a layer from a texture at a given index.
| index | The one-based index to remove the new layer from. Must be less or equal to the number of layers. |
| doRedraw | Optional value that prevents a redraw of the texture when false. Defaults to true. |
| void setBlendColor | ( | blendColor | ) |
Sets the blend color for the base image when using layers.
| blendColor | The space-deliminated color used to blend the layer. Requires four decimal values between 0 and 1 that represent red, green, blue, and alpha. |
| doRedraw | Optional value that prevents a redraw of the texture when false. Defaults to true. |
| void setCellCountX | ( | countX | ) |
Sets the CELL count X.
| void setCellCountY | ( | countY | ) |
Sets the CELL count Y.
| void setCellHeight | ( | Height | ) |
Sets the CELL height.
| void setCellOffsetX | ( | offsetX | ) |
Sets the CELL offset X.
| void setCellOffsetY | ( | offsetY | ) |
Sets the CELL offset Y.
| void setCellRowOrder | ( | rowOrder? | ) |
Sets whether CELL row order should be used or not.
| void setCellStrideX | ( | strideX | ) |
Sets the CELL stride X.
| void setCellStrideY | ( | strideY | ) |
Sets the CELL stride Y.
| void setCellWidth | ( | Width | ) |
Sets the CELL width.
| Boolean setExplicitCell | ( | int | cellIndex, |
| int | cellOffsetX, | ||
| int | cellOffsetY, | ||
| int | cellWidth, | ||
| int | cellHeight, | ||
| string | cellName | ||
| ) |
Set an explicit cell at the specified index.
| cellIndex | The zero-based index to set the cell. |
| cellOffsetX | The offset in the X axis to the top-left of the cell. |
| cellOffsetY | The offset in the Y axis to the top-left of the cell. |
| cellWidth | The width of the cell. |
| cellHeight | The height of the cell. |
| cellName | The name of the cell's region. The image asset must be in explicit mode for this operation to succeed. |
| void setExplicitMode | ( | explicitMode | ) |
Sets Explicit Mode
| explicitMode | Whether to set Explicit Mode or disable it |
| void setFilterMode | ( | mode | ) |
Sets the filter mode.
| void setForce16Bit | ( | force16Bit? | ) |
Sets whether 16-bit image is forced or not.
| void setImageFile | ( | ImageFile | ) |
Sets the image file (bitmap file).
| void setLayerBlendColor | ( | index | , |
| blendColor | |||
| ) |
Sets the blend color for a layer at the given index.
| index | The one-based index to move to the back. Must be less or equal to the number of layers. |
| blendColor | The space-deliminated color used to blend the layer. Requires four decimal values between 0 and 1 that represent red, green, blue, and alpha. |
| doRedraw | Optional value that prevents a redraw of the texture when false. Defaults to true. |
| void setLayerImage | ( | index | , |
| image | |||
| ) |
Sets the image for a layer at the given index.
| index | The one-based index to move to the back. Must be less or equal to the number of layers. |
| image | The path to an image to be used by the layer. |
| doRedraw | Optional value that prevents a redraw of the texture when false. Defaults to true. |
| void setLayerPosition | ( | index | , |
| position | |||
| ) |
Sets the position for a layer at the given index.
| index | The one-based index to move to the back. Must be less or equal to the number of layers. |
| position | The space-deliminated (x, y) position to place the image with the top left corner as (0, 0). The layer can safely overflow the bounds of the original image. |
| doRedraw | Optional value that prevents a redraw of the texture when false. Defaults to true. |