Class CatalogTexture
Defined in: SweetHome3D.js.
Constructor Attributes | Constructor Name and Description |
---|---|
CatalogTexture(id, name, image, width, height, modifiable, creator)
Creates a catalog texture.
|
Method Attributes | Method Name and Description |
---|---|
compareTo(texture)
Compares the names of this texture and the one in parameter.
|
|
equals(obj)
Returns true if this texture and the one in parameter are the same objects.
|
|
Returns the category of this texture.
|
|
Returns the creator of this texture or
null . |
|
Returns the height of the image in centimeters.
|
|
getIcon()
Returns the icon of this texture.
|
|
getId()
Returns the ID of this texture or
null . |
|
getImage()
Returns the content of the image used for this texture.
|
|
getName()
Returns the name of this texture.
|
|
getWidth()
Returns the width of the image in centimeters.
|
|
hashCode()
Returns default hash code.
|
|
Returns
true if this texture is modifiable (not read from resources). |
|
matchesFilter(filter)
Returns
true if this texture matches the given filter text. |
Class Detail
CatalogTexture(id, name, image, width, height, modifiable, creator)
Creates a catalog texture.
Author: Emmanuel Puybaret.
Author: Emmanuel Puybaret.
- Parameters:
- {string} id
- the ID of this texture
- {string} name
- the name of this texture
- {Object} image
- the content of the image used for this texture
- {number} width
- the width of the texture in centimeters
- {number} height
- the height of the texture in centimeters
- {boolean} modifiable
true
if this texture can be modified- {string} creator
Method Detail
{number}
compareTo(texture)
Compares the names of this texture and the one in parameter.
- Parameters:
- {CatalogTexture} texture
- Returns:
- {number}
{boolean}
equals(obj)
Returns true if this texture and the one in parameter are the same objects.
Note that, from version 3.6, two textures can have the same name.
- Parameters:
- {Object} obj
- Returns:
- {boolean}
{TexturesCategory}
getCategory()
Returns the category of this texture.
- Returns:
- {TexturesCategory}
{string}
getCreator()
Returns the creator of this texture or
null
.
- Returns:
- {string}
{number}
getHeight()
Returns the height of the image in centimeters.
- Returns:
- {number}
{Object}
getIcon()
Returns the icon of this texture.
- Returns:
- {Object} the image of this texture.
{string}
getId()
Returns the ID of this texture or
null
.
- Returns:
- {string}
{Object}
getImage()
Returns the content of the image used for this texture.
- Returns:
- {Object}
{string}
getName()
Returns the name of this texture.
- Returns:
- {string}
{number}
getWidth()
Returns the width of the image in centimeters.
- Returns:
- {number}
{number}
hashCode()
Returns default hash code.
- Returns:
- {number}
{boolean}
isModifiable()
Returns
true
if this texture is modifiable (not read from resources).
- Returns:
- {boolean}
{boolean}
matchesFilter(filter)
Returns
true
if this texture matches the given filter
text.
Each substring of the filter
is considered as a search criterion that can match
the name, the category name or the creator of this texture.
- Parameters:
- {string} filter
- Returns:
- {boolean}