Class Image.Rectangle
- java.lang.Object
-
- ch.andre601.fluxpoint4j.image.format.Image
-
- ch.andre601.fluxpoint4j.image.format.Image.Rectangle
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ch.andre601.fluxpoint4j.image.format.Image
Image.Circle, Image.Cut, Image.ImageURL, Image.Rectangle, Image.Triangle
-
-
Constructor Summary
Constructors Constructor Description Rectangle()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Image.RectanglewithColor(@NotNull ColorObject color)Sets the color to use for the image.Image.RectanglewithHeight(int height)Sets the height of the Image.Image.RectanglewithPosX(int posX)Sets the position on the X (horizontal) axis for the image.Image.RectanglewithPosY(int posY)Sets the position on the Y (vertical) axis for the image.Image.RectanglewithRound(int round)Sets the round for the corners of the Rectangle.Image.RectanglewithWidth(int width)Sets the width of the Image.
-
-
-
Method Detail
-
withPosX
public Image.Rectangle withPosX(int posX)
Sets the position on the X (horizontal) axis for the image.
The value can be both negative and positive.
-
withPosY
public Image.Rectangle withPosY(int posY)
Sets the position on the Y (vertical) axis for the image.
The value can be both negative and positive.
-
withWidth
public Image.Rectangle 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.
-
withHeight
public Image.Rectangle 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.
- Specified by:
withHeightin classImage- Parameters:
height- The height of the image.- Returns:
- The Square instance. Useful for chaining.
-
withColor
public Image.Rectangle withColor(@NotNull @NotNull ColorObject color)
Sets the color to use for the image.
Please see the documentation of theColorObjectfor possible errors and limitations.- Specified by:
withColorin classImage- Parameters:
color- TheColorObjectto use.- Returns:
- The Rectangle instance. Useful for chaining.
-
withRound
public Image.Rectangle withRound(int round)
Sets the round for the corners of the Rectangle.- Parameters:
round- How round the corners should be- Returns:
- This Rectangle instance. Useful for chaining.
-
-