Skip to main content

Crate dioxuscut_rasterizer

Crate dioxuscut_rasterizer 

Source
Expand description

Dioxuscut Rasterizer — Native browser-free frame rendering.

Replaces Headless Chrome with a pure-Rust rasterizer pipeline.

§Backends

  • TinySkiaBackend: CPU rasterizer using tiny-skia. Works everywhere — no GPU or browser required.

§Example

use dioxuscut_rasterizer::{TinySkiaBackend, Scene, SceneNode, Color};
use dioxuscut_rasterizer::backend::{FrameConfig, RasterizerBackend};

let backend = TinySkiaBackend::new();
let mut scene = Scene::new();
scene.push(SceneNode::Rect {
    x: 0.0, y: 0.0, w: 1920.0, h: 1080.0,
    fill: Color::rgb(15, 23, 42),
    stroke: None, stroke_width: 0.0, corner_radius: 0.0,
});

let config = FrameConfig::new(1920, 1080, 0, 30.0);
let img = backend.render_frame(&scene, &config).unwrap();
img.save("frame_000001.png").unwrap();

Re-exports§

pub use backend::FrameConfig;
pub use backend::RasterError;
pub use backend::RasterizerBackend;
pub use font::FontCache;
pub use font::layout_text_box;
pub use font::measure_text_width;
pub use font::PositionedTextLine;
pub use font::TextBox;
pub use font::TextBoxLayout;
pub use font::TextHorizontalAlign;
pub use font::TextOverflow;
pub use font::TextVerticalAlign;
pub use render::build_pipe_ffmpeg_args;
pub use render::render_all_frames;
pub use render::render_frame_timed;
pub use render::render_parallel;
pub use render::render_still_fallible;
pub use render::render_to_ffmpeg_pipe;
pub use render::render_to_ffmpeg_pipe_fallible;
pub use render::save_frame;
pub use render::NativeRenderConfig;
pub use render::PipeConfig;
pub use render::RenderCancellationToken;
pub use render::RenderControl;
pub use render::RenderProgress;
pub use render::StillImageFormat;
pub use render::VideoCodec;
pub use scene::AudioTrack;
pub use scene::BlendMode;
pub use scene::ClipRegion;
pub use scene::Color;
pub use scene::GradientStop;
pub use scene::ImageFit;
pub use scene::MaskMode;
pub use scene::Scene;
pub use scene::SceneFilter;
pub use scene::SceneNode;
pub use scene::SceneShadow;
pub use scene::Transform2D;
pub use tiny_skia_backend::TinySkiaBackend;

Modules§

backend
Rasterizer backend trait and frame configuration.
font
Font loading and text rasterization via ab_glyph.
render
Frame rendering coordinator — sequential, parallel, and streaming pipeline modes.
scene
Scene graph intermediate representation for native rendering.
tiny_skia_backend
CPU rasterizer backend using tiny-skia.

Structs§

VideoMetadata
Video stream information reported by FFprobe.

Functions§

probe_video_metadata
Probe a local video with FFprobe.