Class Image.ImageURL
- java.lang.Object
-
- ch.andre601.fluxpoint4j.image.format.Image
-
- ch.andre601.fluxpoint4j.image.format.Image.ImageURL
-
-
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 ImageURL()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Image.ImageURL
withCaching(boolean cache)
Sets whether the Fluxpoint API should cache the received image or not.Image.ImageURL
withColor(@NotNull ColorObject color)
This method cannot be used in the ImageURL image type.Image.ImageURL
withHeight(int height)
Sets the height of the Image.Image.ImageURL
withPosX(int posX)
Sets the position on the X (horizontal) axis for the image.Image.ImageURL
withPosY(int posY)
Sets the position on the Y (vertical) axis for the image.Image.ImageURL
withRound(int round)
Set an optional rounding of the Square corners.Image.ImageURL
withUrl(@NotNull java.lang.String url)
Sets the URL to get the image from.Image.ImageURL
withWidth(int width)
Sets the width of the Image.
-
-
-
Method Detail
-
withPosX
public Image.ImageURL 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.ImageURL 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.ImageURL 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.ImageURL 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 ImageURL instance. Useful for chaining.
-
withColor
public Image.ImageURL withColor(@NotNull @NotNull ColorObject color)
This method cannot be used in the ImageURL image type.
Throws anIllegalArgumentException
when called.- Specified by:
withColor
in classImage
- Parameters:
color
- TheColorObject
to use.- Returns:
- Nothing.
-
withUrl
public Image.ImageURL withUrl(@NotNull @NotNull java.lang.String url)
Sets the URL to get the image from.An
IllegalArgumentException
may be thrown in the following case:- Url is an empty String.
- Parameters:
url
- The URL to get the image from.- Returns:
- The ImageURL instance. Useful for chaining.
-
withCaching
public Image.ImageURL withCaching(boolean cache)
Sets whether the Fluxpoint API should cache the received image or not.- Parameters:
cache
- Boolean to set if the Fluxpoint API should cache the received image.- Returns:
- The ImageURL instance. Useful for chaining.
-
withRound
public Image.ImageURL withRound(int round)
Set an optional rounding of the Square corners.An
IllegalArgumentException
may be thrown in the following case:- Round is less than 0.
- Parameters:
round
- The strength of rounding the corner.- Returns:
- The ImageURL instance. Useful for chaining.
-
-