You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: detect transparency-bearing ExtGStates; fix gradient and arc output
Add getTransparencyExtGStateNames() to report the resource names of the
ExtGStates that carry actual transparency — a constant alpha below 1, a
non-Normal blend mode, or a soft mask — so callers can tell whether a content
stream really triggers transparency rather than merely resetting it.
Correctness fixes found while reviewing the gradient and drawing code:
- Base: axial (type 2) and radial (type 3) shading dictionaries emitted a
literal "\n" from a single-quoted sprintf instead of a newline before
endobj, producing malformed objects. Transparent-gradient soft-mask
ExtGStates now record their SMask so they are reported as transparent, and
the missing-pattern guard no longer leaves a partial XObject in the stream.
- Raw: getRawEllipticalArc() no longer divides by zero when the vertical
radius is 0 (now treated as a circle, per its docblock); the duplicated
arc-point/Bezier computation is extracted into a helper.
- Gradient: getAlpha() no longer emits a warning on an empty blend mode.
- Style/Draw/Transform: minor cleanups (redundant return, dead assignment,
corrected docblock).
0 commit comments