mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-29 13:24:48 +00:00
Prepare the path element setup in the run-time for extensibility
Make the anonymous struct for the LineTo variant in the PathElement enum as separate structure, which can be introspected using rtto::FieldInfo.
This commit is contained in:
parent
9d9779ecde
commit
1ab71b8ca3
8 changed files with 39 additions and 22 deletions
|
@ -5,8 +5,8 @@ use itertools::Itertools;
|
|||
use lyon::tessellation::geometry_builder::{BuffersBuilder, VertexBuffers};
|
||||
use lyon::tessellation::{FillAttributes, FillOptions, FillTessellator};
|
||||
use sixtyfps_corelib::abi::datastructures::{
|
||||
Color, ComponentWindow, ComponentWindowOpaque, PathElement, Point, Rect, RenderingPrimitive,
|
||||
Resource, Size,
|
||||
Color, ComponentWindow, ComponentWindowOpaque, PathElement, PathLineTo, Point, Rect,
|
||||
RenderingPrimitive, Resource, Size,
|
||||
};
|
||||
use sixtyfps_corelib::graphics::{
|
||||
FillStyle, Frame as GraphicsFrame, GraphicsBackend, GraphicsWindow, HasRenderingPrimitive,
|
||||
|
@ -342,7 +342,7 @@ impl RenderingPrimitivesBuilder for GLRenderingPrimitivesBuilder {
|
|||
let mut path_builder = lyon::path::Path::builder().with_svg();
|
||||
for element in elements.iter() {
|
||||
match element {
|
||||
PathElement::LineTo { x, y } => {
|
||||
PathElement::LineTo(PathLineTo { x, y }) => {
|
||||
path_builder.line_to(Point::new(*x, *y))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue