HitTestShape Struct

Definition

The area an image or a path paints, as a HitTestIndex holds it, in page space.

public readonly record struct HitTestShape(Quad Quad, PdfRectangle Bounds) : IEquatable<HitTestShape>

Remarks

ISO 32000-2 §8.9.4 (an image fills the unit square of user space), §8.5.3 (path painting) and §8.5.4 (clipping), in default user space (§8.3.2.3). Quad is the shape's box mapped by its transform: the unit square for an image or stencil mask, the bounding box of the path's points for a path, widened on every side for a stroke by half the line width (by the miter limit times half the width for mitered joins, and by √2 times it otherwise, which holds square caps). Bounds is the upright rectangle around it, cut to the bounds of the clip in force; a shape the clip removes entirely is not in the index.

A point hits the shape when it is inside both. Both are conservative: a curve's control points and a clip's corners can reach beyond what is painted. Shading paints with sh fill the clip and are not in the index.

Tip: use kind:method, kind:property, kind:ctor. Press Esc to clear.

Constructors (1)

Properties (2)