Package armyc2.c5isr.renderer.utilities
Class RendererSettings
java.lang.Object
armyc2.c5isr.renderer.utilities.RendererSettings
Static class that holds the setting for the JavaRenderer.
Allows different parts of the renderer to know what
values are being used.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic int
static int
static int
static final int
Adds a level of complexity to the rendering but is much faster for certain objects.static final int
Everything that comes back from the Renderer is a Java Shape.static final int
static final int
static final int
There will be a colored box behind the textstatic final int
There will be no background for textstatic final int
There will be an adjustable outline around the text Outline width of 4 is recommended.static final int
Deprecated.- useful on java port, actually slower on android -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
boolean
boolean
int
int
int
int
int
boolean
True to draw as modifier label in the "E/F" location.static RendererSettings
float
get font object used for labelsString[]
get font object used for labelsthe font name to be used for modifier labelsint
get font point sizeint
Like Font.BOLDDeprecated.usegetMPLabelFont()
Deprecated.int
Deprecated.int
Deprecated.usegetMPLabelFontType()
}int
boolean
boolean
When true, if the main icon is normally small to allow room for sector modifiers, main icon is made larger when no sector modifiers are present for better visibility.int
int
Deprecated.float
Deprecated.int
Value from 0 to 255.int
None, outline (default), or filled background.int
Deprecated.boolean
Get a boolean indicating between the use of ENY labels in all segments (false) or to only set 2 labels one at the north and the other one at the south of the graphic (true).float
Deprecated.boolean
Returns the current setting for Line Interpolation.void
setActionPointDefaultFill
(boolean value) If true, set fill based on affiliation color for Action Points, Sonobuoys, ACP, CCP, PUP.void
setAutoCollapseModifiers
(boolean value) Collapse Modifiers for fire support areas when the symbol isn't large enough to show all the labels.void
setCacheEnabled
(boolean active) void
setCacheSize
(float percentage) Set the cache size as a percentage of VM memory available to the app.void
setCacheSize
(int bytes) Set the cache size in bytes.void
setDefaultPixelSize
(int size) void
setDeviceDPI
(int size) void
setDeviceHeight
(int height) void
setDeviceWidth
(int width) void
setDrawAffiliationModifierAsLabel
(boolean value) Determines how to draw the Affiliation modifier.void
setModifierFont
(String name, int type, int size) void
setModifierFont
(String name, int type, int size, Boolean kerning, float tracking) Deprecated.void
setMPLabelFont
(String name, int type, int size) Sets the font to be used for multipoint modifier labelsvoid
setMPLabelFont
(String name, int type, int size, float kmlScale) Sets the font to be used for multipoint modifier labelsvoid
setMPModifierFont
(String name, int type, int size) Deprecated.void
setMPModifierFont
(String name, int type, int size, float kmlScale) Deprecated.void
setOperationalConditionModifierType
(int value) Set the operational condition modifier to be slashes or barsvoid
setOutlineSPControlMeasures
(boolean value) void
setScaleMainIcon
(boolean scaleMainIcon) When true, if the main icon is normally small to allow room for sector modifiers, make it larger when no sector modifiers are present for better visibility.void
setSeaMineRenderMethod
(int method) void
setTextBackgroundAutoColorThreshold
(int value) Value from 0 to 255.void
setTextBackgroundMethod
(int textBackgroundMethod) None, outline (default), or filled background.void
setTwoLabelOnly
(boolean TwoLabelOnly) Set a boolean indicating between the use of ENY labels in all segments (false) or to only set 2 labels one at the north and the other one at the south of the graphic (true).void
setUseLineInterpolation
(boolean value) For lines symbols with "decorations" like FLOT or LOC, when points are too close together, we will start dropping points until we get enough space between 2 points to draw the decoration.
-
Field Details
-
TextBackgroundMethod_NONE
There will be no background for text- See Also:
-
TextBackgroundMethod_COLORFILL
There will be a colored box behind the text- See Also:
-
TextBackgroundMethod_OUTLINE
There will be an adjustable outline around the text Outline width of 4 is recommended.- See Also:
-
TextBackgroundMethod_OUTLINE_QUICK
Deprecated.- useful on java port, actually slower on androidA different approach for outline which is quicker and seems to use less memory. Also, you may do well with a lower outline thickness setting compared to the regular outlining approach. Outline Width of 2 is recommended.- See Also:
-
RenderMethod_SHAPES
Everything that comes back from the Renderer is a Java Shape. Simpler, but can be slower when rendering modifiers or a large number of single point symbols. Not recommended- See Also:
-
RenderMethod_NATIVE
Adds a level of complexity to the rendering but is much faster for certain objects. Modifiers and single point graphics will render faster. MultiPoints will still be shapes. Recommended- See Also:
-
OperationalConditionModifierType_SLASH
-
OperationalConditionModifierType_BAR
-
SeaMineRenderMethod_MEDAL
- See Also:
-
SeaMineRenderMethod_ALT
- See Also:
-
_SeaMineRenderMethod
-
-
Method Details
-
getInstance
-
addEventListener
-
setTextBackgroundMethod
None, outline (default), or filled background. If set to OUTLINE, TextOutlineWidth changed to default of 4. If set to OUTLINE_QUICK, TextOutlineWidth changed to default of 2. Use setTextOutlineWidth if you'd like a different value.- Parameters:
textBackgroundMethod
-
-
getTextBackgroundMethod
None, outline (default), or filled background.- Returns:
- method like RenderSettings.TextBackgroundMethod_NONE
-
getUnitFontSize
Deprecated.- Returns:
-
getSPFontSize
Deprecated.- Returns:
-
setDefaultPixelSize
-
getDefaultPixelSize
-
getDeviceDPI
-
setDeviceDPI
-
getDeviceHeight
-
setDeviceHeight
-
getDeviceWidth
-
setDeviceWidth
-
setOperationalConditionModifierType
Set the operational condition modifier to be slashes or bars- Parameters:
value
- like RendererSettings.OperationalConditionModifierType_SLASH
-
setSeaMineRenderMethod
-
getSeaMineRenderMethod
-
getOperationalConditionModifierType
-
setUseLineInterpolation
For lines symbols with "decorations" like FLOT or LOC, when points are too close together, we will start dropping points until we get enough space between 2 points to draw the decoration. Without this, when points are too close together, you run the chance that the decorated line will look like a plain line because there was no room between points to draw the decoration.- Parameters:
value
-
-
getUseLineInterpolation
Returns the current setting for Line Interpolation.- Returns:
-
setAutoCollapseModifiers
Collapse Modifiers for fire support areas when the symbol isn't large enough to show all the labels. Identifying label will always be visible. Zooming in, to make the symbol larger, will make more modifiers visible. Resizing the symbol can also make more modifiers visible.- Parameters:
value
-
-
getAutoCollapseModifiers
-
getTextOutlineWidth
Deprecated.if RenderSettings.TextBackgroundMethod_OUTLINE is used, the outline will be this many pixels wide.- Returns:
-
setTextBackgroundAutoColorThreshold
Value from 0 to 255. The closer to 0 the lighter the text color has to be to have the outline be black. Default value is 160.- Parameters:
value
-
-
getTextBackgroundAutoColorThreshold
Value from 0 to 255. The closer to 0 the lighter the text color has to be to have the outline be black. Default value is 160.- Returns:
-
getSinglePointSymbolOutlineWidth
Deprecated.This applies to Single Point Tactical Graphics.- Returns:
-
setOutlineSPControlMeasures
-
getOutlineSPControlMeasures
-
setActionPointDefaultFill
If true, set fill based on affiliation color for Action Points, Sonobuoys, ACP, CCP, PUP. False means there is no fill.- Parameters:
value
-
-
getActionPointDefaultFill
-
setDrawAffiliationModifierAsLabel
Determines how to draw the Affiliation modifier. True to draw as modifier label in the "E/F" location. False to draw at the top right corner of the symbol -
getDrawAffiliationModifierAsLabel
True to draw as modifier label in the "E/F" location. False to draw at the top right corner of the symbol -
setModifierFont
Deprecated.- Parameters:
name
- Like "arial"type
- Like Font.BOLDsize
- Like 12kerning
- - default false. The default advances of single characters are not appropriate for some character sequences, for example "To" or "AWAY". Without kerning the adjacent characters appear to be separated by too much space. Kerning causes selected sequences of characters to be spaced differently for a more pleasing visual appearance.tracking
- - default 0.04 (TextAttribute.TRACKING_LOOSE). The tracking value is multiplied by the font point size and passed through the font transform to determine an additional amount to add to the advance of each glyph cluster. Positive tracking values will inhibit formation of optional ligatures. Tracking values are typically between-0.1
and0.3
; values outside this range are generally not desireable.
-
setModifierFont
- Parameters:
name
-type
- Typefacesize
-
-
setMPLabelFont
Sets the font to be used for multipoint modifier labels- Parameters:
name
- Like "arial"type
- Like Font.TRUETYPE_FONTsize
- Like 12
-
setMPLabelFont
Sets the font to be used for multipoint modifier labels- Parameters:
name
- Like "arial"type
- Like Font.TRUETYPE_FONTsize
- Like 12kmlScale
- only set if you're rendering in KML (default 1.0)
-
getModiferFontProps
-
getModiferFont
get font object used for labels- Returns:
- Font object
-
getMPLabelFont
get font object used for labels- Returns:
- Font object
-
getMPLabelFontName
the font name to be used for modifier labels- Returns:
- name of the label font
-
getMPLabelFontType
Like Font.BOLD- Returns:
- type of the label font
-
getMPLabelFontSize
get font point size- Returns:
- size of the label font
-
setMPModifierFont
Deprecated. -
setMPModifierFont
Deprecated. -
getMPModifierFont
Deprecated.usegetMPLabelFont()
-
getMPModifierFontName
Deprecated. -
getMPModifierFontType
Deprecated.usegetMPLabelFontType()
} -
getMPModifierFontSize
Deprecated. -
getKMLLabelScale
-
setCacheSize
Set the cache size as a percentage of VM memory available to the app. Default is 3%. Renderer won't let you set a value greater than 10% of the available VM memory.- Parameters:
percentage
-
-
setCacheSize
Set the cache size in bytes. Renderer won't let you set a value greater than 10% of the available VM memory.- Parameters:
bytes
-
-
getCacheSize
- Returns:
- Cache size in bytes
-
setCacheEnabled
-
getCacheEnabled
-
getTwoLabelOnly
Get a boolean indicating between the use of ENY labels in all segments (false) or to only set 2 labels one at the north and the other one at the south of the graphic (true).- Returns:
- {boolean}
-
setTwoLabelOnly
Set a boolean indicating between the use of ENY labels in all segments (false) or to only set 2 labels one at the north and the other one at the south of the graphic (true).- Parameters:
TwoLabelOnly
-
-
setScaleMainIcon
When true, if the main icon is normally small to allow room for sector modifiers, make it larger when no sector modifiers are present for better visibility.- Parameters:
scaleMainIcon
-
-
getScaleMainIcon
When true, if the main icon is normally small to allow room for sector modifiers, main icon is made larger when no sector modifiers are present for better visibility.
-