Search Results for

    Show / Hide Table of Contents

    Interface IGraphicContainer

    Namespace: IronPPT.Interfaces
    Assembly: IronPPT.dll
    Syntax
    public interface IGraphicContainer

    When a surface in a presentation needs to hold pictures and shapes, IGraphicContainer describes the capability it exposes. The contract models anything that can own a collection of images and a collection of shapes and add new ones to either, so code that builds slide content can target the contract instead of a specific element type and stay reusable across the surfaces that carry graphics.

    A developer meets this contract while populating a slide. The container is the thing you ask to add a picture or a shape, and it keeps each kind in its own list so the two never tangle. Read access comes through Images and Shapes, both get-only List properties; the lists themselves are mutable, but the slots are assigned by the container rather than replaced wholesale.

    Adding is handled by overloaded factory methods. AddImage accepts an existing IImage, an AnyBitmap, a Stream, or a string file path and returns the resulting IImage, so the same call covers a picture loaded from disk, from memory, or already constructed. AddShape takes an IShape and returns it. Because each Add call returns the created element, the common pattern is to add and immediately position or name the result in one statement. The documented IronPPT object model exposes this contract for graphics-bearing surfaces; a developer normally works through the slide and shape types that carry images and shapes rather than naming IGraphicContainer directly.

    IImage picture = container.AddImage("logo.png");
    picture.Name = "brand-logo";

    The add image example adds a picture, the add shape example adds a shape, and the manage slide how-to shows the slide that holds them.

    Properties

    Images

    Declaration
    List<IImage> Images { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<IImage>

    Shapes

    Declaration
    List<IShape> Shapes { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<IShape>

    Methods

    AddImage(IImage)

    Declaration
    IImage AddImage(IImage image)
    Parameters
    Type Name Description
    IImage image
    Returns
    Type Description
    IImage

    AddImage(AnyBitmap)

    Declaration
    IImage AddImage(AnyBitmap anyBitmap)
    Parameters
    Type Name Description
    IronSoftware.Drawing.AnyBitmap anyBitmap
    Returns
    Type Description
    IImage

    AddImage(Stream)

    Declaration
    IImage AddImage(Stream imageStream)
    Parameters
    Type Name Description
    System.IO.Stream imageStream
    Returns
    Type Description
    IImage

    AddImage(String)

    Declaration
    IImage AddImage(string imagePath)
    Parameters
    Type Name Description
    System.String imagePath
    Returns
    Type Description
    IImage

    AddShape(IShape)

    Declaration
    IShape AddShape(IShape shape)
    Parameters
    Type Name Description
    IShape shape
    Returns
    Type Description
    IShape
    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet