carbide_core 0.70.1

An easy-to-use, 100% Rust, extensible 2D GUI library.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::Rect;
use crate::render::primitive::Primitive;
use crate::render::primitive_kind::PrimitiveKind;

/// Simplify the constructor for a `Primitive`.
pub fn new_primitive(kind: PrimitiveKind, rect: Rect) -> Primitive {
    Primitive {
        kind,
        rect,
    }
}