1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
mod brush; mod context; pub mod d2d; pub mod d3d11; pub mod d3d12; mod image; mod path; mod shape; mod stroke_style; mod text; mod utility; use mltg_bindings as bindings; use bindings::Windows::Win32::Graphics::Direct2D::*; pub use brush::*; pub use context::*; pub use d2d::Direct2D; pub use d3d11::Direct3D11; pub use d3d12::Direct3D12; pub use gecl; pub use gecl::{circle, point, rect, rgba, size, vector}; pub use image::*; pub use path::*; pub use shape::*; pub use stroke_style::*; pub use text::*; pub use utility::*; pub trait Target { fn bitmap(&self) -> &ID2D1Bitmap1; fn size(&self) -> Size; fn physical_size(&self) -> gecl::Size<u32>; } pub trait Fill { fn fill(&self, dc: &ID2D1DeviceContext, brush: &ID2D1Brush); } pub trait Stroke { fn stroke( &self, dc: &ID2D1DeviceContext, brush: &ID2D1Brush, width: f32, style: Option<ID2D1StrokeStyle>, ); }