public interface Position
Modifier and Type | Interface and 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 |
Modifier and Type | Field and 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 |
Modifier and Type | Method and 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.
|
static final Position TopCenter
static final Position TopLeft
static final Position TopRight
static final Position CenterLeft
static final Position Center
static final Position CenterRight
static final Position BottomCenter
static final Position BottomRight
static final Position BottomLeft
int calculateX(int sourceWidth, int sourceHeight, int targetWidth, int targetHeight)
int calculateY(int sourceWidth, int sourceHeight, int targetWidth, int targetHeight)
default Dimension calculateXY(int sourceWidth, int sourceHeight, int targetWidth, int targetHeight)