public class CropSourceOptions extends AbstractTransformationSourceOptions
| Modifier and Type | Class and Description |
|---|---|
class |
CropSourceOptions.CropSourceOptionsSerializer
Serializer for crop source options
|
TransformationSourceOptions.TransformationSourceOptionsSerializer| Constructor and Description |
|---|
CropSourceOptions() |
CropSourceOptions(CropSourceOptions options) |
| Modifier and Type | Method and Description |
|---|---|
static TransformationSourceOptions.TransformationSourceOptionsSerializer |
createSerializerInstance()
Creates an instance of the options serializer
|
String |
getGravity()
Gets the 'gravity' which determines how the offset is applied.
|
int |
getHeight()
Gets the height of the cropped image.
|
TransformationSourceOptions.TransformationSourceOptionsSerializer |
getSerializer()
Gets the serializer for the source options.
|
int |
getWidth()
Sets the width of the cropped image.
|
int |
getXOffset()
Gets the horizontal offset.
|
int |
getYOffset()
Gets the vertical offset.
|
protected void |
initDefaults() |
boolean |
isApplicableForMediaType(String sourceMimetype)
Gets whether or not these transformation source options apply for the
given media type
|
boolean |
isPercentageCrop() |
void |
setGravity(String gravity)
Sets the 'gravity' which determines how the offset is applied.
|
void |
setHeight(int height)
Sets the height of the cropped image.
|
void |
setPercentageCrop(boolean isPercentageCrop) |
void |
setWidth(int width)
Sets the width of the cropped image.
|
void |
setXOffset(int xOffset)
Sets the horizontal offset.
|
void |
setYOffset(int yOffset)
Sets the vertical offset.
|
getApplicableMediaTypes, merge, putParameterIfNotNull, setApplicableMediaTypes, toStringpublic CropSourceOptions()
public CropSourceOptions(CropSourceOptions options)
protected void initDefaults()
public boolean isApplicableForMediaType(String sourceMimetype)
AbstractTransformationSourceOptionsisApplicableForMediaType in interface TransformationSourceOptionsisApplicableForMediaType in class AbstractTransformationSourceOptionssourceMimetype - the media type of the sourcepublic int getHeight()
isPercentageCrop is set to true then it changes to
percentage.public void setHeight(int height)
isPercentageCrop is set to true then it changes to
percentage.height - the height to setpublic int getWidth()
isPercentageCrop is set to true then it changes to
percentage.public void setWidth(int width)
isPercentageCrop is set to true then it changes to
percentage.width - the width to setpublic int getXOffset()
gravity
property can change this.public void setXOffset(int xOffset)
gravity
property can change this.xOffset - the xOffset to setpublic int getYOffset()
gravity property
can change this.public void setYOffset(int yOffset)
gravity property
can change this.yOffset - the yOffset to setpublic boolean isPercentageCrop()
public void setPercentageCrop(boolean isPercentageCrop)
isPercentageCrop - the isPercentageCrop to setpublic void setGravity(String gravity)
gravity - the gravity to setpublic String getGravity()
public TransformationSourceOptions.TransformationSourceOptionsSerializer getSerializer()
TransformationSourceOptionspublic static TransformationSourceOptions.TransformationSourceOptionsSerializer createSerializerInstance()
Copyright © 2018 Alfresco Software. All rights reserved.