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

opacity double

From 0 (invisible) to 1 (opaque).

Returns

ContentStreamWriter

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

fill double

Fill opacity, from 0 (invisible) to 1 (opaque).

stroke double

Stroke opacity, from 0 to 1.

Returns

ContentStreamWriter

Exceptions

ArgumentOutOfRangeException

A value is outside 0–1.