mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-10 13:51:53 +09:00
added sources for Slick
Former-commit-id: 1647fa32ef6894bd7db44f741f07c2f4dcdf9054 Former-commit-id: 0e5810dcfbe1fd59b13e7cabe9f1e93c5542da2d
This commit is contained in:
33
lib/slick-source/org/newdawn/slick/ShapeFill.java
Normal file
33
lib/slick-source/org/newdawn/slick/ShapeFill.java
Normal file
@@ -0,0 +1,33 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user