RtfPicture

class RtfPicture(val bytes: ByteArray, val format: RtfPictureFormat, val widthPx: Int, val heightPx: Int, val goalWidthTwips: Int? = null, val goalHeightTwips: Int? = null, val style: RtfParagraphStyle = RtfParagraphStyle.Default) : RtfBlock(source)

A picture on a line of its own: an RtfInlinePicture alone in a paragraph laid out with style.

Parameters

bytes

the encoded image file, in format.

format

the image encoding of bytes.

widthPx

the image's width in pixels (\picwN).

heightPx

the image's height in pixels (\pichN).

goalWidthTwips

the rendered width in twips (\picwgoalN). When only one goal is given the other follows from the pixel aspect ratio; when neither is, both come from the pixel size at 96 dpi (15 twips per pixel), which exceeds a 6.5 inch text width for images wider than 624 px, so pass a goal for large images.

goalHeightTwips

the rendered height in twips (\pichgoalN).

style

the layout of the paragraph holding the picture, such as its alignment and spacing.

Throws

if bytes is empty, a size is not positive, or a size or derived goal does not fit in an Int number of twips.

Constructors

Link copied to clipboard
constructor(bytes: ByteArray, format: RtfPictureFormat, widthPx: Int, heightPx: Int, goalWidthTwips: Int? = null, goalHeightTwips: Int? = null, style: RtfParagraphStyle = RtfParagraphStyle.Default)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String