Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
epoxy
GitHub Repository: epoxy/proj11
Path: blob/master/SLICK_HOME/src/org/newdawn/slick/ShapeFill.java
1456 views
1
package org.newdawn.slick;
2
3
import org.newdawn.slick.geom.Shape;
4
import org.newdawn.slick.geom.Vector2f;
5
6
/**
7
* A filling method for a shape. This allows changing colours at shape verticies and
8
* modify they're positions as required
9
*
10
* @author kevin
11
*/
12
public interface ShapeFill {
13
14
/**
15
* Get the colour that should be applied at the specified location
16
*
17
* @param shape The shape being filled
18
* @param x The x coordinate of the point being coloured
19
* @param y The y coordinate of the point being coloured
20
* @return The colour that should be applied based on the control points of this gradient
21
*/
22
public Color colorAt(Shape shape, float x, float y);
23
24
/**
25
* Get the offset for a vertex at a given location based on it's shape
26
*
27
* @param shape The shape being filled
28
* @param x The x coordinate of the point being drawn
29
* @param y The y coordinate of the point being drawn
30
* @return The offset to apply to this vertex
31
*/
32
public Vector2f getOffsetAt(Shape shape, float x, float y);
33
}
34
35