org.newdawn.slick.svg
Class RadialGradientFill

java.lang.Object
  extended by org.newdawn.slick.svg.RadialGradientFill
All Implemented Interfaces:
TexCoordGenerator

public class RadialGradientFill
extends java.lang.Object
implements TexCoordGenerator

A filler to apply a SVG radial gradient across a shape

Author:
kevin

Constructor Summary
RadialGradientFill(Shape shape, Transform trans, Gradient gradient)
          Create a new fill for a radial gradient
 
Method Summary
 Vector2f getCoordFor(float x, float y)
          Get the texture coordinate for a given render position
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RadialGradientFill

public RadialGradientFill(Shape shape,
                          Transform trans,
                          Gradient gradient)
Create a new fill for a radial gradient

Parameters:
shape - The shape being filled
trans - The transform given for the shape in the SVG
gradient - The gradient to apply across the shape
Method Detail

getCoordFor

public Vector2f getCoordFor(float x,
                            float y)
Description copied from interface: TexCoordGenerator
Get the texture coordinate for a given render position

Specified by:
getCoordFor in interface TexCoordGenerator
Parameters:
x - The x coordinate of the vertex being rendered
y - The y coordinate of the vertex being rendered
Returns:
The texture coordinate to apply
See Also:
TexCoordGenerator.getCoordFor(float, float)


Copyright © 2006 New Dawn Software. All Rights Reserved.