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 TypeMethodDescriptionvoidApply changed style attributes to the specified target canvas.voidclear()Resets all style attributes to their default values and clear the change flags.voidClears the change flags.booleanReturns the set of style attributes changed since construction or last call toclearChangeFlags().@NotNull ColorRetrieves the drop shadow color.floatRetrieves the drop shadow blur radius.floatRetrieves the drop shadow horizontal offset.floatRetrieves the drop shadow vertical offset.@NotNull ColorRetrieves the stroke fill color.@NotNull FillRuleRetrieves the stroke fill rule.@NotNull StringRetrieves the font family.floatRetrieves the font line height.floatRetrieves the font size.@NotNull StringRetrieves the font style.@NotNull StringRetrieves the font variant.intRetrieves the font weight.@NotNull ColorRetrieves the stroke color.@org.jetbrains.annotations.Nullable float[]Retrieves the stroke dash pattern.floatRetrieves the stroke dash offset.@NotNull LineCapRetrieves the stroke line cap.@NotNull LineJoinRetrieves the stroke line join.floatRetrieves the stroke miter limit.floatRetrieves the stroke width.inthashCode()voidsetDropShadowColor(@NotNull Color dropShadowColor) Sets the drop shadow color.voidsetDropShadowRadius(float dropShadowRadius) Sets the drop shadow blur radius.voidsetDropShadowXOffset(float dropShadowXOffset) Sets the drop shadow horizontal offset.voidsetDropShadowYOffset(float dropShadowYOffset) Sets the drop shadow vertical offset.voidsetFillColor(@NotNull Color fillColor) Sets the fill color.voidsetFillRule(@NotNull FillRule fillRule) Sets the fill rule.voidsetFontFamily(@NotNull String fontFamily) Sets the font family.voidsetFontLineHeight(float fontLineHeight) Sets the font line height.voidsetFontSize(float fontSize) Sets the font size.voidsetFontStyle(@NotNull String fontStyle) Sets the font style.voidsetFontVariant(@NotNull String fontVariant) Sets the font variant.voidsetFontWeight(int fontWeight) Sets the font weight.voidsetStrokeColor(@NotNull Color strokeColor) Sets the stroke color.voidsetStrokeDashArray(@org.jetbrains.annotations.Nullable float[] strokeDashArray) Sets the pattern of dashes and gaps used to stroke paths.voidsetStrokeDashOffset(float strokeDashOffset) Sets the distance into the dash pattern to start the dash.voidsetStrokeLineCap(@NotNull LineCap strokeLineCap) Sets the stroke line cap.voidsetStrokeLineJoin(@NotNull LineJoin strokeLineJoin) Sets the stroke line join.voidsetStrokeMiterLimit(float strokeMiterLimit) Sets the stroke miter limit.voidsetStrokeWidth(float strokeWidth) Sets the stroke width.@NotNull StringtoString()
-
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
-