Package com.myscript.iink.graphics
Class Style
java.lang.Object
com.myscript.iink.graphics.Style
Style information for the rendering of strokes and text.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Apply changed style attributes to the specified target canvas.void
clear()
Resets all style attributes to their default values and clear the change flags.void
Clears the change flags.boolean
Returns the set of style attributes changed since construction or last call toclearChangeFlags()
.@NotNull Color
Retrieves the drop shadow color.float
Retrieves the drop shadow blur radius.float
Retrieves the drop shadow horizontal offset.float
Retrieves the drop shadow vertical offset.@NotNull Color
Retrieves the stroke fill color.@NotNull FillRule
Retrieves the stroke fill rule.@NotNull String
Retrieves the font family.float
Retrieves the font line height.float
Retrieves the font size.@NotNull String
Retrieves the font style.@NotNull String
Retrieves the font variant.int
Retrieves the font weight.@NotNull Color
Retrieves the stroke color.@org.jetbrains.annotations.Nullable float[]
Retrieves the stroke dash pattern.float
Retrieves the stroke dash offset.@NotNull LineCap
Retrieves the stroke line cap.@NotNull LineJoin
Retrieves the stroke line join.float
Retrieves the stroke miter limit.float
Retrieves the stroke width.int
hashCode()
void
setDropShadowColor
(@NotNull Color dropShadowColor) Sets the drop shadow color.void
setDropShadowRadius
(float dropShadowRadius) Sets the drop shadow blur radius.void
setDropShadowXOffset
(float dropShadowXOffset) Sets the drop shadow horizontal offset.void
setDropShadowYOffset
(float dropShadowYOffset) Sets the drop shadow vertical offset.void
setFillColor
(@NotNull Color fillColor) Sets the fill color.void
setFillRule
(@NotNull FillRule fillRule) Sets the fill rule.void
setFontFamily
(@NotNull String fontFamily) Sets the font family.void
setFontLineHeight
(float fontLineHeight) Sets the font line height.void
setFontSize
(float fontSize) Sets the font size.void
setFontStyle
(@NotNull String fontStyle) Sets the font style.void
setFontVariant
(@NotNull String fontVariant) Sets the font variant.void
setFontWeight
(int fontWeight) Sets the font weight.void
setStrokeColor
(@NotNull Color strokeColor) Sets the stroke color.void
setStrokeDashArray
(@org.jetbrains.annotations.Nullable float[] strokeDashArray) Sets the pattern of dashes and gaps used to stroke paths.void
setStrokeDashOffset
(float strokeDashOffset) Sets the distance into the dash pattern to start the dash.void
setStrokeLineCap
(@NotNull LineCap strokeLineCap) Sets the stroke line cap.void
setStrokeLineJoin
(@NotNull LineJoin strokeLineJoin) Sets the stroke line join.void
setStrokeMiterLimit
(float strokeMiterLimit) Sets the stroke miter limit.void
setStrokeWidth
(float strokeWidth) Sets the stroke width.@NotNull String
toString()
-
Constructor Details
-
Style
public Style()Default constructor. Builds a Style with default values -
Style
Copy constructor.- Parameters:
other
- copied object.
-
-
Method Details
-
clear
public void clear()Resets all style attributes to their default values and clear the change flags. -
setStrokeColor
Sets the stroke color.- Parameters:
strokeColor
- the stroke color.
-
getStrokeColor
Retrieves the stroke color.- Returns:
- the stroke color.
-
setStrokeWidth
public void setStrokeWidth(float strokeWidth) Sets the stroke width.- Parameters:
strokeWidth
- the stroke width.
-
getStrokeWidth
public float getStrokeWidth()Retrieves the stroke width.- Returns:
- the stroke width.
-
setStrokeLineCap
Sets the stroke line cap.- Parameters:
strokeLineCap
- the stroke line cap.
-
getStrokeLineCap
Retrieves the stroke line cap.- Returns:
- the stroke line cap.
-
setStrokeLineJoin
Sets the stroke line join.- Parameters:
strokeLineJoin
- the stroke line join.
-
getStrokeLineJoin
Retrieves the stroke line join.- Returns:
- the stroke line join.
-
setStrokeMiterLimit
public void setStrokeMiterLimit(float strokeMiterLimit) Sets the stroke miter limit.- Parameters:
strokeMiterLimit
- the stroke miter limit.
-
getStrokeMiterLimit
public float getStrokeMiterLimit()Retrieves the stroke miter limit.- Returns:
- the stroke miter limit.
-
setStrokeDashArray
public void setStrokeDashArray(@Nullable @org.jetbrains.annotations.Nullable float[] strokeDashArray) Sets the pattern of dashes and gaps used to stroke paths.- Parameters:
strokeDashArray
- the vector describing the dashes pattern.
-
getStrokeDashArray
@Nullable public @org.jetbrains.annotations.Nullable float[] getStrokeDashArray()Retrieves the stroke dash pattern.- Returns:
- the stroke dash pattern.
-
setStrokeDashOffset
public void setStrokeDashOffset(float strokeDashOffset) Sets the distance into the dash pattern to start the dash.- Parameters:
strokeDashOffset
- the dash offset.
-
getStrokeDashOffset
public float getStrokeDashOffset()Retrieves the stroke dash offset.- Returns:
- the stroke dash offset.
-
setFillColor
Sets the fill color.- Parameters:
fillColor
- the fill color.
-
getFillColor
Retrieves the stroke fill color.- Returns:
- the stroke fill color.
-
setFillRule
Sets the fill rule.- Parameters:
fillRule
- the fill rule.
-
getFillRule
Retrieves the stroke fill rule.- Returns:
- the stroke fill rule.
-
setFontFamily
Sets the font family.- Parameters:
fontFamily
- the font family.
-
getFontFamily
Retrieves the font family.- Returns:
- the font family.
-
setFontLineHeight
public void setFontLineHeight(float fontLineHeight) Sets the font line height.- Parameters:
fontLineHeight
- the font line height.
-
getFontLineHeight
public float getFontLineHeight()Retrieves the font line height.- Returns:
- the font line height.
-
setFontSize
public void setFontSize(float fontSize) Sets the font size.- Parameters:
fontSize
- the font size.
-
getFontSize
public float getFontSize()Retrieves the font size.- Returns:
- the font size.
-
setFontStyle
Sets the font style.- Parameters:
fontStyle
- the font style.
-
getFontStyle
Retrieves the font style.- Returns:
- the font style.
-
setFontVariant
Sets the font variant.- Parameters:
fontVariant
- the font variant.
-
getFontVariant
Retrieves the font variant.- Returns:
- the font variant.
-
setFontWeight
public void setFontWeight(int fontWeight) Sets the font weight.- Parameters:
fontWeight
- the font weight.
-
getFontWeight
public int getFontWeight()Retrieves the font weight.- Returns:
- the font weight.
-
setDropShadowXOffset
public void setDropShadowXOffset(float dropShadowXOffset) Sets the drop shadow horizontal offset.- Parameters:
dropShadowXOffset
- the drop shadow horizontal offset.
-
getDropShadowXOffset
public float getDropShadowXOffset()Retrieves the drop shadow horizontal offset.- Returns:
- the drop shadow horizontal offset.
-
setDropShadowYOffset
public void setDropShadowYOffset(float dropShadowYOffset) Sets the drop shadow vertical offset.- Parameters:
dropShadowYOffset
- the drop shadow vertical offset.
-
getDropShadowYOffset
public float getDropShadowYOffset()Retrieves the drop shadow vertical offset.- Returns:
- the drop shadow vertical offset.
-
setDropShadowRadius
public void setDropShadowRadius(float dropShadowRadius) Sets the drop shadow blur radius.- Parameters:
dropShadowRadius
- the drop shadow blur radius.
-
getDropShadowRadius
public float getDropShadowRadius()Retrieves the drop shadow blur radius.- Returns:
- the drop shadow blur radius.
-
setDropShadowColor
Sets the drop shadow color.- Parameters:
dropShadowColor
- the drop shadow color.
-
getDropShadowColor
Retrieves the drop shadow color.- Returns:
- the drop shadow color.
-
getChangeFlags
Returns the set of style attributes changed since construction or last call toclearChangeFlags()
.- Returns:
- the set of style flags.
-
clearChangeFlags
public void clearChangeFlags()Clears the change flags. -
applyTo
Apply changed style attributes to the specified target canvas.- Parameters:
canvas
- the target canvas.- See Also:
-
equals
-
hashCode
public int hashCode() -
toString
-