public enum ObjectFit extends Enum<ObjectFit>
Enum Constant and Description |
---|
CONTAIN
If object-fit set to CONTAIN, image will be scaled keeping its aspect ratio to fit in the content box.
|
COVER
If object-fit set to COVER, image will be scaled keeping its aspect ratio to cover the content box.
|
FILL
If object-fit set to FILL, image will be sized to fill the element's content box.
|
NONE
If object-fit set to NONE, image will not be scaled.
|
SCALE_DOWN
If object-fit set to SCALE_DOWN, image will be scaled keeping its aspect ratio to fit in the content box but scaling coefficient cannot be greater than 1.
|
Modifier and Type | Method and Description |
---|---|
static ObjectFit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ObjectFit[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared.
|
public static final ObjectFit FILL
public static final ObjectFit CONTAIN
public static final ObjectFit COVER
public static final ObjectFit SCALE_DOWN
public static final ObjectFit NONE
public static ObjectFit[] values()
for (ObjectFit c : ObjectFit.values()) System.out.println(c);
public static ObjectFit valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant with the specified name
NullPointerException
- if the argument is null
Copyright © 1998–2023 iText Group NV. All rights reserved.