Package snap.gfx
Interface Paint
- All Superinterfaces:
StringCodec.Codeable
,XMLArchiver.Archivable
- All Known Implementing Classes:
Color
,GradientPaint
,ImagePaint
A class to represent a fill for a Shape or text (Color, GradientPaint, ImagePaint).
-
Method Summary
Modifier and TypeMethodDescriptiondefault String
Returns Paint as string.copyForColor
(Color aColor) Returns a copy of this paint modified for given color.copyForRect
(Rect aRect) Returns an absolute paint for given bounds of primitive to be filled.default Paint
decodeString
(String aString) Returns Paint for string.getColor()
Returns the closest color approximation of this paint.default String
getName()
Returns the name for paint.boolean
Returns whether paint is defined in terms independent of primitive to be filled.boolean
isOpaque()
Returns whether paint is opaque.static Paint
Returns a color from given object.Methods inherited from interface snap.util.XMLArchiver.Archivable
fromXML, toXML
-
Method Details
-
isAbsolute
boolean isAbsolute()Returns whether paint is defined in terms independent of primitive to be filled. -
isOpaque
boolean isOpaque()Returns whether paint is opaque. -
copyForRect
Returns an absolute paint for given bounds of primitive to be filled. -
getName
Returns the name for paint. -
getColor
Color getColor()Returns the closest color approximation of this paint. -
copyForColor
Returns a copy of this paint modified for given color. -
codeString
Returns Paint as string.- Specified by:
codeString
in interfaceStringCodec.Codeable
-
decodeString
Returns Paint for string.- Specified by:
decodeString
in interfaceStringCodec.Codeable
-
of
Returns a color from given object.
-