-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
The library understands separate styles for the top, right, bottom and left lines of the border, different types of fill (groove, ridge, etc.), but the drawing is implemented primitively - the same as top border and only solid.
The existing code of Sources\UI\Style\style_background_renderer.cpp:
void StyleBackgroundRenderer::render_border()
{
int num_layers = style.array_size("background-image");
if (!get_layer_clip(num_layers - 1).is_keyword("border-box"))
return;
StyleGetValue style_top = style.computed_value("border-top-style");
if (style_top.is_keyword("solid"))
{
Colorf color = style.computed_value("border-top-color").color();
if (color.a > 0.0f)
{
auto border_points = get_border_points();
auto padding_points = get_padding_points(border_points);
Path border_path = get_border_stroke_path(border_points, padding_points);
border_path.fill(canvas, Brush(color));
}
}
}
It is necessary to implement:
- separate border drawing (top, left, right, bottom);
- support for all styles (
thin
,medium
,thick
,dotted
,dashed
,double
,groove
,ridge
,inset
,outset
).
Maybe someone has already done this in his code and just need to copy-paste?
Metadata
Metadata
Assignees
Labels
No labels