Skip to content

modern-pdf-lib


modern-pdf-lib / DrawRectangleOptions

Interface: DrawRectangleOptions

Defined in: src/core/pdfPage.ts:253

Options for PdfPage.drawRectangle.

Properties

blendMode?

optional blendMode: BlendMode

Defined in: src/core/pdfPage.ts:273

Blend mode for compositing.


borderColor?

optional borderColor: Color

Defined in: src/core/pdfPage.ts:265

Border (stroke) colour. Set to undefined for no stroke.


borderDashArray?

optional borderDashArray: number[]

Defined in: src/core/pdfPage.ts:279

Dash pattern for border [dashLen, gapLen, ...].


borderDashPhase?

optional borderDashPhase: number

Defined in: src/core/pdfPage.ts:281

Dash phase offset for border.


borderLineCap?

optional borderLineCap: 0 | 1 | 2

Defined in: src/core/pdfPage.ts:283

Line cap style for border (0 = butt, 1 = round, 2 = projecting square).


borderOpacity?

optional borderOpacity: number

Defined in: src/core/pdfPage.ts:285

Border stroke opacity [0, 1], separate from fill opacity.


borderWidth?

optional borderWidth: number

Defined in: src/core/pdfPage.ts:267

Border width in points.


color?

optional color: Color

Defined in: src/core/pdfPage.ts:263

Fill colour. Set to undefined for no fill.


height?

optional height: number

Defined in: src/core/pdfPage.ts:261

Rectangle height.


opacity?

optional opacity: number

Defined in: src/core/pdfPage.ts:271

Opacity [0, 1].


rotate?

optional rotate: Angle

Defined in: src/core/pdfPage.ts:269

Rotation angle.


width?

optional width: number

Defined in: src/core/pdfPage.ts:259

Rectangle width.


x?

optional x: number

Defined in: src/core/pdfPage.ts:255

X coordinate.


xSkew?

optional xSkew: Angle

Defined in: src/core/pdfPage.ts:275

Horizontal skew angle.


y?

optional y: number

Defined in: src/core/pdfPage.ts:257

Y coordinate.


ySkew?

optional ySkew: Angle

Defined in: src/core/pdfPage.ts:277

Vertical skew angle.

Released under the MIT License.