Package com.sksamuel.scrimage
Interface Position
-
- All Known Implementing Classes:
Position._BottomCenter
,Position._BottomLeft
,Position._BottomRight
,Position._Center
,Position._CenterLeft
,Position._CenterRight
,Position._TopCenter
,Position._TopLeft
,Position._TopRight
public interface Position
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Position._BottomCenter
static class
Position._BottomLeft
static class
Position._BottomRight
static class
Position._Center
static class
Position._CenterLeft
static class
Position._CenterRight
static class
Position._TopCenter
static class
Position._TopLeft
static class
Position._TopRight
-
Field Summary
Fields Modifier and Type Field Description static Position
BottomCenter
static Position
BottomLeft
static Position
BottomRight
static Position
Center
static Position
CenterLeft
static Position
CenterRight
static Position
TopCenter
static Position
TopLeft
static Position
TopRight
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description int
calculateX(int sourceWidth, int sourceHeight, int targetWidth, int targetHeight)
Returns the x coordinate for where a target should be placed inside the source.default Dimension
calculateXY(int sourceWidth, int sourceHeight, int targetWidth, int targetHeight)
int
calculateY(int sourceWidth, int sourceHeight, int targetWidth, int targetHeight)
Returns the y coordinate for where an image should be placed inside the canvas.
-
-
-
Field Detail
-
TopCenter
static final Position TopCenter
-
TopLeft
static final Position TopLeft
-
TopRight
static final Position TopRight
-
CenterLeft
static final Position CenterLeft
-
Center
static final Position Center
-
CenterRight
static final Position CenterRight
-
BottomCenter
static final Position BottomCenter
-
BottomRight
static final Position BottomRight
-
BottomLeft
static final Position BottomLeft
-
-
Method Detail
-
calculateX
int calculateX(int sourceWidth, int sourceHeight, int targetWidth, int targetHeight)
Returns the x coordinate for where a target should be placed inside the source.
-
calculateY
int calculateY(int sourceWidth, int sourceHeight, int targetWidth, int targetHeight)
Returns the y coordinate for where an image should be placed inside the canvas.
-
calculateXY
default Dimension calculateXY(int sourceWidth, int sourceHeight, int targetWidth, int targetHeight)
-
-