Class BaseGraphicContainer
Inheritance
System.Object
BaseGraphicContainer
Assembly: IronPPT.dll
Syntax
public abstract class BaseGraphicContainer : ParentElement, ICloneableElement, IParentElement, IGraphic, IContentElement
BaseGraphicContainer gives a graphic that also holds child content the same geometry every standalone graphic has. It combines the size, position, and rotation surface of a graphic with the child-handling of a parent element, which is what a shape needs: a shape is positioned and rotated like any graphic yet contains the text or elements drawn inside it. The concrete type that derives from it is Shape.
A container is never created as a BaseGraphicContainer directly, since the class is abstract; a developer works with Shape and reaches these members through it. Because it derives from ParentElement, a shape both carries children and exposes the geometry below, so the container is where the two responsibilities meet for any graphic that wraps content.
Position is the container's ElementPosition, Width and Height are DocUnit sizes, and Angle is its Rotation. Resize takes a width and height as integers, Rotate turns the container by an angle, and FlipHorizontal and FlipVertical mirror it. These behave exactly as they do on a plain graphic, so a shape is placed, sized, rotated, and flipped through the same calls, and its child content moves with it. Adjust the geometry on the container and the content it holds follows, which keeps a shape and its contents aligned without repositioning each piece.
void Arrange(BaseGraphicContainer container)
{
container.Resize(500, 200);
container.FlipHorizontal();
}
The add shape example builds a shape on a slide, the add slide how-to covers slide content, and the Shape reference documents the concrete container that derives from this base.
Constructors
BaseGraphicContainer()
Declaration
protected BaseGraphicContainer()
Properties
Angle
Declaration
public Rotation Angle { get; set; }
Property Value
Height
Declaration
public DocUnit Height { get; set; }
Property Value
Position
Declaration
public ElementPosition Position { get; set; }
Property Value
Width
Declaration
public DocUnit Width { get; set; }
Property Value
Methods
FlipHorizontal()
Declaration
public void FlipHorizontal()
FlipVertical()
Declaration
public void FlipVertical()
Resize(Int32, Int32)
Declaration
public void Resize(int width, int height)
Parameters
| Type |
Name |
Description |
| System.Int32 |
width |
|
| System.Int32 |
height |
|
Rotate(Double)
Declaration
public void Rotate(double angle)
Parameters
| Type |
Name |
Description |
| System.Double |
angle |
|
Implements