BackgroundPicture

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

NameTypeAccessDescription
SizingCssBackgroundSizingRead/WriteHow the size is found: as given (the default), or contained in or covering the origin box.
Widthdouble?Read/WriteThe width when Sizing is explicit; null keeps the natural width, or follows a given height in proportion.
WidthIsPercentboolRead/WriteWidth is a percentage of the origin box’s width.
Heightdouble?Read/WriteThe height when Sizing is explicit; null keeps the natural height, or follows a given width in proportion.
HeightIsPercentboolRead/WriteHeight is a percentage of the origin box’s height.
HorizontalEdgeCssBackgroundEdgeRead/WriteThe edge the picture is placed from across: left (the default), right, or centred.
VerticalEdgeCssBackgroundEdgeRead/WriteThe edge the picture is placed from up and down: top (the default), bottom, or centred.
HorizontalOffsetdoubleRead/WriteHow far in from HorizontalEdge.
HorizontalOffsetIsPercentboolRead/WriteHorizontalOffset is a percentage of the room the picture leaves across the origin box.
VerticalOffsetdoubleRead/WriteHow far in from VerticalEdge.
VerticalOffsetIsPercentboolRead/WriteVerticalOffset is a percentage of the room the picture leaves up and down the origin box.
RepeatAcrossCssBackgroundRepeatRead/WriteHow the picture repeats across.
RepeatUpCssBackgroundRepeatRead/WriteHow the picture repeats up and down.
OriginBackgroundBoxAreaRead/WriteThe box the picture is sized and placed in; the padding box by default.
ClipBackgroundBoxAreaRead/WriteThe box outside which the picture does not show; the border box by default.
BlendModestring?Read/WriteThe PDF blend mode the picture is painted with (Multiply, Screen, …); null paints it normally.

Methods

SignatureDescription
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.

See Also