com.powerml.structures.styles
Class ShadowStyle

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

public final class ShadowStyle
extends java.lang.Object
implements java.io.Serializable

This class defines the properties of a shape's shadow.

See Also:
Serialized Form

Field Summary
static byte TYPE_DOUBLE
          Doube shadow
static byte TYPE_EMBOSS_ENGRAVE
          Embossed/engraved shadow
static byte TYPE_OFFSET
          Offset shadow
static byte TYPE_RICH
          Rich shadow
 
Method Summary
 void addXml(org.dom4j.Element parent, int roundPrecision)
          Transforms current instance to XML and adds it to a parent element.
 RGBColor getColor()
          Returns the shadow's color.
 RGBColor getHighlightColor()
          Returns the shadow's highlight color.
 double getOffsetX()
          Returns the x offset in pmu (PowerPoint master units, 576 pmu = 1").
 double getOffsetY()
          Returns the y offset in pmu (PowerPoint master units, 576 pmu = 1").
 double getOriginX()
          Returns the x coordinate of the shadow's origin, relative to the shape's width (between 0 and 1). 0 means left edge, 1 means right edge.
 double getOriginY()
          Returns the y coordinate of the shadow's origin, relative to the shape's height (between 0 and 1). 0 means top edge, 1 means bottom edge.
 int getPerspectiveX()
          Perspective scaling factor in x direction.
 int getPerspectiveY()
          Perspective scaling factor in y direction.
 double getScaleXToX()
          x to x scaling factor.
 double getScaleXToY()
          x to y scaling factor.
 double getScaleYToX()
          y to x scaling factor.
 double getScaleYToY()
          y to y scaling factor.
 double getSecondOffsetX()
          Returns the x coordinate of the second offset (only relevant for double shadows).
 double getSecondOffsetY()
          Returns the y coordinate of the second offset (only relevant for double shadows).
 short getTransparency()
          Returns the shadow's transparency (in percent).
 byte getType()
          Returns the shadow's type (see TYPE_..
 int getWeight()
          Returns the perspective weight (x and y perspective values are divided by this).
 boolean isActive()
          Checks if the shape has a shadow.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_DOUBLE

public static final byte TYPE_DOUBLE
Doube shadow

See Also:
Constant Field Values

TYPE_EMBOSS_ENGRAVE

public static final byte TYPE_EMBOSS_ENGRAVE
Embossed/engraved shadow

See Also:
Constant Field Values

TYPE_OFFSET

public static final byte TYPE_OFFSET
Offset shadow

See Also:
Constant Field Values

TYPE_RICH

public static final byte TYPE_RICH
Rich shadow

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

getColor

public RGBColor getColor()
Returns the shadow's color.

Returns:
color

getHighlightColor

public RGBColor getHighlightColor()
Returns the shadow's highlight color.

Returns:
highlight color

getOffsetX

public double getOffsetX()
Returns the x offset in pmu (PowerPoint master units, 576 pmu = 1").

Returns:
x offset

getOffsetY

public double getOffsetY()
Returns the y offset in pmu (PowerPoint master units, 576 pmu = 1").

Returns:
y offset

getOriginX

public double getOriginX()
Returns the x coordinate of the shadow's origin, relative to the shape's width (between 0 and 1). 0 means left edge, 1 means right edge.

Returns:
x relative coordinate of origin

getOriginY

public double getOriginY()
Returns the y coordinate of the shadow's origin, relative to the shape's height (between 0 and 1). 0 means top edge, 1 means bottom edge.

Returns:
x relative coordinate of origin

getPerspectiveX

public int getPerspectiveX()
Perspective scaling factor in x direction. Divided by weight (see getWeight()).

Returns:
x perspective scaling

getPerspectiveY

public int getPerspectiveY()
Perspective scaling factor in y direction. Divided by weight (see getWeight()).

Returns:
y perspective scaling

getScaleXToX

public double getScaleXToX()
x to x scaling factor.

Returns:
x to x scaling

getScaleXToY

public double getScaleXToY()
x to y scaling factor.

Returns:
x to y scaling

getScaleYToX

public double getScaleYToX()
y to x scaling factor.

Returns:
y to x scaling

getScaleYToY

public double getScaleYToY()
y to y scaling factor.

Returns:
y to y scaling

getSecondOffsetX

public double getSecondOffsetX()
Returns the x coordinate of the second offset (only relevant for double shadows). Unit is pmu (PowerPoint master unit, 576 pmu = 1").

Returns:
second x offset

getSecondOffsetY

public double getSecondOffsetY()
Returns the y coordinate of the second offset (only relevant for double shadows). Unit is pmu (PowerPoint master unit, 576 pmu = 1").

Returns:
second y offset

getTransparency

public short getTransparency()
Returns the shadow's transparency (in percent).

Returns:
transparency

getType

public byte getType()
Returns the shadow's type (see TYPE_.. constants).

Returns:
shadow type

getWeight

public int getWeight()
Returns the perspective weight (x and y perspective values are divided by this).

Returns:
perspective weight

isActive

public boolean isActive()
Checks if the shape has a shadow.

Returns:
true if shape has shadow, otherwise false


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