class
Hpdf::ExtGState
- Hpdf::ExtGState
- Reference
- Object
Overview
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
Included Modules
Defined in:
hpdf/ext_g_state.crConstructors
Instance Method Summary
-
#alpha_fill=(value : Number)
sets the fill alpha (opacity) of the graphics state.
-
#alpha_stroke=(value : Number)
sets the stroke alpha (opacity) of the graphics state.
-
#blend_mode=(mode : BlendMode)
sets the blend mode of the graphics state.
- #to_unsafe : LibHaru::ExtGState
Instance methods inherited from module Hpdf::Helper
bool(val : Bool) : Int32
bool,
nilable_str(v : Pointer(UInt8)) : String | Nil
nilable_str,
real(val : Number) : LibHaru::Real
real,
uint(val : Number) : LibHaru::UInt
uint,
uint16(val : Number) : UInt16
uint16
Constructor Detail
Instance Method Detail
sets the fill alpha (opacity) of the graphics state.
value must be between 0.0 (fully transparent) and 1.0 (fully opaque).
sets the stroke alpha (opacity) of the graphics state.
value must be between 0.0 (fully transparent) and 1.0 (fully opaque).
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.