Module fmeobjects :: Class FMETexture
[hide private]
[frames] | no frames]

Class FMETexture

object --+
         |
        FMETexture

init()

Create an instance of a blank texture object.

Instance Methods [hide private]
 
__getObject__(args)
 
__init__()
x.__init__(...) initializes x; see help(type(x)) for signature
a new object with type S, a subtype of T
__new__(T, S, ...)
FMETexture
clone()
This routine makes a duplicate of itself.
tuple of floats
getBorderColor()
This routine retrieves the border color of this Texture.
tuple of floats or None
getCenter()
This routine retrieves the center associated with the texture.
tuple of floats
getOffset()
This routine retrieves the offset associated with the texture.
int
getRotation()
This routine retrieves the rotation angle associated with the texture.
tuple of floats or None
getScaling()
This routine retrieves the scaling factors associated with the texture.
tuple of floats
getShear()
This routine retrieves the shearing factors associated with the texture.
int
getTextureWrap()
This routine retrieves the wrapping style associated with the texture.
list of lists of floats
getTransformationMatrix()
This routine retrieves the texture transformation matrix associated with the texture, it is a combination of the rotation, scaling, shear and translation factors, applied in that order.
list of lists of floats
getTransformationMatrixReverse()
This routine retrieves the texture transformation matrix associated with the texture in the reverse order and inverse of each operation, that consists of offset, negative shear, 1 / scale, and negative rotation in that order.
bool
hasNonIdentityTransform()
This routine returns true if any non-default texture transform factors are set.
None
setBorderColor(r, g, b)
This routine sets the border color of this Texture.
None
setCenter(u, v)
This routine sets the center associated with the texture.
None
setOffset(u, v)
This routine sets the offset associated with the texture.
None
setRotation(angle)
This routine sets the rotation angle associated with the texture.
None
setScaling(u, v)
This routine sets the scaling factors associated with the texture.
None
setShear(u, v)
This routine sets the shearing factors associated with the texture.
None
setTextureWrap(wrapStyle)
This routine sets the wrapping style associated with the texture.
None
setTransformationMatrix(matrix)
This routine sets the texture transformation matrix associated with the texture.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__()
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

clone()

 

This routine makes a duplicate of itself.

Returns: FMETexture
Returns a duplicate of the texture

getBorderColor()

 

This routine retrieves the border color of this Texture. The color is a vector in r g b color space with values between 0.0 and 1.0. This will return None if it did not have a border color set.

Returns: tuple of floats
The border color, formatted (ddd) (r, g, b).

getCenter()

 

This routine retrieves the center associated with the texture. This will return None if the center is the default center of (0,0). The center is only used for shearing and rotation.

Returns: tuple of floats or None
The center, formatted (dd) (u, v).

getOffset()

 

This routine retrieves the offset associated with the texture. This will return None if the offset is the default offset of (0,0).

Returns: tuple of floats
The offset, formatted (dd) (u, v).

getRotation()

 

This routine retrieves the rotation angle associated with the texture. The angle is stored in degrees CCW from the x-axis, and is by default 0. Rotation is centered according to the Center variable. This return None if the scaling is the default angle of 0.

Returns: int
The angle of rotation.

getScaling()

 

This routine retrieves the scaling factors associated with the texture. This will return None if the scaling is the default scaling of (1,1).

Returns: tuple of floats or None
The scaling factors, formatted (dd) (u, v), or None.

getShear()

 

This routine retrieves the shearing factors associated with the texture. Shearing is centered according to the Center variable. This will return None if the shearing is the default shearing of (0,0).

Returns: tuple of floats
The shearing factors, formatted (dd) (u, v).

getTextureWrap()

 

This routine retrieves the wrapping style associated with the texture. The style is stored as a FME_TextureWrap value, and is by default FME_TEXTURE_REPEAT_BOTH, which results in the texture being tiled in both the u and v direction.

Returns: int
The wrapping style associated with the texture.

getTransformationMatrix()

 

This routine retrieves the texture transformation matrix associated with the texture, it is a combination of the rotation, scaling, shear and translation factors, applied in that order.

Returns: list of lists of floats
The texture's tranformation matrix, formatted [[ddd][ddd]].

getTransformationMatrixReverse()

 

This routine retrieves the texture transformation matrix associated with the texture in the reverse order and inverse of each operation, that consists of offset, negative shear, 1 / scale, and negative rotation in that order. This matrix can be used to transform the texture coordinates that are associated with this texture.

Returns: list of lists of floats
The texture's tranformation matrix, formatted [[ddd][ddd]].

hasNonIdentityTransform()

 

This routine returns true if any non-default texture transform factors are set. The default texture transform matrix is identity and this returns false.

Returns: bool
Returns True if any non-default texture transform factors are set, or False otherwise.

setBorderColor(r, g, b)

 

This routine sets the border color of this Texture. The color values should be in r g b color space withvalues between 0.0 and 1.0. The border color is used only if the FME_TextureWrap value is set to FME_TEXTURE_BORDER_FILL. Setting the border color will also set the FME_TextureWrap value to FME_TEXTURE_BORDER_FILL. Setting the any color value to a negative value will remove the color from this Texture and the FME_TextureWrap value will be reset to FME_TEXTURE_REPEAT_BOTH. If the underlying raster is single channel, the gray-scale equivalent border color will be calculated.

Parameters:
  • r (float) - The r value of the border color of this Texture.
  • g (float) - The g value of the border color of this Texture.
  • b (float) - The b value of the border color of this Texture.
Returns: None

setCenter(u, v)

 

This routine sets the center associated with the texture. The default center for a texture is (0,0). The center is only used for shearing and rotation.

Parameters:
  • u (float) - The u point of center.
  • v (float) - The v point of the center.
Returns: None

setOffset(u, v)

 

This routine sets the offset associated with the texture. The default offset for a texture is (0,0).

Parameters:
  • u (float) - The u point of offset.
  • v (float) - The v point of the offset.
Returns: None

setRotation(angle)

 

This routine sets the rotation angle associated with the texture. Rotation is centered according to the Center variable. The angle is stored in degrees CCW from the x-axis, and is by default 0.

Parameters:
  • angle (float) - The angle OF the rotation.
Returns: None

setScaling(u, v)

 

This routine sets the scaling factors associated with the texture. The default scaling for a texture is (1,1).

Parameters:
  • u (float) - The u scaling factor.
  • v (float) - The v scaling factor.
Returns: None

setShear(u, v)

 

This routine sets the shearing factors associated with the texture. Shearing is centered according to the Center variable. The default shearing for a texture is (0,0).

Parameters:
  • u (float) - The u shear factor.
  • v (float) - The v shear factor.
Returns: None

setTextureWrap(wrapStyle)

 

This routine sets the wrapping style associated with the texture. The style is stored as a FME_TextureWrap value. If the style is set to FME_TEXTURE_BORDER_FILL, the default border color of black (0,0,0), will be set. If the style is set to something other than FME_TEXTURE_BORDER_FILL, the border color will be removed from the texture.

Parameters:
  • wrapStyle (int) - The wrapping style associated with the texture.
Returns: None

setTransformationMatrix(matrix)

 

This routine sets the texture transformation matrix associated with the texture. The shear, offset, rotation and will be calculated from the matrix so that when rotation, shear, scale and translation are applied in order, it is the equivalent of the input matrix. If the non-translation component of the matrix has a zero determinant or m[0][0] = 0, the matrix will not be used and existing parameters will remain unchanged.

Parameters:
  • matrix (list of lists of floats) - The transformation matrix, formatted [[ddd][ddd]].
Returns: None