Class ImagePlacement
A positioned image: where a picture goes on the page, how much of its source is cropped away, and a way to open its bytes. Whatever produces the page adds one for every picture it places, and both renderers draw it.
public sealed class ImagePlacement : ILayoutPrimitive
- Inheritance
-
ImagePlacement
- Implements
- Inherited Members
Constructors
- ImagePlacement(Twips, Twips, Twips, Twips, string?, bool)
Initializes an image placement.
- ImagePlacement(Twips, Twips, Twips, Twips, string?, bool, Func<Stream>?, int, int, int, int)
Initializes an image placement with a lazy data stream opener and source-crop metadata.
- ImagePlacement(Twips, Twips, Twips, Twips, string?, bool, Func<Stream>?, int, int, int, int, long)
Initializes an image placement with a lazy data stream opener, source-crop metadata and the node key of the picture it draws.
- ImagePlacement(Twips, Twips, Twips, Twips, string?, bool, Func<Stream>?, int, int, int, int, long, int, bool, bool)
Initializes an image placement that is turned about the centre of its rectangle.
Fields
Properties
- BehindText
Gets whether the image is behind text.
- ContentType
Gets the image content type, or null.
- CropBottom
Gets the bottom source crop in thousandth-percent units (0..100000).
- CropLeft
Gets the left source crop in thousandth-percent units (0..100000).
- CropRight
Gets the right source crop in thousandth-percent units (0..100000).
- CropTop
Gets the top source crop in thousandth-percent units (0..100000).
- FlipHorizontal
Gets whether the picture is mirrored left to right, about its centre, before it is rotated.
- FlipVertical
Gets whether the picture is mirrored top to bottom, about its centre, before it is rotated.
- HasData
Gets whether image bytes are attached, so that OpenData() will succeed.
- Height
Gets the image height in twips.
- IsTurned
Gets whether the picture is drawn turned or mirrored, and not simply in its rectangle.
- Rotation
Gets the rotation in 60000ths of a degree, clockwise, 0 to 21599999. X, Y, Width and Height are the picture's own rectangle; a renderer draws it turned by this about the rectangle's centre, after mirroring it.
- SourceKey
Gets the node key of the document picture this placement draws (its
NodeIdvalue), so a consumer can tell which picture a point of the page shows; 0 when layout ran without source references or the placement draws no document picture (a shape's fill, a report image).
- Width
Gets the image width in twips.
- X
Gets the left coordinate in twips.
- Y
Gets the top coordinate in twips.
Methods
- OpenData()
Opens a read-only stream over the image bytes.