GemBox.Presentation
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    PictureFillFormat Class

    Namespace:
    GemBox.Presentation
    Assembly:
    GemBox.Presentation.dll

    Represents a fill with a picture that can either be tiled (as a texture) or stretched to fill the available area. This fill is not supported for outlines, borders and underlines.

    • C#
    • VB.NET
    public sealed class PictureFillFormat : FillFormat
    Public NotInheritable Class PictureFillFormat
        Inherits FillFormat
    Inheritance:
    Object
    FillFormat
    PictureFillFormat

    Properties

    Data

    Gets the picture data that has an associated content that is either embedded in or linked to the presentation file.

    • C#
    • VB.NET
    public PictureContent Data { get; }
    Public ReadOnly Property Data As PictureContent
    Property Value
    PictureContent

    The picture data that has an associated content that is either embedded in or linked to the presentation file.

    FillType

    Gets the Picture value.

    • C#
    • VB.NET
    public override FillFormatType FillType { get; }
    Public Overrides ReadOnly Property FillType As FillFormatType
    Property Value
    FillFormatType

    The Picture value.

    Overrides
    FillFormat.FillType

    RotateWithShape

    Gets or sets a value indicating whether the fill should rotate with the shape.

    • C#
    • VB.NET
    public bool RotateWithShape { get; set; }
    Public Property RotateWithShape As Boolean
    Property Value
    Boolean

    true if fill should rotate with the shape; otherwise, false.

    Remarks

    If set to true and a shape that has been filled with a picture is transformed with a rotation, then the fill will be transformed with the same rotation.

    StretchBottom

    Gets or sets the offset (inset) of the bottom edge of the stretched picture fill from the bottom edge of the filling area specified as a relative value (percentage of the filling area height, value of 1 is equal to 100% of the filling area height).

    • C#
    • VB.NET
    public double StretchBottom { get; set; }
    Public Property StretchBottom As Double
    Property Value
    Double

    The offset (inset) of the bottom edge of the stretched picture fill from the bottom edge of the filling area.

    StretchLeft

    Gets or sets the offset (inset) of the left edge of the stretched picture fill from the left edge of the filling area specified as a relative value (percentage of the filling area width, value of 1 is equal to 100% of the filling area width).

    • C#
    • VB.NET
    public double StretchLeft { get; set; }
    Public Property StretchLeft As Double
    Property Value
    Double

    The offset (inset) of the left edge of the stretched picture fill from the left edge of the filling area.

    StretchRight

    Gets or sets the offset (inset) of the right edge of the stretched picture fill from the right edge of the filling area specified as a relative value (percentage of the filling area width, value of 1 is equal to 100% of the filling area width).

    • C#
    • VB.NET
    public double StretchRight { get; set; }
    Public Property StretchRight As Double
    Property Value
    Double

    The offset (inset) of the right edge of the stretched picture fill from the right edge of the filling area.

    StretchTop

    Gets or sets the offset (inset) of the top edge of the stretched picture fill from the top edge of the filling area specified as a relative value (percentage of the filling area height, value of 1 is equal to 100% of the filling area height).

    • C#
    • VB.NET
    public double StretchTop { get; set; }
    Public Property StretchTop As Double
    Property Value
    Double

    The offset (inset) of the top edge of the stretched picture fill from the top edge of the filling area.

    TileAsTexture

    Gets or sets a value indicating whether the fill should tile as a texture or stretch over the filling area.

    • C#
    • VB.NET
    public bool TileAsTexture { get; set; }
    Public Property TileAsTexture As Boolean
    Property Value
    Boolean

    true if fill should tile as a texture; otherwise, false to stretch it over the filling area.

    Remarks

    This property is currently not supported when saving to PDF, XPS, and image file formats.

    TilingAlignment

    Gets or sets a value indicating where to align the first tile with respect to the filling area.

    Alignment happens after the scaling, but before the additional offset.

    • C#
    • VB.NET
    public RectangleAlignment TilingAlignment { get; set; }
    Public Property TilingAlignment As RectangleAlignment
    Property Value
    RectangleAlignment

    A value indicating where to align the first tile with respect to the filling area.

    Remarks

    This property is currently not supported when saving to PDF, XPS, and image file formats.

    TilingMirrorType

    Specifies the direction(s) in which to flip the source image while tiling.

    Images may be flipped horizontally, vertically, or in both directions to fill the entire region.

    • C#
    • VB.NET
    public TileMirrorTypes TilingMirrorType { get; set; }
    Public Property TilingMirrorType As TileMirrorTypes
    Property Value
    TileMirrorTypes

    The direction(s) in which to flip the source image while tiling.

    Remarks

    This property is currently not supported when saving to PDF, XPS, and image file formats.

    TilingOffsetX

    Gets or sets the additional horizontal offset after tiling alignment.

    • C#
    • VB.NET
    public Length TilingOffsetX { get; set; }
    Public Property TilingOffsetX As Length
    Property Value
    Length

    The additional horizontal offset after tiling alignment.

    Remarks

    This property is currently not supported when saving to PDF, XPS, and image file formats.

    TilingOffsetY

    Gets or sets the additional vertical offset after tiling alignment.

    • C#
    • VB.NET
    public Length TilingOffsetY { get; set; }
    Public Property TilingOffsetY As Length
    Property Value
    Length

    The additional vertical offset after tiling alignment.

    Remarks

    This property is currently not supported when saving to PDF, XPS, and image file formats.

    TilingScaleX

    Gets or sets the horizontal tiling scale in range from 0 = 0% to 1 = 100%.

    • C#
    • VB.NET
    public double TilingScaleX { get; set; }
    Public Property TilingScaleX As Double
    Property Value
    Double

    The horizontal tiling scale.

    Remarks

    This property is currently not supported when saving to PDF, XPS, and image file formats.

    TilingScaleY

    Gets or sets the vertical tiling scale in range from 0 = 0% to 1 = 100%.

    • C#
    • VB.NET
    public double TilingScaleY { get; set; }
    Public Property TilingScaleY As Double
    Property Value
    Double

    The vertical tiling scale.

    Remarks

    This property is currently not supported when saving to PDF, XPS, and image file formats.

    Methods

    SetData(Content)

    Sets the picture data.

    • C#
    • VB.NET
    public PictureContent SetData(Content content)
    Public Function SetData(content As Content) As PictureContent
    Parameters
    content
    Content

    The picture content that should be set.

    Returns
    PictureContent

    An instance of a PictureContent class that represents the picture data that has been set.

    Remarks

    Use this overload if multiple PictureFillFormats should share the same picture data.

    Exceptions
    ArgumentNullException

    content is null.

    SetData(Content, PictureCompressionType)

    Sets the picture data.

    • C#
    • VB.NET
    public PictureContent SetData(Content content, PictureCompressionType compressionType)
    Public Function SetData(content As Content, compressionType As PictureCompressionType) As PictureContent
    Parameters
    content
    Content

    The picture content that should be set.

    compressionType
    PictureCompressionType

    Compression level that the generating application can use as a guidance when optimizing picture data size.

    Returns
    PictureContent

    An instance of a PictureContent class that represents the picture data that has been set.

    Exceptions
    ArgumentNullException

    content is null.

    SetData(PictureContentType, Stream)

    Sets the picture data.

    • C#
    • VB.NET
    public PictureContent SetData(PictureContentType contentType, Stream stream)
    Public Function SetData(contentType As PictureContentType, stream As Stream) As PictureContent
    Parameters
    contentType
    PictureContentType

    Content type of the picture data.

    stream
    Stream

    The picture data stream.

    Returns
    PictureContent

    An instance of a PictureContent class that represents the picture data that has been set.

    SetData(String)

    Sets the picture data.

    • C#
    • VB.NET
    public PictureContent SetData(string link)
    Public Function SetData(link As String) As PictureContent
    Parameters
    link
    String

    The link to the picture data.

    Returns
    PictureContent

    An instance of a PictureContent class that represents the picture data that has been set.

    Exceptions
    ArgumentException

    link is null or Empty.

    SetData(String, Stream)

    Sets the picture data.

    • C#
    • VB.NET
    public PictureContent SetData(string contentType, Stream stream)
    Public Function SetData(contentType As String, stream As Stream) As PictureContent
    Parameters
    contentType
    String

    Content type (MIME type) of the picture data.

    stream
    Stream

    The picture data stream.

    Returns
    PictureContent

    An instance of a PictureContent class that represents the picture data that has been set.

    Exceptions
    ArgumentException

    contentType is null or Empty.

    ArgumentNullException

    stream is null.

    Inherited Methods

    SetGradient(GradientFillType)

    Sets the fill to the gradient fill.

    (Inherited from FillFormat)

    SetNone()

    Sets the fill to none, thus making the area transparent.

    (Inherited from FillFormat)

    SetPattern(PatternFillType, Color, Color)

    Sets the fill to the pattern fill.

    (Inherited from FillFormat)

    SetPicture(Content)

    Sets the fill to the picture fill.

    This method is not applicable on Fill property.

    (Inherited from FillFormat)

    SetPicture(PictureContentType, Stream)

    Sets the fill to the picture fill.

    This method is not applicable on Fill property.

    (Inherited from FillFormat)

    SetPicture(String)

    Sets the fill to the picture fill.

    This method is not applicable on Fill property.

    (Inherited from FillFormat)

    SetPicture(String, Stream)

    Sets the fill to the picture fill.

    This method is not applicable on Fill property.

    (Inherited from FillFormat)

    SetSlideBackground()

    Sets the fill of the Shape to that of the slide background surface. Applicable only on Shape's fill.

    This method does not set the fill of the shape to be transparent but instead sets it to be filled with the portion of the slide background that is directly behind it.

    (Inherited from FillFormat)

    SetSolid(Color)

    Sets the fill to the solid fill.

    (Inherited from FillFormat)

    Examples

    Shape Formatting Example
    Pictures Example
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.