Package com.luciad.view.lightspeed.style
Class TLspFillStyle
java.lang.Object
com.luciad.view.lightspeed.style.ALspStyle
com.luciad.view.lightspeed.style.TLspFillStyle
- All Implemented Interfaces:
ILspEffectsHintStyle
,ILspTexturedStyle
,ILspWorldElevationStyle
,ILspStyler
public class TLspFillStyle
extends ALspStyle
implements ILspTexturedStyle, ILspWorldElevationStyle, ILspEffectsHintStyle
Style that defines a shape's fill. A fill can be one of the following:
- Solid color fills
- Colored stipple patterns (e.g. hatching)
- Textures: an image, icon or texture object is used to fill the geometry.
Builder
design pattern mechanism.- Since:
- 2012.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
TLspFillStyle.Builder<B extends TLspFillStyle.Builder<B>>
Builder used to create fill styles.static class
Represents a 2D stipple pattern, which is specified by a 32x32 grid of bits.Nested classes/interfaces inherited from interface com.luciad.view.lightspeed.style.ILspEffectsHintStyle
ILspEffectsHintStyle.EffectsHint
Nested classes/interfaces inherited from interface com.luciad.view.lightspeed.style.ILspTexturedStyle
ILspTexturedStyle.TextureCoordinatesMode
Nested classes/interfaces inherited from interface com.luciad.view.lightspeed.style.ILspWorldElevationStyle
ILspWorldElevationStyle.ElevationMode
-
Constructor Summary
ModifierConstructorDescriptionprotected
TLspFillStyle
(TLspFillStyle.Builder<?> aBuilder) Creates a new style with the properties that are set on the builder -
Method Summary
Modifier and TypeMethodDescriptionCreates a new builder initialized with all the properties of this style.boolean
getColor()
Gets the color.Returns the effects hints specified for this style.Returns the elevation mode of this style.Gets the stipple pattern used for the fill.Gets the texture used for the fill.Specifies whether the texture coordinates computed to apply the texture map should be relative to the bounds of the object or relative to the world.Returns the texture icon used for the fill, if any.Specifies whether linear filtering should be used for the texture map.void
getTextureMatrixSFCT
(double[] aMatrixSFCT) Returns a 4x4 matrix that should be applied to the texture coordinates when mapping the texture given by this style.Returns the texture object to be used.int
hashCode()
boolean
Returns true if the texture should be repeated (or tiled).boolean
Determines whether this style is transparent.static TLspFillStyle.Builder
<?> Creates a new builder with the default values.toString()
Methods inherited from class com.luciad.view.lightspeed.style.ALspStyle
addStyleChangeListener, getZOrder, isCompatible, removeStyleChangeListener, style
-
Constructor Details
-
TLspFillStyle
Creates a new style with the properties that are set on the builder- Parameters:
aBuilder
- a builder which will be used to initialize this style.
-
-
Method Details
-
newBuilder
Creates a new builder with the default values.- Returns:
- the new builder.
-
asBuilder
Creates a new builder initialized with all the properties of this style. -
getColor
Gets the color.- Returns:
- the color
-
isTransparent
public boolean isTransparent()Description copied from class:ALspStyle
Determines whether this style is transparent. Shapes that are transparent can be painted in a different paint phase than shapes that are not transparent.- Specified by:
isTransparent
in classALspStyle
- Returns:
- whether or not this style is transparent
-
getTexture
Gets the texture used for the fill. Can benull
.- Specified by:
getTexture
in interfaceILspTexturedStyle
- Returns:
- the texture used for the fill, can be
null
.
-
getTextureObject
Description copied from interface:ILspTexturedStyle
Returns the texture object to be used.- Specified by:
getTextureObject
in interfaceILspTexturedStyle
- Returns:
- the texture object
-
getTextureIcon
Returns the texture icon used for the fill, if any. Usually a texture icon is preferred over a RenderedImage because it has better results when printing at high resolutions.- Returns:
- the texture icon used for the fill, or
null
-
isRepeatTexture
public boolean isRepeatTexture()Returns true if the texture should be repeated (or tiled). If false, texture coordinates outside the [0, 1] range are clamped.- Specified by:
isRepeatTexture
in interfaceILspTexturedStyle
- Returns:
- true if the texture should be repeated (or tiled)
-
getTextureInterpolationType
Description copied from interface:ILspTexturedStyle
Specifies whether linear filtering should be used for the texture map.- Specified by:
getTextureInterpolationType
in interfaceILspTexturedStyle
- Returns:
- whether linear texture filtering should be used
-
getTextureCoordinatesMode
Description copied from interface:ILspTexturedStyle
Specifies whether the texture coordinates computed to apply the texture map should be relative to the bounds of the object or relative to the world. In the former case, the map is scaled and offset such that it fills the bounds (in model coordinates) of the object. In the latter case, the model coordinates of the object are used as texture coordinates unmodified.- Specified by:
getTextureCoordinatesMode
in interfaceILspTexturedStyle
- Returns:
- the mode indicating how the texture should be mapped on the object being styled
-
getTextureMatrixSFCT
public void getTextureMatrixSFCT(double[] aMatrixSFCT) Description copied from interface:ILspTexturedStyle
Returns a 4x4 matrix that should be applied to the texture coordinates when mapping the texture given by this style. This can be used to scale, rotate or otherwise transform the texture.- Specified by:
getTextureMatrixSFCT
in interfaceILspTexturedStyle
- Parameters:
aMatrixSFCT
- array containing the elements of a 4x4 matrix in column-major order
-
getStipplePattern
Gets the stipple pattern used for the fill. Can benull
.- Returns:
- the stipple pattern used for the fill, can be
null
.
-
getElevationMode
Description copied from interface:ILspWorldElevationStyle
Returns the elevation mode of this style.- Specified by:
getElevationMode
in interfaceILspWorldElevationStyle
- Returns:
- The elevation mode.
-
getEffectsHints
Description copied from interface:ILspEffectsHintStyle
Returns the effects hints specified for this style.- Specified by:
getEffectsHints
in interfaceILspEffectsHintStyle
- Returns:
- the effects hints specified for this style
-
hashCode
public int hashCode() -
equals
-
toString
-