Package com.sksamuel.scrimage
Class Position._TopRight
- java.lang.Object
-
- com.sksamuel.scrimage.Position._TopRight
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.sksamuel.scrimage.Position
Position._BottomCenter, Position._BottomLeft, Position._BottomRight, Position._Center, Position._CenterLeft, Position._CenterRight, Position._TopCenter, Position._TopLeft, Position._TopRight
-
-
Field Summary
-
Fields inherited from interface com.sksamuel.scrimage.Position
BottomCenter, BottomLeft, BottomRight, Center, CenterLeft, CenterRight, TopCenter, TopLeft, TopRight
-
-
Constructor Summary
Constructors Constructor Description _TopRight()
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default 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 int
calculateY(int sourceWidth, int sourceHeight, int targetWidth, int targetHeight)
Returns the y coordinate for where an image should be placed inside the canvas.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.sksamuel.scrimage.Position
calculateXY
-
-
-
-
Method Detail
-
calculateY
public default int calculateY(int sourceWidth, int sourceHeight, int targetWidth, int targetHeight)
Description copied from interface:Position
Returns the y coordinate for where an image should be placed inside the canvas.- Specified by:
calculateY
in interfacePosition
-
calculateX
public default int calculateX(int sourceWidth, int sourceHeight, int targetWidth, int targetHeight)
Description copied from interface:Position
Returns the x coordinate for where a target should be placed inside the source.- Specified by:
calculateX
in interfacePosition
-
-