Method FromRegion
FromRegion(TextRegion)
Builds redaction areas from a matched text region, one area per contributing text element so the redaction hugs the matched glyphs. Falls back to the region's bounding box when the region carries no elements.
public static IReadOnlyList<PdfRedactionArea> FromRegion(TextRegion region)
Parameters
regionTextRegionThe matched region, for example a TextMatch.
Returns
- IReadOnlyList<PdfRedactionArea>
The redaction areas covering the region.
Exceptions
- ArgumentNullException
Thrown when
regionis null.- ArgumentException
Thrown when the region has no usable geometry.