PngImage
Defined in: components/image/png.ts:9
Implements
Constructor components/image/png.ts:20
new PngImage(
source,options?):PngImage
Parameters
| Parameter | Type |
|---|---|
source | any |
options? | ImageOptions |
Returns
PngImage
Properties
| Property | Modifier | Type |
|---|---|---|
alignpng.ts:13 | public | "left" | "center" | "right" |
height?png.ts:12 | public | number |
sourcepng.ts:10 | public | any |
width?png.ts:11 | public | number |
Methods
draw() components/image/png.ts:51
draw(
writer,x,y,width,availableHeight,_context):Component|null
Draws the component (or a part of it) on the page.
Parameters
| Parameter | Type | Description |
|---|---|---|
writer | PDFPageWriter | The page writer to issue commands to. |
x | number | The current relative X coordinate from the left margin. |
y | number | The current relative Y coordinate from the bottom margin (top boundary of the element). |
width | number | The width constraint allocated to this element. |
availableHeight | number | The height constraint representing remaining space on the current page. |
_context | LayoutContext | - |
Returns
Component | null
A new Component representing the remainder of this component if it could not finish rendering, or null if it rendered completely.
Implementation of
measure() components/image/png.ts:46
measure(
_width,_context):object
Returns the width and height required by this component when rendered within a given width constraint.
Parameters
| Parameter | Type |
|---|---|
_width | number |
_context | LayoutContext |
Returns
object