Describes a material.
More...
List of all members.
Properties |
BSTR | Name [get] |
| [propget] Returns the name of the material.
|
BOOL | IsColor [get] |
| [propget] Determines whether the material is actually a color, with no associated texture.
|
BOOL | IsTexture [get] |
| [propget] Determines whether the material is actually a texture.
|
OLE_COLOR | Color [get] |
| [propget] Retrieve the color (either intrinsic or average) of this material.
|
ISkpTexture | Texture [get] |
| [propget] Retrieve the texture of this material.
|
double | Alpha [get] |
| Get the alpha value associated with this material.
|
BOOL | UsesAlpha [get] |
| Get whether or not this material uses the alpha property.
|
BOOL | IsDrawnTransparent [get] |
| [propget] Returns true if either this texture references an image that has an active alpha channel, or the texture uses transparency.
|
BOOL | HasTextureAlphaChannel [get] |
| [propget] Returns true if this texture references an image that has an active alpha channel.
|
Detailed Description
Describes a material.
Property Documentation
double ISkpMaterial::Alpha [get] |
Get the alpha value associated with this material.
- Return values:
-
| pAlpha | A value ranging from 0..1 where 1 indicates fully opaque and 0 indicates fully transparent. |
OLE_COLOR ISkpMaterial::Color [get] |
[propget] Retrieve the color (either intrinsic or average) of this material.
Materials come in two varieties: those with textures and those that are simple colors. If the material is of type color, this method will return that color. Otherwise, the material is of type texture, and this method will return the average color of the texture.
- See also:
- ISkpMaterial::IsColor
- Return values:
-
| pVal | The color of this material as described above. |
- Returns:
- S_OK : if successful
E_POINTER : if any of the required arguments are NULL
E_FAIL : internal errors
BOOL ISkpMaterial::HasTextureAlphaChannel [get] |
[propget] Returns true if this texture references an image that has an active alpha channel.
- Return values:
-
| pVal | TRUE iff this material contains transparency |
BOOL ISkpMaterial::IsColor [get] |
[propget] Determines whether the material is actually a color, with no associated texture.
Materials come in two varieties: those with textures and those that are simple colors. This method is used to determine whether this material is simply a color material.
A material is either of type color, or type texture, it cannot be neither, nor can it be both.
- See also:
- ISkpMaterial::IsTexture
- Return values:
-
| pVal | TRUE iff this material is a color. |
- Returns:
- S_OK : if successful
E_POINTER : if any of the required arguments are NULL
E_FAIL : internal errors
BOOL ISkpMaterial::IsDrawnTransparent [get] |
[propget] Returns true if either this texture references an image that has an active alpha channel, or the texture uses transparency.
- Return values:
-
| pVal | TRUE iff this material is transparent |
BOOL ISkpMaterial::IsTexture [get] |
[propget] Determines whether the material is actually a texture.
Materials come in two varieties: those with textures and those that are simple colors. This method is used to determine whether this material is associated with a texture. If so, use the ISkpMaterial::Texture property and refer to the ISkpTexture interface.
A material is either of type color, or type texture, it cannot be neither, nor can it be both.
- See also:
- ISkpMaterial::IsColor
- Return values:
-
| pVal | TRUE iff this material is a texture. |
- Returns:
- S_OK : if successful
E_POINTER : if any of the required arguments are NULL
E_FAIL : internal errors
BSTR ISkpMaterial::Name [get] |
[propget] Returns the name of the material.
- Return values:
-
| pVal | The name of the material. |
- Returns:
- S_OK : if successful
E_POINTER : if any of the required arguments are NULL
E_FAIL : internal errors
[propget] Retrieve the texture of this material.
Materials come in two varieties: those with textures and those that are simple colors. If the material has a texture associated with it, this method will retrieve it. Otherwise, this method will set pVal to NULL and return S_FALSE.
- See also:
- ISkpMaterial::Texture
- Return values:
-
| pVal | The texture related to this material as described above. |
- Returns:
- S_OK : if successful
S_FALSE : if the material does not have a texture
E_POINTER : if any of the required arguments are NULL
E_FAIL : internal errors
BOOL ISkpMaterial::UsesAlpha [get] |
Get whether or not this material uses the alpha property.
- Return values:
-
| pVal | TRUE iff the material uses the Alpha property. |