pub struct GeneralState {Show 14 fields
pub fill_alpha: f32,
pub stroke_alpha: f32,
pub blend: BlendMode,
pub soft_mask: Option<Arc<SoftMask>>,
pub transfer: Option<Arc<TransferFunc>>,
pub render_intent: RenderIntent,
pub stroke_overprint: bool,
pub fill_overprint: bool,
pub overprint_mode: i64,
pub flatness: f32,
pub smoothness: f32,
pub stroke_adjust: bool,
pub alpha_is_shape: bool,
pub text_knockout: bool,
}Expand description
The /ExtGState parameters that reach compositing, plus the ones that do
not.
The several booleans are not a state machine to be folded into an enum:
each is an independent /ExtGState key that a file sets on its own, and
five of them are inert flags kept only so a dump can report them.
Fields§
§fill_alpha: f32/ca, clamped to 0..=1.
stroke_alpha: f32/CA, clamped to 0..=1.
blend: BlendMode/BM.
soft_mask: Option<Arc<SoftMask>>/SMask, shared because a state stack clones cheaply.
transfer: Option<Arc<TransferFunc>>The transfer function /TR or /TR2 names, sampled to three
256-entry tables.
render_intent: RenderIntent/RI.
stroke_overprint: bool/OP, the stroking overprint flag.
fill_overprint: bool/op, the non-stroking one.
overprint_mode: i64/OPM.
flatness: f32/FL, also settable by the i operator.
smoothness: f32/SM.
stroke_adjust: bool/SA.
alpha_is_shape: bool/AIS.
text_knockout: bool/TK.
Implementations§
Source§impl GeneralState
impl GeneralState
Sourcepub fn enter_transparency_group(&mut self)
pub fn enter_transparency_group(&mut self)
Reset the four parameters entering a transparency group clears.
This is the group-isolation rule: a group starts compositing from a clean slate, so its contents cannot see the enclosing blend mode, alphas or soft mask (ISO 32000-1 §11.6.6).
Trait Implementations§
Source§impl Clone for GeneralState
impl Clone for GeneralState
Source§fn clone(&self) -> GeneralState
fn clone(&self) -> GeneralState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more