class

Hpdf::ExtGState

Inherits Hpdf::Helper / Reference / Object

An extended graphics state object controls transparency and blend modes for page content. Create one with Doc#create_ext_g_state, configure it, then apply it to a page with Page#ext_g_state=.

gs = doc.create_ext_g_state
gs.alpha_fill = 0.5
gs.blend_mode = Hpdf::BlendMode::Multiply
page.ext_g_state = gs

Constructors

new(ext_g_state : LibHaru::ExtGState, doc : Doc)
Source

Instance methods

alpha_fill=(value : Number)

sets the fill alpha (opacity) of the graphics state. value must be between 0.0 (fully transparent) and 1.0 (fully opaque).

Source
alpha_stroke=(value : Number)

sets the stroke alpha (opacity) of the graphics state. value must be between 0.0 (fully transparent) and 1.0 (fully opaque).

Source
blend_mode=(mode : BlendMode)

sets the blend mode of the graphics state. The blend mode controls how painted content is composited with the existing page content. See BlendMode for available modes.

Source
to_unsafe
Source