View RSS Feed

Java AWT

Fill Patterns

Rate this Entry
by , 03-06-2012 at 08:02 PM (760 Views)
Paint attributes define fill pattern in Graphic2D rendering context. An objectís instance is created for setting the paint attributes which makes possible the implementation of the paint interface. setPaint method is called along with Graphic2D, as a parameter.

Paint interface is implemented by using these 3 classes.

  • Color
  • TexturePaint
  • GradientPaint


Create a GradientPaint by specifying.

  • Beginning position/color
  • Ending position/color


Proportionally, gradient change takes place from 1 color to other, with line which connects 2 positions.

Submit "Fill Patterns" to Facebook Submit "Fill Patterns" to Digg Submit "Fill Patterns" to del.icio.us Submit "Fill Patterns" to StumbleUpon Submit "Fill Patterns" to Google

Categories
Graphics

Comments