Method SetOpacity
- Namespace
- SoftZenPdf
- Assembly
- SoftZenPdf.dll
SetOpacity(double)
Sets the same opacity for filling and stroking. See SetOpacity(double, double).
public ContentStreamWriter SetOpacity(double opacity)
Parameters
opacitydoubleFrom 0 (invisible) to 1 (opaque).
Returns
Exceptions
- ArgumentOutOfRangeException
The value is outside 0–1.
SetOpacity(double, double)
Sets the opacity of later fills and strokes through an ExtGState resource (operator gs). Wrap it in
SaveState()/RestoreState() to limit its effect.
public ContentStreamWriter SetOpacity(double fill, double stroke)
Parameters
filldoubleFill opacity, from 0 (invisible) to 1 (opaque).
strokedoubleStroke opacity, from 0 to 1.
Returns
Exceptions
- ArgumentOutOfRangeException
A value is outside 0–1.