public class Style
extends java.lang.Object
implements java.io.Serializable
Style class
This class is used to define maker symbol, line symbol, filled symbol style, and related attributes.
fillGradientMode
is FillGradientMode.NONE
), user can fill it with images or vector symbols, if user wants to fill it with the image, needs in SuperMap convert images to symbols Deskpro and fill itwith symbols; In the gradient filling mode, there are four types of gradients to choose: linear fill gradient mode(FillGradientMode.LINEAR
)、radial fill gradient mode(FillGradientMode.RADIAL
)、conical fill gradient mode(FillGradientMode.CONICAL
) and square fill gradient mode(FillGradientMode.SQUARE
).Modifier and Type | Field and Description |
---|---|
Color |
fillBackColor
${services_components_commontypes_Style_attribute_fillBackColor_Title}
|
boolean |
fillBackOpaque
${services_components_commontypes_Style_attribute_fillBackOpaque_Title}
|
Color |
fillForeColor
${services_components_commontypes_Style_attribute_fillForeColor_Title}
|
double |
fillGradientAngle
Rotation angle of Gradient fill.
|
FillGradientMode |
fillGradientMode
The gradient type of gradient fill style.
|
double |
fillGradientOffsetRatioX
${services_components_commontypes_Style_attribute_fillGradientOffsetRatioX_Title}
|
double |
fillGradientOffsetRatioY
${services_components_commontypes_Style_attribute_fillGradientOffsetRatioY_Title}
|
int |
fillOpaqueRate
${services_components_commontypes_Style_attribute_fillOpaqueRate_Title}
|
int |
fillSymbolID
${services_components_commontypes_Style_attribute_fillSymbolID_Title}
|
Color |
lineColor
When the symbol is a linear symbol, the color of the sideline is represented; When the symbol is a maker symbol, the color of the maker is represented.
|
int |
lineSymbolID
${services_components_commontypes_Style_attribute_lineSymbolID_Title}
|
double |
lineWidth
${services_components_commontypes_Style_attribute_lineWidth_Title}
|
double |
markerAngle
${services_components_commontypes_Style_attribute_markerAngle_Title}
|
double |
markerHeight
The height of maker symbol.
|
double |
markerSize
Deprecated.
|
int |
markerSymbolID
${services_components_commontypes_Style_attribute_markerSymbolID_Title}
|
double |
markerWidth
The width of maker symbol.
|
Constructor and Description |
---|
Style()
${services_components_commontypes_Style_constructorByDefault_Title}
|
Style(Style style)
${services_components_commontypes_Style_constructorByStyle_Title}
|
public double fillGradientAngle
Rotation angle of Gradient fill.
In unit of degree, the accuracy is 0.1 degree, counterclockwise direction is positive.
For definitions of each gradient fill style type, please see FillGradientMode
.
For different gradient fill, the effect after its rotation is different, but each rotating center is the center of the smallest external rectangle, rotating anticlockwise.
1、Linear gradient(Linear)
When setting angle as arbitrary angle of 0-360 degrees, the passing start and end points rotates anticlockwise, its rotation center is the center of the minimum circumscribed rectangle, the gradient style rotates, the linear gradient still graduates from the start to the termination of the line. The gradient style of the special angle is displayed below:
(a) When the gradient fill angle is set to 0 degree or 360 degrees, then the gradient fill style is the linear gradient from left to right from the start color to the termination color, the start color is yellow, the termination color is pink as shown in figure;
(b) When the gradient fill angle is set to 180 degrees, the gradient fill style is opposite to the style described in (a), that is from right to left from the start color to the termination color;
(c) When the gradient fill angle is set to 90 degrees, the gradient fill style is from bottom to top from the start color to the termination color;
(d) When the gradient fill angle is set to 270 degrees, the gradient fill style is opposite to the style described in (c), that is from top to bottom from the start color to the termination color;
2、Radial gradient(Radial)
When the gradient angle is set to any angle (not beyond the normal range), it will define the radiation gradient round rotating according to the set angle, because the circle is symmetrical about the center of minimum circumscribed rectangle of the filling range, so after rotation, the gradient fill style always stays the same, that is, the radial gradient from center to the boundary of filling range, from foreground color to background color.
3、Conical gradient (Conical)
When the gradient Angle is set to any angle between 0-360 degrees, all generating lines of the cone will rotate, in the center of the cone, the center of the minimum circumscribed rectangle of the fill area is as the center of rotation, rotating anticlockwise. As the example shown in figure, the rotation angle is 90 degrees, all the generating lines rotate from the starting position (the position of the zero rotation angle) to the specified angle, takes the generating lines which pass the starting point as an example, they rotate from 0 degree to 90 degrees.
![]() |
![]() |
4、Square gradient (Square)
According to the given gradient angle, the gradient square rotates as the center of the fill area range, all the square start to rotate from the initial default position where the rotation angle is zero. The gradient is still from the internal square to the external square, from the start color to the termination color.
public Color fillBackColor
${services_components_commontypes_Style_attribute_fillBackColor_Title}
${services_components_commontypes_Style_attribute_fillBackColor_Description}
public boolean fillBackOpaque
${services_components_commontypes_Style_attribute_fillBackOpaque_Title}
${services_components_commontypes_Style_attribute_fillBackOpaque_Description}
public double fillGradientOffsetRatioX
${services_components_commontypes_Style_attribute_fillGradientOffsetRatioX_Title}
${services_components_commontypes_Style_attribute_fillGradientOffsetRatioX_Description}
public double fillGradientOffsetRatioY
${services_components_commontypes_Style_attribute_fillGradientOffsetRatioY_Title}
${services_components_commontypes_Style_attribute_fillGradientOffsetRatioY_Description}
public Color fillForeColor
${services_components_commontypes_Style_attribute_fillForeColor_Title}
${services_components_commontypes_Style_attribute_fillForeColor_Description}
public FillGradientMode fillGradientMode
The gradient type of gradient fill style.
public int fillOpaqueRate
${services_components_commontypes_Style_attribute_fillOpaqueRate_Title}
${services_components_commontypes_Style_attribute_fillOpaqueRate_Description}
public int fillSymbolID
${services_components_commontypes_Style_attribute_fillSymbolID_Title}
${services_components_commontypes_Style_attribute_fillSymbolID_Description}
public Color lineColor
When the symbol is a linear symbol, the color of the sideline is represented; When the symbol is a maker symbol, the color of the maker is represented.
public int lineSymbolID
${services_components_commontypes_Style_attribute_lineSymbolID_Title}
${services_components_commontypes_Style_attribute_lineSymbolID_Description}
public double lineWidth
${services_components_commontypes_Style_attribute_lineWidth_Title}
${services_components_commontypes_Style_attribute_lineWidth_Description}
public double markerAngle
${services_components_commontypes_Style_attribute_markerAngle_Title}
${services_components_commontypes_Style_attribute_markerAngle_Description}
@Deprecated public double markerSize
The size of maker symbol.
The unit is : mm. The size of maker symbol and the display size of the maker are two concepts, and the set is the size of the maker symbol here.
Abolishes from 7.2.0, uses markerWidth和markerHeight instead
public double markerWidth
The width of maker symbol.
The unit is : mm.
public double markerHeight
The height of maker symbol.
The unit is : mm.
public int markerSymbolID
${services_components_commontypes_Style_attribute_markerSymbolID_Title}
${services_components_commontypes_Style_attribute_markerSymbolID_Description}
public Style()
${services_components_commontypes_Style_constructorByDefault_Title}
${services_components_commontypes_Style_constructorByDefault_Description}
public Style(Style style)
${services_components_commontypes_Style_constructorByStyle_Title}
${services_components_commontypes_Style_constructorByStyle_Description}
style
- ${services_components_commontypes_Style_constructorByStyle_param_style}java.lang.IllegalArgumentException
- ${services_components_commontypes_Style_constructorByStyle_exception_IllegalArgumentException}public int hashCode()
${services_components_commontypes_Style_method_hashCode_Title}
${services_components_commontypes_Style_method_hashCode_Description}
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
${services_components_commontypes_Style_method_equals_Title}
${services_components_commontypes_Spheroid_method_equals_Description}
equals
in class java.lang.Object
obj
- ${services_components_commontypes_Style_method_equals_param_obj}public java.lang.String toString()
toString
in class java.lang.Object