Package snap.gfx
Interface Paint
- All Superinterfaces:
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 TypeMethodDescriptioncopyForColor
(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.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.default Paint
snap()
Returns the snap version of this fill.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. -
snap
Returns the snap version of this fill. -
of
Returns a color from given object.
-