ImagenImagePlacement

class ImagenImagePlacement


Represents where the placement of an image is within a new, larger image, usually in the context of an outpainting request.

Summary

Public companion functions

ImagenImagePlacement

Creates an ImagenImagePlacement that represents a placement in an image described by two coordinates.

Public companion properties

ImagenImagePlacement

Center the image horizontally and aligned with the bottom edge of the larger image

ImagenImagePlacement

Align the image with the bottom left corner of the larger image

ImagenImagePlacement

Align the image with the bottom right corner of the larger image

ImagenImagePlacement

Center the image horizontally and vertically within the larger image

ImagenImagePlacement

Center the image vertically and aligned with the left edge of the larger image

ImagenImagePlacement

Center the image vertically and aligned with the right edge of the larger image

ImagenImagePlacement

Center the image horizontally and aligned with the top edge of the larger image

ImagenImagePlacement

Align the image with the top left corner of the larger image

ImagenImagePlacement

Align the image with the top right corner of the larger image

Public properties

Int?
Int?

Public companion functions

fromCoordinate

fun fromCoordinate(x: Int, y: Int): ImagenImagePlacement

Creates an ImagenImagePlacement that represents a placement in an image described by two coordinates. The coordinate system has 0,0 in the top left corner, and the x and y coordinates represent the location of the top left corner of the original image.

Parameters
x: Int

the x coordinate of the top left corner of the original image

y: Int

the y coordinate of the top left corner of the original image

Public companion properties

BOTTOM_CENTER

val BOTTOM_CENTERImagenImagePlacement

Center the image horizontally and aligned with the bottom edge of the larger image

BOTTOM_LEFT

val BOTTOM_LEFTImagenImagePlacement

Align the image with the bottom left corner of the larger image

BOTTOM_RIGHT

val BOTTOM_RIGHTImagenImagePlacement

Align the image with the bottom right corner of the larger image

CENTER

val CENTERImagenImagePlacement

Center the image horizontally and vertically within the larger image

LEFT_CENTER

val LEFT_CENTERImagenImagePlacement

Center the image vertically and aligned with the left edge of the larger image

RIGHT_CENTER

val RIGHT_CENTERImagenImagePlacement

Center the image vertically and aligned with the right edge of the larger image

TOP_CENTER

val TOP_CENTERImagenImagePlacement

Center the image horizontally and aligned with the top edge of the larger image

TOP_LEFT

val TOP_LEFTImagenImagePlacement

Align the image with the top left corner of the larger image

TOP_RIGHT

val TOP_RIGHTImagenImagePlacement

Align the image with the top right corner of the larger image

Public properties

x

val xInt?

y

val yInt?