net.coobird.thumbnailator.geometry
Interface Position
- All Known Implementing Classes:
- Coordinate, Positions
public interface Position
This interface is implemented by classes which calculate how to position an
object inside of an enclosing object.
- Author:
- coobird
Method Summary |
Point |
calculate(int enclosingWidth,
int enclosingHeight,
int width,
int height,
int insetLeft,
int insetRight,
int insetTop,
int insetBottom)
Calculates the position of an object enclosed by an enclosing object. |
calculate
Point calculate(int enclosingWidth,
int enclosingHeight,
int width,
int height,
int insetLeft,
int insetRight,
int insetTop,
int insetBottom)
- Calculates the position of an object enclosed by an enclosing object.
- Parameters:
enclosingWidth
- The width of the enclosing object that is
to contain the enclosed object.enclosingHeight
- The height of the enclosing object that is
to contain the enclosed object.width
- The width of the object that is to be
placed inside an enclosing object.height
- The height of the object that is to be
placed inside an enclosing object.insetLeft
- The inset on the left-hand side of the
object to be enclosed.insetRight
- The inset on the right-hand side of the
object to be enclosed.insetTop
- The inset on the top side of the
object to be enclosed.insetBottom
- The inset on the bottom side of the
object to be enclosed.
- Returns:
- The position to place the object.
Copyright © 2021. All rights reserved.