pub struct GraphicsState {Show 50 fields
pub ctm: Matrix,
pub color: DeviceColor,
pub color_space: ColorSpace,
pub path: PsPath,
pub current_point: Option<(f64, f64)>,
pub clip_path: Option<PsPath>,
pub clip_path_version: u32,
pub line_width: f64,
pub line_cap: LineCap,
pub line_join: LineJoin,
pub miter_limit: f64,
pub dash_pattern: DashPattern,
pub flatness: f64,
pub stroke_adjust: bool,
pub overprint: bool,
pub smoothness: f64,
pub default_ctm: Matrix,
pub clip_stack: Vec<Option<PsPath>>,
pub current_font: Option<PsObject>,
pub root_font: Option<PsObject>,
pub page_device: Option<EntityId>,
pub screen_freq: f64,
pub screen_angle: f64,
pub screen_proc: Option<PsObject>,
pub color_screen: Option<[(f64, f64, PsObject); 4]>,
pub halftone: Option<PsObject>,
pub transfer_function: Option<PsObject>,
pub color_transfer: Option<[PsObject; 4]>,
pub sampled_transfer: Option<Arc<Vec<f64>>>,
pub sampled_color_transfer: Option<[Option<Arc<Vec<f64>>>; 4]>,
pub precomputed_halftone: Option<Arc<HalftoneScreen>>,
pub precomputed_color_halftone: Option<[Option<Arc<HalftoneScreen>>; 4]>,
pub black_generation: Option<PsObject>,
pub undercolor_removal: Option<PsObject>,
pub sampled_black_generation: Option<Arc<Vec<f64>>>,
pub sampled_ucr: Option<Arc<Vec<f64>>>,
pub color_rendering: Option<PsObject>,
pub rendering_intent: u8,
pub current_pattern: Option<u32>,
pub pattern_underlying_color: Option<DeviceColor>,
pub current_pattern_dict: Option<EntityId>,
pub pattern_components: Vec<f64>,
pub bbox: Option<[f64; 4]>,
pub tint_values: Option<Vec<f64>>,
pub cached_tint_table: Option<Arc<TintLookupTable>>,
pub fill_opacity: f64,
pub stroke_opacity: f64,
pub blend_mode: u8,
pub alpha_is_shape: bool,
pub text_knockout: bool,
}Expand description
Complete graphics state (cloned for gsave/grestore).
Fields§
§ctm: Matrix§color: DeviceColor§color_space: ColorSpace§path: PsPath§current_point: Option<(f64, f64)>§clip_path: Option<PsPath>§clip_path_version: u32§line_width: f64§line_cap: LineCap§line_join: LineJoin§miter_limit: f64§dash_pattern: DashPattern§flatness: f64§stroke_adjust: bool§overprint: bool§smoothness: f64§default_ctm: Matrix§clip_stack: Vec<Option<PsPath>>§current_font: Option<PsObject>§root_font: Option<PsObject>§page_device: Option<EntityId>§screen_freq: f64§screen_angle: f64§screen_proc: Option<PsObject>§color_screen: Option<[(f64, f64, PsObject); 4]>Per-component color screen: [red, green, blue, gray] × (freq, angle, proc)
halftone: Option<PsObject>Halftone dictionary (set by sethalftone)
transfer_function: Option<PsObject>§color_transfer: Option<[PsObject; 4]>Per-component transfer: [red, green, blue, gray]
sampled_transfer: Option<Arc<Vec<f64>>>Pre-sampled transfer function (256 entries). None = identity.
sampled_color_transfer: Option<[Option<Arc<Vec<f64>>>; 4]>Pre-sampled per-component transfer [R, G, B, Gray].
precomputed_halftone: Option<Arc<HalftoneScreen>>Pre-computed halftone screen for PDF output. None = default (suppressed).
precomputed_color_halftone: Option<[Option<Arc<HalftoneScreen>>; 4]>Pre-computed per-component halftone [R, G, B, Gray] (from setcolorscreen).
black_generation: Option<PsObject>§undercolor_removal: Option<PsObject>§sampled_black_generation: Option<Arc<Vec<f64>>>Pre-sampled black generation function (256 entries, domain [0,1] → range [0,1]).
sampled_ucr: Option<Arc<Vec<f64>>>Pre-sampled undercolor removal function (256 entries, domain [0,1] → range [-1,1]).
color_rendering: Option<PsObject>§rendering_intent: u8Rendering intent: 0=RelativeColorimetric, 1=AbsoluteColorimetric, 2=Perceptual, 3=Saturation. Default is RelativeColorimetric.
current_pattern: Option<u32>Index into Context.pattern_store for the active tiling pattern.
pattern_underlying_color: Option<DeviceColor>Underlying color for uncolored (PaintType 2) patterns.
current_pattern_dict: Option<EntityId>The pattern dictionary installed by setpattern (or by setcolor in a
Pattern color space). PLRM 4.9.6 makes the pattern part of the current
color, so currentcolor has to hand the same object back.
pattern_components: Vec<f64>Components of the underlying color for an uncolored (PaintType 2)
pattern, in the Pattern space’s base color space. Empty for colored
patterns; currentcolor pushes these ahead of the pattern dictionary.
bbox: Option<[f64; 4]>§tint_values: Option<Vec<f64>>Tint values from the most recent setcolor (for Separation/DeviceN). 1 value for Separation, N values for DeviceN. None for device color spaces.
cached_tint_table: Option<Arc<TintLookupTable>>Cached pre-sampled tint lookup table for the current Separation/DeviceN color space. Set when setcolorspace installs a Separation/DeviceN space.
fill_opacity: f64Constant fill opacity (PDF ca). Range [0,1]. Default 1.0.
stroke_opacity: f64Constant stroke opacity (PDF CA). Range [0,1]. Default 1.0.
blend_mode: u8Blend mode index. 0=Normal, 1=Multiply, …, 15=Luminosity. Default 0.
alpha_is_shape: boolAlpha-is-shape flag (PDF AIS). Default false.
text_knockout: boolText knockout flag (PDF TK). Default true.
Implementations§
Source§impl GraphicsState
impl GraphicsState
Trait Implementations§
Source§impl Clone for GraphicsState
impl Clone for GraphicsState
Source§fn clone(&self) -> GraphicsState
fn clone(&self) -> GraphicsState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more