Class SizableColor

java.lang.Object
java.awt.Color
com.github.tadukoo.view.paint.SizableColor
All Implemented Interfaces:
SizablePaint, Paint, Transparency, Serializable

public class SizableColor extends Color implements SizablePaint
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:
  • 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

      public SizableColor(ColorSpace cSpace, float[] components, float alpha)
    • SizableColor

      public SizableColor(Color color)
      Constructs a new SizableColor using the given Color
      Parameters:
      color - The Color to use for this SizableColor
  • Method Details

    • getPaint

      public Paint getPaint(Dimension size)
      Creates a Paint 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 interface SizablePaint
      Parameters:
      size - The Dimensions of the object to be painted
      Returns:
      A Paint