PdfNetStack.Drawing namespace
Package: PdfNetStack
Classes
Section titled “Classes”How shapes are filled: a solid color or a gradient.
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.
Base of linear and radial gradients.
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.
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.
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.
A gradient along a line between two points, in canvas coordinates.
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.
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.
How lines and outlines are stroked. Immutable; use with to derive variants.
A gradient between two circles, in canvas coordinates. With the same center and a start radius of 0 it is the usual circular gradient.
Fills with one color.
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.
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.
One line of a PdfTextLayout. Distances are points from the layout’s top left corner.
How a span of text looks: font, size, paint and decorations.
Structs
Section titled “Structs”A device color with an opacity. Components are 0 to 1. Opacity below 1 is written as a constant alpha graphics state.
Corner radii of a rounded rectangle, each with a horizontal and a vertical radius.
One color stop of a gradient.
A saved graphics state; disposing it restores the state, along with any saved after it.
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.
A point in canvas coordinates.
How drawing combines with what is under it (ISO 32000-1, 11.3.5; the CSS mix-blend-mode values).
Color model of a PdfColor, written as the matching PDF device color space.
Which regions of a self-intersecting or nested path count as inside.
Where new drawing goes relative to a page’s existing content.
Where an image sits in its box when it does not fill it exactly.
How an image fills a box of another shape (the CSS object-fit values).
The file format an image came from.
Shape at the open ends of stroked lines.
Shape where two stroked segments meet.
Horizontal alignment of the lines of a paragraph.
Base direction of a paragraph.