@@ -52,6 +52,7 @@ namespace lsp
5252 sBreak .bind(" break.enabled" , this );
5353 sQuadPoint .bind(" point.quadratic" , this );
5454 sFill .bind(" fill" , this );
55+ sWire .bind(" wire" , this );
5556 sInvertMouseVScroll .bind(" mouse.vscroll.invert" , this );
5657 sEditable .bind(" editable" , this );
5758
@@ -136,6 +137,7 @@ namespace lsp
136137 sBreak (&sProperties ),
137138 sQuadPoint (&sProperties ),
138139 sFill (&sProperties ),
140+ sWire (&sProperties ),
139141 sInvertMouseVScroll (&sProperties ),
140142 sEditable (&sProperties ),
141143 sLineWidth (&sProperties ),
@@ -269,6 +271,7 @@ namespace lsp
269271 sBreak .bind (" break.enabled" , &sStyle );
270272 sQuadPoint .bind (" point.quadratic" , &sStyle );
271273 sFill .bind (" fill" , &sStyle );
274+ sWire .bind (" wire" , &sStyle );
272275 sInvertMouseVScroll .bind (" mouse.vscroll.invert" , &sStyle );
273276 sEditable .bind (" editable" , &sStyle );
274277
@@ -330,7 +333,7 @@ namespace lsp
330333 query_draw ();
331334 }
332335
333- if (prop->one_of (sQuadPoint , sFill , sEditable ))
336+ if (prop->one_of (sQuadPoint , sFill , sWire , sEditable ))
334337 query_draw ();
335338
336339 if (prop->one_of (sLineWidth , sLineColor , sFillColor , sPointSize , sPointColor , sPointHoverColor ,
@@ -558,19 +561,27 @@ namespace lsp
558561 // Draw curve
559562 if ((x != NULL ) && (y != NULL ) && (points > 0 ))
560563 {
561- const float l_width = lsp_max (1 .0f , sLineWidth .get () * scaling);
564+ const bool use_fill = sFill .get ();
565+ const bool use_wire = sWire .get ();
562566
563- lsp::Color fill (sFillColor );
564- lsp::Color wire (sLineColor );
565- fill.scale_lch_luminance (bright);
566- wire.scale_hsl_lightness (bright);
567-
568- dsp::mul_k2 (x, dx, points);
569- dsp::add_k2 (x, ox, points);
570- dsp::mul_k2 (y, dy, points);
571- dsp::add_k2 (y, oy, points);
572-
573- surface->draw_poly (fill, wire, l_width, x, y, points);
567+ if (use_fill || use_wire)
568+ {
569+ const float l_width = lsp_max (1 .0f , sLineWidth .get () * scaling);
570+ lsp::Color fill (sFillColor );
571+ lsp::Color wire (sLineColor );
572+ fill.scale_lch_luminance (bright);
573+ wire.scale_hsl_lightness (bright);
574+
575+ dsp::mul_k2 (x, dx, points);
576+ dsp::add_k2 (x, ox, points);
577+ dsp::mul_k2 (y, dy, points);
578+ dsp::add_k2 (y, oy, points);
579+
580+ if (use_fill)
581+ surface->draw_poly (fill, wire, (use_wire) ? l_width : 0 .0f , x, y, points);
582+ else if (use_wire)
583+ surface->wire_poly (wire, l_width, x, y, points);
584+ }
574585 }
575586
576587 // Draw points
0 commit comments