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.Rectangle
withColor(@NotNull ColorObject color)
Sets the color to use for the image.Image.Rectangle
withHeight(int height)
Sets the height of the Image.Image.Rectangle
withPosX(int posX)
Sets the position on the X (horizontal) axis for the image.Image.Rectangle
withPosY(int posY)
Sets the position on the Y (vertical) axis for the image.Image.Rectangle
withRound(int round)
Sets the round for the corners of the Rectangle.Image.Rectangle
withWidth(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
IllegalArgumentException
may 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
IllegalArgumentException
may be thrown in the following case:- Height is less than 1 or larger than 3000.
- Specified by:
withHeight
in 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 theColorObject
for possible errors and limitations.- Specified by:
withColor
in classImage
- Parameters:
color
- TheColorObject
to 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.
-
-