Namespace EasyXLS.Drawings.Formatting
Class ShadowFormat
System.Object
EasyXLS.Drawings.Formatting.ShadowFormat
public class ShadowFormat
extends System.Object
This class stores the shadow options for images, shapes and other drawing objects. It allows to set a predefined shadow or to create a new one. There are
4 types of base shadows: none, outer, inner or perspective shadow.
-
Constant Summary
Modifier and TypeFieldDescriptionconst System.String
A constant indicating the bottom alignment.const System.String
A constant indicating the bottom left alignment.const System.String
A constant indicating the bottom right alignment.const System.String
A constant indicating the center alignment.const System.String
A constant indicating the left alignment.const System.String
A constant indicating the right alignment.const System.String
A constant indicating the top alignment.const System.String
A constant indicating the top left alignment.const System.String
A constant indicating the top right alignment.const short
A constant indicating the inside bottom shadow.const short
A constant indicating the inside center shadow.const short
A constant indicating the inside diagonal bottom left shadow.const short
A constant indicating the inside diagonal bottom right shadow.const short
A constant indicating the inside diagonal top left shadow.const short
A constant indicating the inside diagonal top right shadow.const short
A constant indicating the inside left shadow.const short
A constant indicating the inside right shadow.const short
A constant indicating the inside top shadow.const short
A constant indicating that no shadow is set.const short
A constant indicating the offset bottom shadow.const short
A constant indicating the offset center shadow.const short
A constant indicating the offset diagonal bottom left shadow.const short
A constant indicating the offset diagonal bottom right shadow.const short
A constant indicating the offset diagonal top left shadow.const short
A constant indicating the offset diagonal top right shadow.const short
A constant indicating the offset left shadow.const short
A constant indicating the offset right shadow.const short
A constant indicating the offset top shadow.const short
A constant indicating the perspective below shadow.const short
A constant indicating the perspective diagonal lower left shadow.const short
A constant indicating the perspective diagonal lower right shadow.const short
A constant indicating the perspective diagonal upper left shadow.const short
A constant indicating the perspective diagonal upper right shadow.const short
A constant indicating the inner shadow type.const short
A constant indicating that no shadow type is set.const short
A constant indicating the outer shadow type.const short
A constant indicating the perspective shadow type. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionClone()
Creates and returns a copy of this object.System.String
Returns the alignment of the shadow.float
getAngle()
Returns the angle of the shadow.float
getBlur()
Returns the blur of the shadow.System.Drawing.Color
getColor()
Returns the shadow colorfloat
Returns the distance of the shadow.int
Returns the shadow type of the shape.float
getSize()
Returns the size of the shadow.Returns the shadow colorint
Returns the transparency of the shadow.bool
Returns true if the shape has shadow, false otherwise.bool
Returns true if it is a perspective shadow displayed in front of the shape, false otherwise.void
setAngle(float angle)
Sets the angle of the shadow.void
setBlur(float blur)
Sets the blur of the shadow.void
setColor(ThemeColor themeColor)
Sets the shadow color.
This method is overridden as setColor_2 in COM+ version of EasyXLS.
void
setColor(System.Drawing.Color color)
Sets the shadow color.void
setDistance(float distance)
Sets the distance of the shadow.void
setInnerShadow(int transparency, float blur, float angle, float distance)
Sets the inner shadow option of the shape.void
setNoShadow(bool hasShadow)
Sets the no shadow option of the shape.void
setOuterShadow(int transparency, float size, float blur, float angle, float distance, System.String alignment)
Sets the outer shadow option of the shape.void
setPerspectiveShadow(int transparency, float size, float blur, float angle, float distance, System.String alignment, bool isLower)
Sets the perspective shadow option of the shape.void
setShadow(int presetShadows)
Sets the shadow of the shape.void
setSize(float size)
Sets the size of the shadow.void
setTransparency(int transparency)
Sets the transparency of the shadow.Methods inherited from class System.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
TYPE_NO_SHADOW
public const final short TYPE_NO_SHADOWA constant indicating that no shadow type is set. Embedded value is "0".- See Also:
- Constant Values
-
TYPE_OUTER
public const final short TYPE_OUTERA constant indicating the outer shadow type. Embedded value is "1".- See Also:
- Constant Values
-
TYPE_INNER
public const final short TYPE_INNERA constant indicating the inner shadow type. Embedded value is "2".- See Also:
- Constant Values
-
TYPE_PERSPECTIVE
public const final short TYPE_PERSPECTIVEA constant indicating the perspective shadow type. Embedded value is "3".- See Also:
- Constant Values
-
NO_SHADOW
public const final short NO_SHADOWA constant indicating that no shadow is set. Embedded value is "0".- See Also:
- Constant Values
-
OFFSET_DIAGONAL_BOTTOM_RIGHT
public const final short OFFSET_DIAGONAL_BOTTOM_RIGHTA constant indicating the offset diagonal bottom right shadow. Embedded value is "1".- See Also:
- Constant Values
-
OFFSET_BOTTOM
public const final short OFFSET_BOTTOMA constant indicating the offset bottom shadow. Embedded value is "2".- See Also:
- Constant Values
-
OFFSET_DIAGONAL_BOTTOM_LEFT
public const final short OFFSET_DIAGONAL_BOTTOM_LEFTA constant indicating the offset diagonal bottom left shadow. Embedded value is "3".- See Also:
- Constant Values
-
OFFSET_RIGHT
public const final short OFFSET_RIGHTA constant indicating the offset right shadow. Embedded value is "4".- See Also:
- Constant Values
-
OFFSET_CENTER
public const final short OFFSET_CENTERA constant indicating the offset center shadow. Embedded value is "5".- See Also:
- Constant Values
-
OFFSET_LEFT
public const final short OFFSET_LEFTA constant indicating the offset left shadow. Embedded value is "6".- See Also:
- Constant Values
-
OFFSET_DIAGONAL_TOP_RIGHT
public const final short OFFSET_DIAGONAL_TOP_RIGHTA constant indicating the offset diagonal top right shadow. Embedded value is "7".- See Also:
- Constant Values
-
OFFSET_TOP
public const final short OFFSET_TOPA constant indicating the offset top shadow. Embedded value is "8".- See Also:
- Constant Values
-
OFFSET_DIAGONAL_TOP_LEFT
public const final short OFFSET_DIAGONAL_TOP_LEFTA constant indicating the offset diagonal top left shadow. Embedded value is "9".- See Also:
- Constant Values
-
INSIDE_DIAGONAL_TOP_LEFT
public const final short INSIDE_DIAGONAL_TOP_LEFTA constant indicating the inside diagonal top left shadow. Embedded value is "10".- See Also:
- Constant Values
-
INSIDE_TOP
public const final short INSIDE_TOPA constant indicating the inside top shadow. Embedded value is "11".- See Also:
- Constant Values
-
INSIDE_DIAGONAL_TOP_RIGHT
public const final short INSIDE_DIAGONAL_TOP_RIGHTA constant indicating the inside diagonal top right shadow. Embedded value is "12".- See Also:
- Constant Values
-
INSIDE_LEFT
public const final short INSIDE_LEFTA constant indicating the inside left shadow. Embedded value is "13".- See Also:
- Constant Values
-
INSIDE_CENTER
public const final short INSIDE_CENTERA constant indicating the inside center shadow. Embedded value is "14".- See Also:
- Constant Values
-
INSIDE_RIGHT
public const final short INSIDE_RIGHTA constant indicating the inside right shadow. Embedded value is "15".- See Also:
- Constant Values
-
INSIDE_DIAGONAL_BOTTOM_LEFT
public const final short INSIDE_DIAGONAL_BOTTOM_LEFTA constant indicating the inside diagonal bottom left shadow. Embedded value is "16".- See Also:
- Constant Values
-
INSIDE_BOTTOM
public const final short INSIDE_BOTTOMA constant indicating the inside bottom shadow. Embedded value is "17".- See Also:
- Constant Values
-
INSIDE_DIAGONAL_BOTTOM_RIGHT
public const final short INSIDE_DIAGONAL_BOTTOM_RIGHTA constant indicating the inside diagonal bottom right shadow. Embedded value is "18".- See Also:
- Constant Values
-
PERSPECTIVE_DIAGONAL_UPPER_LEFT
public const final short PERSPECTIVE_DIAGONAL_UPPER_LEFTA constant indicating the perspective diagonal upper left shadow. Embedded value is "19".- See Also:
- Constant Values
-
PERSPECTIVE_DIAGONAL_UPPER_RIGHT
public const final short PERSPECTIVE_DIAGONAL_UPPER_RIGHTA constant indicating the perspective diagonal upper right shadow. Embedded value is "20".- See Also:
- Constant Values
-
PERSPECTIVE_BELOW
public const final short PERSPECTIVE_BELOWA constant indicating the perspective below shadow. Embedded value is "21".- See Also:
- Constant Values
-
PERSPECTIVE_DIAGONAL_LOWER_LEFT
public const final short PERSPECTIVE_DIAGONAL_LOWER_LEFTA constant indicating the perspective diagonal lower left shadow. Embedded value is "22".- See Also:
- Constant Values
-
PERSPECTIVE_DIAGONAL_LOWER_RIGHT
public const final short PERSPECTIVE_DIAGONAL_LOWER_RIGHTA constant indicating the perspective diagonal lower right shadow. Embedded value is "23".- See Also:
- Constant Values
-
ALIGNMENT_TOP_LEFT
public const final System.String ALIGNMENT_TOP_LEFTA constant indicating the top left alignment. Embedded value is "tl".- See Also:
- Constant Values
-
ALIGNMENT_TOP
public const final System.String ALIGNMENT_TOPA constant indicating the top alignment. Embedded value is "t".- See Also:
- Constant Values
-
ALIGNMENT_TOP_RIGHT
public const final System.String ALIGNMENT_TOP_RIGHTA constant indicating the top right alignment. Embedded value is "tr".- See Also:
- Constant Values
-
ALIGNMENT_LEFT
public const final System.String ALIGNMENT_LEFTA constant indicating the left alignment. Embedded value is "l".- See Also:
- Constant Values
-
ALIGNMENT_CENTER
public const final System.String ALIGNMENT_CENTERA constant indicating the center alignment. Embedded value is "ctr".- See Also:
- Constant Values
-
ALIGNMENT_RIGHT
public const final System.String ALIGNMENT_RIGHTA constant indicating the right alignment. Embedded value is "r".- See Also:
- Constant Values
-
ALIGNMENT_BOTTOM_LEFT
public const final System.String ALIGNMENT_BOTTOM_LEFTA constant indicating the bottom left alignment. Embedded value is "bl".- See Also:
- Constant Values
-
ALIGNMENT_BOTTOM
public const final System.String ALIGNMENT_BOTTOMA constant indicating the bottom alignment. Embedded value is "b".- See Also:
- Constant Values
-
ALIGNMENT_BOTTOM_RIGHT
public const final System.String ALIGNMENT_BOTTOM_RIGHTA constant indicating the bottom right alignment. Embedded value is "br".- See Also:
- Constant Values
-
-
Constructor Details
-
ShadowFormat
public ShadowFormat()Defines an instance of the shadow formatting.
-
-
Method Details
-
getShadowType
public int getShadowType()Returns the shadow type of the shape. Possible values are available inShadowFormat
class.- Returns:
- the shadow type of the shape
- See Also:
setShadow(int)
,setNoShadow(bool)
,setOuterShadow(int, float, float, float, float, System.String)
,setInnerShadow(int, float, float, float)
,setPerspectiveShadow(int, float, float, float, float, System.String, bool)
-
HasShadow
public bool HasShadow()Returns true if the shape has shadow, false otherwise.- Returns:
- true if the shape has shadow, false otherwise
- See Also:
setShadow(int)
,setNoShadow(bool)
,setOuterShadow(int, float, float, float, float, System.String)
,setInnerShadow(int, float, float, float)
,setPerspectiveShadow(int, float, float, float, float, System.String, bool)
-
setNoShadow
public void setNoShadow(bool hasShadow)Sets the no shadow option of the shape.- Parameters:
hasShadow
- whether no shadow option is set- See Also:
setOuterShadow(int, float, float, float, float, System.String)
,setInnerShadow(int, float, float, float)
,setPerspectiveShadow(int, float, float, float, float, System.String, bool)
,setShadow(int)
-
setOuterShadow
public void setOuterShadow(int transparency, float size, float blur, float angle, float distance, System.String alignment)Sets the outer shadow option of the shape. Possible values are available inShadowFormat
class.- Parameters:
transparency
- the transparency option of the shapesize
- the size option of the shapeblur
- the blur option of the shapeangle
- the angle option of the shapedistance
- the distance option of the shapealignment
- the alignment option of the shape. Possible values are available inShadowFormat
class.- See Also:
getShadowType()
,setShadow(int)
,setNoShadow(bool)
,setInnerShadow(int, float, float, float)
,setPerspectiveShadow(int, float, float, float, float, System.String, bool)
-
setInnerShadow
public void setInnerShadow(int transparency, float blur, float angle, float distance)Sets the inner shadow option of the shape.- Parameters:
transparency
- the transparency option of the shapeblur
- the blur option of the shapeangle
- the angle option of the shapedistance
- the distance option of the shape- See Also:
getShadowType()
,setShadow(int)
,setNoShadow(bool)
,setOuterShadow(int, float, float, float, float, System.String)
,setPerspectiveShadow(int, float, float, float, float, System.String, bool)
-
setPerspectiveShadow
public void setPerspectiveShadow(int transparency, float size, float blur, float angle, float distance, System.String alignment, bool isLower)Sets the perspective shadow option of the shape. Possible values are available inShadowFormat
class.- Parameters:
transparency
- the transparency option of the shapesize
- the size option of the shapeblur
- the blur option of the shapeangle
- the angle option of the shapedistance
- the distance option of the shapealignment
- the alignment option of the shape. Possible values are available inShadowFormat
class.isLower
- a lower shadow displayed in front of the shape- See Also:
getShadowType()
,setShadow(int)
,setNoShadow(bool)
,setOuterShadow(int, float, float, float, float, System.String)
,setInnerShadow(int, float, float, float)
-
IsLowerPerspective
public bool IsLowerPerspective()Returns true if it is a perspective shadow displayed in front of the shape, false otherwise.- Returns:
- true if it is a perspective shadow displayed in front of the shape, false otherwise
- See Also:
setPerspectiveShadow(int, float, float, float, float, System.String, bool)
-
setShadow
public void setShadow(int presetShadows)Sets the shadow of the shape. Possible values are available inShadowFormat
class.- Parameters:
presetShadows
- the built-in shadow of the shape- See Also:
HasShadow()
,setNoShadow(bool)
,setOuterShadow(int, float, float, float, float, System.String)
,setInnerShadow(int, float, float, float)
,setPerspectiveShadow(int, float, float, float, float, System.String, bool)
-
getColor
public System.Drawing.Color getColor()Returns the shadow color- Returns:
- the shadow color
- See Also:
setColor(Color)
-
setColor
public void setColor(System.Drawing.Color color)Sets the shadow color.- Parameters:
color
- the shadow color- See Also:
getColor()
-
getThemeColor
Returns the shadow color- Returns:
- the shadow color
- See Also:
setColor(ThemeColor)
-
setColor
Sets the shadow color.
This method is overridden as setColor_2 in COM+ version of EasyXLS.
- Parameters:
themeColor
- the shadow color- See Also:
getThemeColor()
-
getTransparency
public int getTransparency()Returns the transparency of the shadow.- Returns:
- the transparency of the shadow
- See Also:
setTransparency(int)
,getSize()
,getBlur()
,getAngle()
,getDistance()
-
setTransparency
public void setTransparency(int transparency)Sets the transparency of the shadow.- Parameters:
transparency
- the transparency of the shadow- See Also:
getTransparency()
,setSize(float)
,setBlur(float)
,setAngle(float)
,setDistance(float)
-
getSize
public float getSize()Returns the size of the shadow.- Returns:
- the size of the shadow
- See Also:
setSize(float)
,getTransparency()
,getBlur()
,getAngle()
,getDistance()
-
setSize
public void setSize(float size)Sets the size of the shadow.- Parameters:
size
- the size of the shadow- See Also:
getSize()
,setTransparency(int)
,setBlur(float)
,setAngle(float)
,setDistance(float)
-
getBlur
public float getBlur()Returns the blur of the shadow.- Returns:
- the blur of the shadow
- See Also:
setBlur(float)
,getTransparency()
,getSize()
,getAngle()
,getDistance()
-
setBlur
public void setBlur(float blur)Sets the blur of the shadow.- Parameters:
blur
- the blur of the shadow- See Also:
getBlur()
,setTransparency(int)
,setSize(float)
,setAngle(float)
,setDistance(float)
-
getAngle
public float getAngle()Returns the angle of the shadow.- Returns:
- the angle of the shadow
- See Also:
setAngle(float)
,getTransparency()
,getBlur()
,getSize()
,getDistance()
-
setAngle
public void setAngle(float angle)Sets the angle of the shadow.- Parameters:
angle
- the angle of the shadow- See Also:
getAngle()
,setTransparency(int)
,getBlur()
,setSize(float)
,setDistance(float)
-
getDistance
public float getDistance()Returns the distance of the shadow.- Returns:
- the distance of the shadow
- See Also:
setDistance(float)
,getTransparency()
,getBlur()
,getSize()
,getAngle()
-
setDistance
public void setDistance(float distance)Sets the distance of the shadow.- Parameters:
distance
- the distance of the shadow- See Also:
getDistance()
,setTransparency(int)
,setBlur(float)
,setSize(float)
,setAngle(float)
-
getAlignment
public System.String getAlignment()Returns the alignment of the shadow. Possible values are available inShadowFormat
class.- Returns:
- the alignment of the shadow
-
Clone
Creates and returns a copy of this object.- Returns:
- a clone of this instance.
-