com.powerml.structures.styles
Class PictureModifier

java.lang.Object
  extended bycom.powerml.structures.styles.PictureModifier
All Implemented Interfaces:
java.io.Serializable

public class PictureModifier
extends java.lang.Object
implements java.io.Serializable

Represents transformations applied to images.

See Also:
Serialized Form

Field Summary
static byte BLACK_AND_WHITE
          Black and white (use as color adjustment)
static byte COLORED
          Default color level - colored
static byte GRAYSCALE
          Greyscale (use as color adjustment)
 
Method Summary
 void addXml(org.dom4j.Element parent, int roundPrecision)
          Transforms current instance to XML and adds it to a parent element.
 short getBrightnessAdjust()
          Returns the brightness adjustment value (between -50 and 50).
 byte getColorLevel()
          Returns the color level.
 short getContrastAdjust()
          Returns the contrast adjustment value (between -50 and 50).
 double getCropBottom()
          Returns the amount trimmed off the bottom of the picture, relative to the picture's height (between 0 and 1).
 double getCropLeft()
          Returns the amount trimmed off the left side of the picture, relative to the picture's width (between 0 and 1).
 double getCropRight()
          Returns the amount trimmed off the right side of the picture, relative to the picture's width (between 0 and 1).
 double getCropTop()
          Returns the amount trimmed off the top of the picture, relative to the picture's height (between 0 and 1).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BLACK_AND_WHITE

public static final byte BLACK_AND_WHITE
Black and white (use as color adjustment)

See Also:
Constant Field Values

COLORED

public static final byte COLORED
Default color level - colored

See Also:
Constant Field Values

GRAYSCALE

public static final byte GRAYSCALE
Greyscale (use as color adjustment)

See Also:
Constant Field Values
Method Detail

addXml

public void addXml(org.dom4j.Element parent,
                   int roundPrecision)
Transforms current instance to XML and adds it to a parent element.

Parameters:
parent - parent element
roundPrecision - rounding precision

getBrightnessAdjust

public short getBrightnessAdjust()
Returns the brightness adjustment value (between -50 and 50).

Returns:
brightness adjustment

getColorLevel

public byte getColorLevel()
Returns the color level. Three values are possible: COLORED (default), GRAYSCALE and BLACK_AND_WHITE.

Returns:
color level.

getContrastAdjust

public short getContrastAdjust()
Returns the contrast adjustment value (between -50 and 50).

Returns:
contrast adjustment

getCropBottom

public double getCropBottom()
Returns the amount trimmed off the bottom of the picture, relative to the picture's height (between 0 and 1).

Returns:
bottom crop ammount

getCropLeft

public double getCropLeft()
Returns the amount trimmed off the left side of the picture, relative to the picture's width (between 0 and 1).

Returns:
left crop amount

getCropRight

public double getCropRight()
Returns the amount trimmed off the right side of the picture, relative to the picture's width (between 0 and 1).

Returns:
right crop amount

getCropTop

public double getCropTop()
Returns the amount trimmed off the top of the picture, relative to the picture's height (between 0 and 1).

Returns:
top crop amount


© 2004-2005 Ralf Terdic. All rights reserved.
www.powerml.com