StyledShapeBase Class
The base class for shapes that support visual styles and transformations.
Declaration
public abstract class StyledShapeBase extends ShapeBase
Remarks
The abstract StyledShapeBase class extends the base shape functionality with style properties, visual effects, rotation, and flip transformations.
Inherited Members
Inheritance
Methods
getEffects() Method
Returns visual effects for the shape.
Declaration
public ShapeEffectProperties getEffects()
Returns
| Type | Description |
|---|---|
| ShapeEffectProperties | Visual effects for the shape. |
Remarks
The following code snippet applies a blur effect to a shape:
package presentation;
import com.devexpress.docs.office.*;
import com.devexpress.system.drawing.*;
import com.devexpress.docs.presentation.*;
// Create a presentation.
try(Presentation presentation = new Presentation()) {
presentation.getSlides().clear();
Slide slide = new Slide(SlideLayoutType.BLANK);
presentation.getSlides().add(slide);
LineStyle outlineStyle = new LineStyle();
outlineStyle.setFill(new SolidFill(Color.getRoyalBlue()));
outlineStyle.setWidth(8);
ShapeEffectProperties effectProperties = new ShapeEffectProperties();
effectProperties.setBlur(new BlurEffect(60, true));
Shape shape1 = new Shape(ShapeType.getRectangle()) {{
setOutline(outlineStyle);
setFill(new SolidFill(Color.getWhite()));
setX(100);
setY(100);
setWidth(300);
setHeight(300);
setEffects(effectProperties);
}};
slide.getShapes().add(shape1);
// Implement additional presentation processing logic.
}
getFlipType() Method
Returns the flip orientation for the shape.
Declaration
public FlipType getFlipType()
Returns
| Type | Description |
|---|---|
| FlipType | The flip orientation for the shape. |
getRotationAngle() Method
Returns the rotation angle for the shape.
Declaration
public float getRotationAngle()
Returns
| Type | Description |
|---|---|
| float | A single-precision floating-point value that specifies the rotation angle in degrees. Positive values rotate the shape clockwise. |
getStyle() Method
Returns the visual style for the shape.
Declaration
public ShapeStyle getStyle()
Returns
| Type | Description |
|---|---|
| ShapeStyle | The shape’s colors, fonts, and references to theme elements. |
setEffects(ShapeEffectProperties value) Method
Sets visual effects for the shape.
Declaration
public void setEffects(ShapeEffectProperties value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | ShapeEffectProperties | Visual effects for the shape. |
setFlipType(FlipType value) Method
Sets the flip orientation for the shape.
Declaration
public void setFlipType(FlipType value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | FlipType | The flip orientation for the shape. |
setRotationAngle(float value) Method
Sets the rotation angle for the shape.
Declaration
public void setRotationAngle(float value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | float | A single-precision floating-point value that specifies the rotation angle in degrees. Positive values rotate the shape clockwise. |
setStyle(ShapeStyle value) Method
Sets the visual style for the shape.
Declaration
public void setStyle(ShapeStyle value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | ShapeStyle | The shape’s colors, fonts, and references to theme elements. |