Crate renderling_ui
source ·Expand description
renderling-ui
is a “GPU driven” 2d renderer with a focus on simplicity and
ease of use.
This library is meant to be used with its parent renderling
.
§Getting Started
First we create a context, then we create a Ui
, which we can use to
“stage” our paths, text, etc:
use renderling::{math::Vec2, Context};
use renderling_ui::Ui;
let ctx = Context::headless(100, 100);
let mut ui = Ui::new(&ctx);
let _path = ui
.new_path()
.with_stroke_color([1.0, 1.0, 0.0, 1.0])
.with_rectangle(Vec2::splat(10.0), Vec2::splat(60.0))
.stroke();
let frame = ctx.get_next_frame().unwrap();
ui.render(&frame.view());
frame.present();
Happy hacking!
Structs§
- A text cache maintained mostly by ab_glyph.
Font
implementor that wraps another concreteFont + 'static
type storing in anArc
.- Id for a font.
- A cache of glyphs.
- An image identifier.
- An object that contains all the info to render a varied section of text. That is one including many parts with differing fonts/scales/colors bowing to a single layout.
SectionText
+ extra.- A 2d user interface renderer.
- A two dimensional transformation.
Enums§
- Line cap as defined by the SVG specification.
- Line join as defined by the SVG specification.