pub struct PsRenderBackend { /* private fields */ }Expand description
PostScript Level 2/3 rendering backend.
Emits PS operators instead of pixels. Transparency (opacity, blend modes)
is not supported — this matches upstream cfx_psrenderer behavior for PS
Level 2, which has no native transparency model.
Implementations§
Trait Implementations§
Source§impl Default for PsRenderBackend
impl Default for PsRenderBackend
Source§impl RenderBackend for PsRenderBackend
impl RenderBackend for PsRenderBackend
Source§fn create_surface(&self, width: u32, height: u32, _bg: &RgbaColor) -> PsSurface
fn create_surface(&self, width: u32, height: u32, _bg: &RgbaColor) -> PsSurface
Create a new rendering surface with the given dimensions and background.
Source§fn fill_path(
&mut self,
surface: &mut PsSurface,
ops: &[PathOp],
fill_rule: FillRule,
color: &RgbaColor,
transform: &Matrix,
)
fn fill_path( &mut self, surface: &mut PsSurface, ops: &[PathOp], fill_rule: FillRule, color: &RgbaColor, transform: &Matrix, )
Fill a path with the given color and transform.
Source§fn stroke_path(
&mut self,
surface: &mut PsSurface,
ops: &[PathOp],
style: &StrokeStyle,
color: &RgbaColor,
transform: &Matrix,
)
fn stroke_path( &mut self, surface: &mut PsSurface, ops: &[PathOp], style: &StrokeStyle, color: &RgbaColor, transform: &Matrix, )
Stroke a path with the given style, color, and transform.
Source§fn draw_image(
&mut self,
surface: &mut PsSurface,
image: &DecodedImage,
transform: &Matrix,
_interpolate: bool,
)
fn draw_image( &mut self, surface: &mut PsSurface, image: &DecodedImage, transform: &Matrix, _interpolate: bool, )
Draw a decoded image with the given transform. Read more
Source§fn push_clip(
&mut self,
surface: &mut PsSurface,
clip: &ClipPath,
transform: &Matrix,
)
fn push_clip( &mut self, surface: &mut PsSurface, clip: &ClipPath, transform: &Matrix, )
Push a clipping region onto the clip stack.
Source§fn push_group(
&mut self,
surface: &mut PsSurface,
_blend_mode: BlendMode,
_opacity: f32,
_isolated: bool,
_knockout: bool,
)
fn push_group( &mut self, surface: &mut PsSurface, _blend_mode: BlendMode, _opacity: f32, _isolated: bool, _knockout: bool, )
Begin a transparency group with the given blend mode, opacity, and
transparency group attributes.
Source§fn pop_group(&mut self, surface: &mut PsSurface)
fn pop_group(&mut self, surface: &mut PsSurface)
End the current transparency group, compositing it onto the surface below.
Source§fn surface_dimensions(&self, surface: &PsSurface) -> (u32, u32)
fn surface_dimensions(&self, surface: &PsSurface) -> (u32, u32)
Return the dimensions
(width, height) of the given surface.Source§fn composite_over(&mut self, _dst: &mut PsSurface, _src: &PsSurface)
fn composite_over(&mut self, _dst: &mut PsSurface, _src: &PsSurface)
Source§fn surface_pixels(&self, _surface: &PsSurface) -> Vec<u8> ⓘ
fn surface_pixels(&self, _surface: &PsSurface) -> Vec<u8> ⓘ
Return the raw pixel data of the surface as premultiplied RGBA bytes.
Source§fn fill_path_no_aa(
&mut self,
surface: &mut Self::Surface,
ops: &[PathOp],
fill_rule: FillRule,
color: &RgbaColor,
transform: &Matrix,
)
fn fill_path_no_aa( &mut self, surface: &mut Self::Surface, ops: &[PathOp], fill_rule: FillRule, color: &RgbaColor, transform: &Matrix, )
Fill a path with anti-aliasing forced off. Read more
Source§fn set_group_mask(&mut self, _alpha_data: Vec<u8>, _width: u32, _height: u32)
fn set_group_mask(&mut self, _alpha_data: Vec<u8>, _width: u32, _height: u32)
Set a soft mask on the topmost group entry. Read more
Source§fn draw_alpha_bitmap(
&mut self,
_surface: &mut Self::Surface,
_alpha: &[u8],
_width: u32,
_height: u32,
_bearing_x: i32,
_bearing_y: i32,
_color: &RgbaColor,
_transform: &Matrix,
)
fn draw_alpha_bitmap( &mut self, _surface: &mut Self::Surface, _alpha: &[u8], _width: u32, _height: u32, _bearing_x: i32, _bearing_y: i32, _color: &RgbaColor, _transform: &Matrix, )
Draw a pre-rasterized alpha bitmap at the given position with the given color. Read more
Source§fn set_antialiasing(&mut self, _enabled: bool)
fn set_antialiasing(&mut self, _enabled: bool)
Set whether anti-aliasing is enabled for subsequent fill/stroke operations. Read more
Auto Trait Implementations§
impl Freeze for PsRenderBackend
impl RefUnwindSafe for PsRenderBackend
impl Send for PsRenderBackend
impl Sync for PsRenderBackend
impl Unpin for PsRenderBackend
impl UnsafeUnpin for PsRenderBackend
impl UnwindSafe for PsRenderBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more