mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
Former-commit-id: 1647fa32ef6894bd7db44f741f07c2f4dcdf9054 Former-commit-id: 0e5810dcfbe1fd59b13e7cabe9f1e93c5542da2d
34 lines
1.0 KiB
Java
34 lines
1.0 KiB
Java
package org.newdawn.slick;
|
|
|
|
import org.newdawn.slick.geom.Shape;
|
|
import org.newdawn.slick.geom.Vector2f;
|
|
|
|
/**
|
|
* A filling method for a shape. This allows changing colours at shape verticies and
|
|
* modify they're positions as required
|
|
*
|
|
* @author kevin
|
|
*/
|
|
public interface ShapeFill {
|
|
|
|
/**
|
|
* Get the colour that should be applied at the specified location
|
|
*
|
|
* @param shape The shape being filled
|
|
* @param x The x coordinate of the point being coloured
|
|
* @param y The y coordinate of the point being coloured
|
|
* @return The colour that should be applied based on the control points of this gradient
|
|
*/
|
|
public Color colorAt(Shape shape, float x, float y);
|
|
|
|
/**
|
|
* Get the offset for a vertex at a given location based on it's shape
|
|
*
|
|
* @param shape The shape being filled
|
|
* @param x The x coordinate of the point being drawn
|
|
* @param y The y coordinate of the point being drawn
|
|
* @return The offset to apply to this vertex
|
|
*/
|
|
public Vector2f getOffsetAt(Shape shape, float x, float y);
|
|
}
|