PictureFillFormat Class
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.
public sealed class PictureFillFormat : FillFormat
Public NotInheritable Class PictureFillFormat
Inherits FillFormat
- Inheritance:
- System.ObjectPictureFillFormat
Properties
Data
Gets the picture data that has an associated content that is either embedded in or linked to the presentation file.
Property Value
The picture data that has an associated content that is either embedded in or linked to the presentation file.
FillType
Gets the Picture value.
public override FillFormatType FillType { get; }
Public Overrides ReadOnly Property FillType As FillFormatType
Property Value
The Picture value.
Overrides
RotateWithShape
Gets or sets a value indicating whether the fill should rotate with the shape.
Property Value
- System.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).
Property Value
- System.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).
Property Value
- System.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).
Property Value
- System.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).
Property Value
- System.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.
Property Value
- System.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 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.
public RectangleAlignment TilingAlignment { get; set; }
Public Property TilingAlignment As RectangleAlignment
Property Value
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 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.
public TileMirrorTypes TilingMirrorType { get; set; }
Public Property TilingMirrorType As TileMirrorTypes
Property Value
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 formats.
TilingOffsetX
Gets or sets the additional horizontal offset after tiling alignment.
Property Value
The additional horizontal offset after tiling alignment.
Remarks
This property is currently not supported when saving to PDF, XPS, and image formats.
TilingOffsetY
Gets or sets the additional vertical offset after tiling alignment.
Property Value
The additional vertical offset after tiling alignment.
Remarks
This property is currently not supported when saving to PDF, XPS, and image formats.
TilingScaleX
Gets or sets the horizontal tiling scale in range from 0 = 0% to 1 = 100%.
Property Value
- System.Double
The horizontal tiling scale.
Remarks
This property is currently not supported when saving to PDF, XPS, and image formats.
TilingScaleY
Gets or sets the vertical tiling scale in range from 0 = 0% to 1 = 100%.
Property Value
- System.Double
The vertical tiling scale.
Remarks
This property is currently not supported when saving to PDF, XPS, and image formats.
Methods
SetData(Content)
Sets the picture data.
public PictureContent SetData(Content content)
Public Function SetData(content As Content) As PictureContent
Parameters
content
- Content
The picture content that should be set.
Returns
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
- System.ArgumentNullException
content
is null.
SetData(Content, PictureCompressionType)
Sets the picture data.
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
An instance of a PictureContent class that represents the picture data that has been set.
Exceptions
- System.ArgumentNullException
content
is null.
SetData(PictureContentType, Stream)
Sets the picture data.
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
- System.IO.Stream
The picture data stream.
Returns
An instance of a PictureContent class that represents the picture data that has been set.
SetData(String)
Sets the picture data.
public PictureContent SetData(string link)
Public Function SetData(link As String) As PictureContent
Parameters
link
- System.String
The link to the picture data.
Returns
An instance of a PictureContent class that represents the picture data that has been set.
Exceptions
- System.ArgumentException
link
is null or System.String.Empty.
SetData(String, Stream)
Sets the picture data.
public PictureContent SetData(string contentType, Stream stream)
Public Function SetData(contentType As String, stream As Stream) As PictureContent
Parameters
contentType
- System.String
Content type (MIME type) of the picture data.
stream
- System.IO.Stream
The picture data stream.
Returns
An instance of a PictureContent class that represents the picture data that has been set.
Exceptions
- System.ArgumentException
contentType
is null or System.String.Empty.
- System.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, System.IO.Stream) | Sets the fill to the picture fill. This method is not applicable on Fill property. (Inherited from FillFormat) |
SetPicture(System.String) | Sets the fill to the picture fill. This method is not applicable on Fill property. (Inherited from FillFormat) |
SetPicture(System.String, System.IO.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) |