Skip to content

PdfNetStack.Drawing namespace

View as Markdown

Package: PdfNetStack

PdfBrush

How shapes are filled: a solid color or a gradient.

PdfForm

A reusable drawing (a form XObject, ISO 32000-1, 8.10): drawn once, placed any number of times with DrawForm. Use it for stamps, letterheads and repeated logos, or with FromPage to place a page of any document, scaled and positioned, on another page.

PdfGradientBrush

Base of linear and radial gradients.

PdfGraphics

A drawing surface on a page. Coordinates are in points with the origin at the top left corner of the media box and y pointing down. Dispose it, or save the document, to write the drawing into the page. Not thread safe.

PdfHyphenator

Finds where words may break with a hyphen, by Liang’s pattern algorithm as TeX defines it (Liang 1983, and The TeXbook, appendix H). Give one to Hyphenator to hyphenate a paragraph, or use InsertSoftHyphens on text of your own. The core library has the algorithm and no patterns: the PdfNetStack.Hyphenation package has them for many languages, and Create takes any others.

PdfImage

A JPEG, PNG, GIF, BMP, TIFF or WebP image to draw with DrawImage. The image is written once per document however often it is drawn, and can be shared between documents and threads.

PdfLinearGradientBrush

A gradient along a line between two points, in canvas coordinates.

PdfParagraph

Rich text to lay out: spans of text, each with its own style, and how lines are arranged. Line feeds (\n, \r\n) and U+2029 start a new line; tabs advance four spaces; soft hyphens (U+00AD) mark where a word may break, showing a hyphen when it does.

PdfPath

A shape made of straight and curved segments, in canvas coordinates (origin top left, y down). Build it, then draw, fill or clip with it through PdfGraphics.

PdfPen

How lines and outlines are stroked. Immutable; use with to derive variants.

PdfRadialGradientBrush

A gradient between two circles, in canvas coordinates. With the same center and a start radius of 0 it is the usual circular gradient.

PdfSolidBrush

Fills with one color.

PdfSvg

An SVG drawing, placed as vector graphics: it stays sharp at any zoom and its text stays text. Each drawing is written once per document and reused wherever it is placed. Supported: shapes, paths, groups, use and symbol, nested viewports, solid colors and linear and radial gradients, clip paths, opacity, text in the standard fonts, embedded JPEG and PNG images, and style sheets with type, class and id selectors. Not supported: filters, masks, patterns, external references and animation.

PdfTextLayout

A paragraph broken into lines for a given width: the Unicode line breaking algorithm finds break opportunities, the bidirectional algorithm orders each line, and an OpenType shaper forms the glyphs. Measure with it, then draw it with DrawText.

PdfTextLine

One line of a PdfTextLayout. Distances are points from the layout’s top left corner.

PdfTextStyle

How a span of text looks: font, size, paint and decorations.

PdfColor

A device color with an opacity. Components are 0 to 1. Opacity below 1 is written as a constant alpha graphics state.

PdfCornerRadii

Corner radii of a rounded rectangle, each with a horizontal and a vertical radius.

PdfGradientStop

One color stop of a gradient.

PdfGraphicsState

A saved graphics state; disposing it restores the state, along with any saved after it.

PdfMatrix

A 2D affine transform in PDF order [a b c d e f]: x’ = a x + c y + e, y’ = b x + d y + f.

PdfPoint

A point in canvas coordinates.

PdfBlendMode

How drawing combines with what is under it (ISO 32000-1, 11.3.5; the CSS mix-blend-mode values).

PdfColorSpace

Color model of a PdfColor, written as the matching PDF device color space.

PdfFillRule

Which regions of a self-intersecting or nested path count as inside.

PdfGraphicsLayer

Where new drawing goes relative to a page’s existing content.

PdfImageAlignment

Where an image sits in its box when it does not fill it exactly.

PdfImageFit

How an image fills a box of another shape (the CSS object-fit values).

PdfImageFormat

The file format an image came from.

PdfLineCap

Shape at the open ends of stroked lines.

PdfLineJoin

Shape where two stroked segments meet.

PdfTextAlignment

Horizontal alignment of the lines of a paragraph.

PdfTextDirection

Base direction of a paragraph.