org.alfresco.repo.content.transform.magick
Class ImageCropOptions

java.lang.Object
  extended by org.alfresco.repo.content.transform.magick.ImageCropOptions

public class ImageCropOptions
extends java.lang.Object

DTO used to store options for ImageMagick cropping.


Constructor Summary
ImageCropOptions()
           
 
Method Summary
 java.lang.String getGravity()
          Gets the 'gravity' which determines how the offset is applied.
 int getHeight()
          Gets the height of the cropped image.
 int getWidth()
          Sets the width of the cropped image.
 int getXOffset()
          Gets the horizontal offset.
 int getYOffset()
          Gets the vertical offset.
 boolean isPercentageCrop()
           
 void setGravity(java.lang.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageCropOptions

public ImageCropOptions()
Method Detail

getHeight

public int getHeight()
Gets the height of the cropped image. By default this is in pixels but if isPercentageCrop is set to true then it changes to percentage.

Returns:
the height

setHeight

public void setHeight(int height)
Sets the height of the cropped image. By default this is in pixels but if isPercentageCrop is set to true then it changes to percentage.

Parameters:
height - the height to set

getWidth

public int getWidth()
Sets the width of the cropped image. By default this is in pixels but if isPercentageCrop is set to true then it changes to percentage.

Returns:
the width

setWidth

public void setWidth(int width)
Sets the width of the cropped image. By default this is in pixels but if isPercentageCrop is set to true then it changes to percentage.

Parameters:
width - the width to set

getXOffset

public int getXOffset()
Gets the horizontal offset. By default this starts fromt he top-left corner of the image and moves right, however the gravity property can change this.

Returns:
the xOffset

setXOffset

public void setXOffset(int xOffset)
Sets the horizontal offset. By default this starts fromt he top-left corner of the image and moves right, however the gravity property can change this.

Parameters:
xOffset - the xOffset to set

getYOffset

public int getYOffset()
Gets the vertical offset. By default this starts fromt he top-left corner of the image and moves down, however the gravity property can change this.

Returns:
the yOffset

setYOffset

public void setYOffset(int yOffset)
Sets the vertical offset. By default this starts fromt he top-left corner of the image and moves down, however the gravity property can change this.

Parameters:
yOffset - the yOffset to set

isPercentageCrop

public boolean isPercentageCrop()
Returns:
the isPercentageCrop

setPercentageCrop

public void setPercentageCrop(boolean isPercentageCrop)
Parameters:
isPercentageCrop - the isPercentageCrop to set

setGravity

public void setGravity(java.lang.String gravity)
Sets the 'gravity' which determines how the offset is applied. It affects both the origin of offset and the direction(s).

Parameters:
gravity - the gravity to set

getGravity

public java.lang.String getGravity()
Gets the 'gravity' which determines how the offset is applied. It affects both the origin of offset and the direction(s).

Returns:
the gravity


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.