com.github.mathiewz.slick.ShapeFill Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of modernized-slick Show documentation
Show all versions of modernized-slick Show documentation
The main purpose of this libraryis to modernize and maintain the slick2D library.
The newest version!
package com.github.mathiewz.slick;
import com.github.mathiewz.slick.geom.Shape;
import com.github.mathiewz.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);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy