public static enum Img.BinarySourceProcessor.ScaleFix extends Enum<Img.BinarySourceProcessor.ScaleFix>
How to handle two image sources scale mismatch
Enum Constant and Description |
---|
NO_FIX
Do not fix the scale mismatch
|
SCALE_TO_MAX
Scale smaller image to larger one
|
SHRINK_TO_MIN
Shrink larger image to smaller one
|
Modifier and Type | Method and Description |
---|---|
boolean |
shouldFix() |
int |
targetScale(int scale1,
int scale2) |
static Img.BinarySourceProcessor.ScaleFix |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Img.BinarySourceProcessor.ScaleFix[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Img.BinarySourceProcessor.ScaleFix SCALE_TO_MAX
public static final Img.BinarySourceProcessor.ScaleFix SHRINK_TO_MIN
public static final Img.BinarySourceProcessor.ScaleFix NO_FIX
public static Img.BinarySourceProcessor.ScaleFix[] values()
for (Img.BinarySourceProcessor.ScaleFix c : Img.BinarySourceProcessor.ScaleFix.values()) System.out.println(c);
public static Img.BinarySourceProcessor.ScaleFix valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int targetScale(int scale1, int scale2)
public boolean shouldFix()
Copyright © 2014–2018 OSGL (Open Source General Library). All rights reserved.