pub struct TextParams {Show 22 fields
pub text: Vec<u8>,
pub start_x: f64,
pub start_y: f64,
pub font_entity: u32,
pub font_name: Vec<u8>,
pub font_type: i32,
pub font_size: f64,
pub color: DeviceColor,
pub ctm: [f64; 6],
pub font_matrix: [f64; 6],
pub paint_type: i32,
pub stroke_width: f64,
pub spot_color: Option<SpotColor>,
pub rendering_intent: u8,
pub transfer: TransferState,
pub halftone: HalftoneState,
pub bg_ucr: BgUcrState,
pub fill_opacity: f64,
pub stroke_opacity: f64,
pub blend_mode: u8,
pub alpha_is_shape: bool,
pub text_knockout: bool,
}Expand description
Parameters for a text element emitted by show operators.
The PDF device uses these for BT/ET/Tf/Tj text operators. The raster device ignores them (uses Fill elements for glyph paths).
New fields may be added without notice; pattern-matching consumers
should use .. to ignore unmatched fields.
Fields§
§text: Vec<u8>Character bytes (or 2-byte CID values for Type 0).
start_x: f64Device-space X position at start of string.
start_y: f64Device-space Y position at start of string.
font_entity: u32Font dict entity ID (raw u32 for VM independence).
font_name: Vec<u8>FontName bytes (e.g., b“Times-Roman“).
font_type: i32FontType (0, 1, 2, 3, 42).
font_size: f64Effective device-space font size.
color: DeviceColorFill color at render time.
ctm: [f64; 6]CTM at render time.
font_matrix: [f64; 6]User-space font matrix (scaled to point units).
paint_type: i32PaintType: 0 = fill (default), 2 = stroke (outlined glyphs).
stroke_width: f64Device-space stroke width for PaintType 2 fonts.
spot_color: Option<SpotColor>Separation/DeviceN color for PDF output. None for device color spaces.
rendering_intent: u8Rendering intent (0=RelativeColorimetric, 1=Absolute, 2=Perceptual, 3=Saturation).
transfer: TransferStatePre-sampled transfer function state for PDF output.
halftone: HalftoneStatePre-computed halftone screen state for PDF output.
bg_ucr: BgUcrStatePre-sampled black generation / undercolor removal for PDF output.
fill_opacity: f64Fill opacity (0.0–1.0, default 1.0). Used by PDF transparency.
stroke_opacity: f64Stroke opacity (0.0–1.0, default 1.0). Applies to PaintType-2 fonts.
blend_mode: u8Blend mode (0=Normal, 1=Multiply, …, 15=Luminosity). Default 0.
alpha_is_shape: boolAlpha-is-shape (PDF AIS). Default false.
text_knockout: boolText knockout (PDF TK). Default true.
Trait Implementations§
Source§impl Clone for TextParams
impl Clone for TextParams
Source§fn clone(&self) -> TextParams
fn clone(&self) -> TextParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more