Search Results for

    Show / Hide Table of Contents

    Interface IGraphic

    Inherited Members
    IContentElement.Clone()
    IContentElement.Remove()
    IContentElement.Replace(IContentElement)
    IContentElement.Parent
    IContentElement.Status
    Namespace: IronPPT.Interfaces
    Assembly: IronPPT.dll
    Syntax
    public interface IGraphic : IContentElement

    Size, position, and rotation on a slide live on IGraphic. The contract is the common geometry every visual element shares, so the same four members place a picture, a shape, a text box, or a whole slide. A developer works through it whenever a placed element needs to move, scale, or turn, regardless of what kind of element it is.

    A graphic element is obtained from the slide it belongs to rather than created on its own, so an IGraphic reference usually comes from reading or adding an element and is then adjusted. The members are few and shared. Width and Height are DocUnit values setting the element's box. Position is an ElementPosition placing it on the slide. Angle is a Rotation turning it about its center. Because these are inherited wherever the contract is, code that lays out a slide can position any element through the same four members. Concrete implementors in IronPPT include Image, Shape, TextBox, and Slide, each adding its own members on top of this shared geometry.

    graphic.Width = new DocUnit(200);
    graphic.Position = position;

    The add shape example places a shape, and the manage slide how-to covers the slide that holds it.

    Properties

    Angle

    Declaration
    Rotation Angle { get; set; }
    Property Value
    Type Description
    Rotation

    Height

    Declaration
    DocUnit Height { get; set; }
    Property Value
    Type Description
    DocUnit

    Position

    Declaration
    ElementPosition Position { get; set; }
    Property Value
    Type Description
    ElementPosition

    Width

    Declaration
    DocUnit Width { get; set; }
    Property Value
    Type Description
    DocUnit

    Inherited members

    Clone()
    Remove()
    Replace(IContentElement)
    Parent
    Status
    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet