Package com.github.tadukoo.view.paint
Class SizableColor
java.lang.Object
java.awt.Color
com.github.tadukoo.view.paint.SizableColor
- All Implemented Interfaces:
SizablePaint
,Paint
,Transparency
,Serializable
Sizable Color is an extension of
Color
that implements SizablePaint
. It simply returns the
Color
in getPaint(Dimension)
.- Version:
- Alpha v.0.2.1
- Author:
- Logan Ferree (Tadukoo)
- See Also:
-
Field Summary
Fields inherited from class java.awt.Color
black, BLACK, blue, BLUE, cyan, CYAN, DARK_GRAY, darkGray, gray, GRAY, green, GREEN, LIGHT_GRAY, lightGray, magenta, MAGENTA, orange, ORANGE, pink, PINK, red, RED, white, WHITE, yellow, YELLOW
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
-
Constructor Summary
ConstructorDescriptionSizableColor
(float r, float g, float b) SizableColor
(float r, float g, float b, float a) SizableColor
(int rgb) SizableColor
(int rgba, boolean hasAlpha) SizableColor
(int r, int g, int b) SizableColor
(int r, int g, int b, int a) SizableColor
(Color color) Constructs a new SizableColor using the givenColor
SizableColor
(ColorSpace cSpace, float[] components, float alpha) -
Method Summary
Methods inherited from class java.awt.Color
brighter, createContext, darker, decode, equals, getAlpha, getBlue, getColor, getColor, getColor, getColorComponents, getColorComponents, getColorSpace, getComponents, getComponents, getGreen, getHSBColor, getRed, getRGB, getRGBColorComponents, getRGBComponents, getTransparency, hashCode, HSBtoRGB, RGBtoHSB, toString
-
Constructor Details
-
SizableColor
public SizableColor(int r, int g, int b) -
SizableColor
public SizableColor(int r, int g, int b, int a) -
SizableColor
public SizableColor(int rgb) -
SizableColor
public SizableColor(int rgba, boolean hasAlpha) -
SizableColor
public SizableColor(float r, float g, float b) -
SizableColor
public SizableColor(float r, float g, float b, float a) -
SizableColor
-
SizableColor
Constructs a new SizableColor using the givenColor
- Parameters:
color
- TheColor
to use for this SizableColor
-
-
Method Details
-
getPaint
Creates aPaint
to be used based on the size of the object to be painted. The size is given because of some cases where it matters, e.g. the case of Gradients, where it determines where the points are placed.- Specified by:
getPaint
in interfaceSizablePaint
- Parameters:
size
- The Dimensions of the object to be painted- Returns:
- A
Paint
-