ImageFit

How an ShapeStyle.ImageFill's picture is sized against the shape's bounding box. Always centred, aspect ratio kept unless noted.

Entries

Link copied to clipboard

As large as possible while still fitting entirely inside the box: nothing is cut off, the rest of the box stays empty.

Link copied to clipboard

As small as possible while still covering the whole box: the picture fills it, and what overflows is cut off.

Link copied to clipboard

Stretched to exactly the box, ignoring the aspect ratio.

Link copied to clipboard

One whole picture in the middle of the shape, not tied to its box: centred on the shape's visual centre (the point farthest from its edges, see PolygonCenter) and just big enough to touch the biggest circle that fits inside the shape, so it is shown entire, never cut and never repeated. A long, bent or lopsided shape (a country with a long arm) gets its picture in its body rather than in the middle of its bounding box, which can lie outside the shape. ShapeStyle.ImageFill.scale sizes it from there: 1 is the whole picture inside that circle, more makes it bigger and lets the shape cut what sticks out. The first ring given is the outline it is centred in.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int

Functions

Link copied to clipboard
fun valueOf(value: String): ImageFit

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.