Class Image
- java.lang.Object
-
- ch.andre601.fluxpoint4j.image.format.Image
-
- Direct Known Subclasses:
Image.Circle,Image.ImageURL,Image.Rectangle,Image.Triangle
public abstract class Image extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImage.CircleClass used to create the JSON for a Circle-shaped image.static classImage.CutDefines the missing part of theTriangle shape.static classImage.ImageURLClass used to create the JSON for an image sourced from a URL.static classImage.RectangleClass used to create the JSON for a Rectangle-shaped image (Referred to as "bitmap" in the fluxpoint API).static classImage.TriangleClass used to create the JSON for a Triangle-shaped image.
-
Constructor Summary
Constructors Constructor Description Image()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract ImagewithColor(@NotNull ColorObject color)Sets the color to use for the image.abstract ImagewithHeight(int height)Sets the height of the Image.abstract ImagewithPosX(int posX)Sets the position on the X (horizontal) axis for the image.abstract ImagewithPosY(int posY)Sets the position on the Y (vertical) axis for the image.abstract ImagewithWidth(int width)Sets the width of the Image.
-
-
-
Method Detail
-
withPosX
public abstract Image withPosX(int posX)
Sets the position on the X (horizontal) axis for the image.
The value can be both negative and positive.- Parameters:
posX- The positive, horizontal position of the image.- Returns:
- The Image class. Useful for chaining.
-
withPosY
public abstract Image withPosY(int posY)
Sets the position on the Y (vertical) axis for the image.
The value can be both negative and positive.- Parameters:
posY- The positive, vertical position of the image.- Returns:
- The Image class. Useful for chaining.
-
withWidth
public abstract Image withWidth(int width)
Sets the width of the Image.An
IllegalArgumentExceptionmay be thrown in the following case:- Width is less than 1 or larger than 3000.
- Parameters:
width- The width of the image.- Returns:
- The Image class. Useful for chaining.
-
withHeight
public abstract Image withHeight(int height)
Sets the height of the Image.An
IllegalArgumentExceptionmay be thrown in the following case:- Height is less than 1 or larger than 3000.
- Parameters:
height- The height of the image.- Returns:
- The Image class. Useful for chaining.
-
withColor
public abstract Image withColor(@NotNull @NotNull ColorObject color)
Sets the color to use for the image.
Please see the documentation of theColorObjectfor possible errors and limitations.- Parameters:
color- TheColorObjectto use.- Returns:
- The Image class. Useful for chaining.
-
-