Search Results for

    Show / Hide Table of Contents

    Class BaseGraphic

    Inheritance
    System.Object
    ContentElement
    BaseGraphic
    Image
    Implements
    ICloneableElement
    IGraphic
    IContentElement
    Inherited Members
    ContentElement._Index
    ContentElement.Replace(IContentElement)
    ContentElement.Remove()
    ContentElement.GetIndex()
    ContentElement.Clone()
    ContentElement.CloneObject<T>(T)
    ContentElement.CaptureInitialValues()
    ContentElement.Index
    ContentElement.Parent
    ContentElement.Status
    Namespace: IronPPT.Models.Abstract
    Assembly: IronPPT.dll
    Syntax
    public abstract class BaseGraphic : ContentElement, ICloneableElement, IGraphic, IContentElement

    BaseGraphic is the shared base every standalone graphic on a slide inherits, the place where size, position, rotation, and flipping are defined once. A developer rarely names it directly; the concrete type to reach for is Image, which derives from it. The base matters because the geometry members below are the same whether the graphic is an image or another standalone graphic, so learning them once covers the family.

    Because it is abstract, a graphic is not created as a BaseGraphic; a developer works with a derived type such as Image and then positions and sizes it through the inherited members. A graphic obtained from the slide can be cast or held as BaseGraphic when only the geometry matters, which is why the IGraphic contract it implements describes exactly this shared surface.

    Position is the graphic's ElementPosition on the slide, while Width and Height are DocUnit values for its size and Angle is its Rotation. Resize sets width and height together from two integers, and Rotate turns the graphic by a given angle. FlipHorizontal and FlipVertical mirror it across the respective axis. These members move and shape the graphic without touching its content, so an image can be repositioned, resized, rotated, or flipped through the same calls used for any other standalone graphic.

    void Place(BaseGraphic graphic)
    {
        graphic.Resize(400, 300);
        graphic.Rotate(15);
    }

    The manage image how-to covers placing and sizing an image on a slide, the add image example shows one in a worked slide, and the Image reference documents the concrete graphic that derives from this base.

    Constructors

    BaseGraphic()

    Declaration
    protected BaseGraphic()

    Properties

    Angle

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

    Height

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

    Position

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

    Width

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

    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

    ICloneableElement
    IGraphic
    IContentElement

    Inherited members

    _Index
    Replace(IContentElement)
    Remove()
    GetIndex()
    Clone()
    CloneObject<T>(T)
    CaptureInitialValues()
    Index
    Parent
    Status
    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet