org.newdawn.slick
Interface ShapeFill

All Known Implementing Classes:
GradientFill

public interface ShapeFill

A filling method for a shape. This allows changing colours at shape verticies and modify they're positions as required

Author:
kevin

Method Summary
 Color colorAt(Shape shape, float x, float y)
          Get the colour that should be applied at the specified location
 Vector2f getOffsetAt(Shape shape, float x, float y)
          Get the offset for a vertex at a given location based on it's shape
 

Method Detail

colorAt

Color colorAt(Shape shape,
              float x,
              float y)
Get the colour that should be applied at the specified location

Parameters:
shape - The shape being filled
x - The x coordinate of the point being coloured
y - The y coordinate of the point being coloured
Returns:
The colour that should be applied based on the control points of this gradient

getOffsetAt

Vector2f getOffsetAt(Shape shape,
                     float x,
                     float y)
Get the offset for a vertex at a given location based on it's shape

Parameters:
shape - The shape being filled
x - The x coordinate of the point being drawn
y - The y coordinate of the point being drawn
Returns:
The offset to apply to this vertex


Copyright © 2006 New Dawn Software. All Rights Reserved.