vlang / ui

A cross-platform UI library written in V
MIT License
2.32k stars 154 forks source link

Add a new function `draw_device_line_with_config` #506

Open impopular-guy opened 1 year ago

impopular-guy commented 1 year ago

The function fn (ctx &Context) draw_line_with_config(x f32, y f32, x2 f32, y2 f32, config PenConfig) in module gg is very useful for drawing custom lines.

Currently, there exists only fn (c &CanvasLayout) draw_device_line(d DrawDevice, ..., color gx.Color) which accepts only color as a config param.

A new function fn (c &CanvasLayout) draw_device_line_with_config(d DrawDevice, ..., config LineConfig) that accepts a similar PenConfig struct as an argument would be very helpful.