imageFit
fun Drawer.imageFit(img: ColorBuffer, x: Double = 0.0, y: Double = 0.0, width: Double = img.width.toDouble(), height: Double = img.height.toDouble(), horizontalPosition: Double = 0.0, verticalPosition: Double = 0.0, fitMethod: FitMethod = FitMethod.Cover): Pair<Rectangle, Rectangle>(source)
Draws img into the bounding box defined by x, y, width and height using the specified fitMethod and aligned or cropped using horizontalPosition and verticalPosition.
fun Drawer.imageFit(img: ColorBuffer, bounds: Rectangle = img.bounds, horizontalPosition: Double = 0.0, verticalPosition: Double = 0.0, fitMethod: FitMethod = FitMethod.Cover): Pair<Rectangle, Rectangle>(source)
Draws img into the bounding box defined by bounds using the specified fitMethod and aligned or cropped using horizontalPosition and verticalPosition.