BackgroundPicture
Overview
BackgroundPicture is a class in Aspose.PDF FOSS for .NET.
A picture painted as a block’s background (CSS background-image), over its background colour and under its border and content.
This class declares 3 methods for BackgroundPicture objects in .NET programs.
Available methods include: BackgroundPicture.
Public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: BlendMode, Clip, Height, HeightIsPercent, HorizontalEdge, HorizontalOffset, and 10 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Sizing | CssBackgroundSizing | Read/Write | How the size is found: as given (the default), or contained in or covering the origin box. |
Width | double? | Read/Write | The width when Sizing is explicit; null keeps the natural width, or follows a given height in proportion. |
WidthIsPercent | bool | Read/Write | Width is a percentage of the origin box’s width. |
Height | double? | Read/Write | The height when Sizing is explicit; null keeps the natural height, or follows a given width in proportion. |
HeightIsPercent | bool | Read/Write | Height is a percentage of the origin box’s height. |
HorizontalEdge | CssBackgroundEdge | Read/Write | The edge the picture is placed from across: left (the default), right, or centred. |
VerticalEdge | CssBackgroundEdge | Read/Write | The edge the picture is placed from up and down: top (the default), bottom, or centred. |
HorizontalOffset | double | Read/Write | How far in from HorizontalEdge. |
HorizontalOffsetIsPercent | bool | Read/Write | HorizontalOffset is a percentage of the room the picture leaves across the origin box. |
VerticalOffset | double | Read/Write | How far in from VerticalEdge. |
VerticalOffsetIsPercent | bool | Read/Write | VerticalOffset is a percentage of the room the picture leaves up and down the origin box. |
RepeatAcross | CssBackgroundRepeat | Read/Write | How the picture repeats across. |
RepeatUp | CssBackgroundRepeat | Read/Write | How the picture repeats up and down. |
Origin | BackgroundBoxArea | Read/Write | The box the picture is sized and placed in; the padding box by default. |
Clip | BackgroundBoxArea | Read/Write | The box outside which the picture does not show; the border box by default. |
BlendMode | string? | Read/Write | The PDF blend mode the picture is painted with (Multiply, Screen, …); null paints it normally. |
Methods
| Signature | Description |
|---|---|
BackgroundPicture(image: ImageXObject) | A background picture of an image. |
BackgroundPicture(form: XForm) | A background picture of a form. |
BackgroundPicture(drawForArea: Func<double, double, XForm>) | A background picture without a natural size: drawForArea makes the form for an origin box of the width and height it is given, with that box as its bounding box. |