Commit 37a34df2 authored by Claes Sjofors's avatar Claes Sjofors Committed by Claes Sjöfors

Ge BarChart, background drawing fix

parent 1167d48c
...@@ -391,7 +391,7 @@ void GrowBarChart::draw(GlowWind* w, GlowTransform* t, int highlight, int hot, ...@@ -391,7 +391,7 @@ void GrowBarChart::draw(GlowWind* w, GlowTransform* t, int highlight, int hot,
for (int i = 0; i < barsegments + 1; i++) { for (int i = 0; i < barsegments + 1; i++) {
glow_eDrawType fillcolor = glow_eDrawType_Line; glow_eDrawType fillcolor = glow_eDrawType_Line;
if ( min_value > 0 || bar_values[i][j] > 0) { if ( min_value >= 0 || bar_values[i][j] > 0) {
skip = 0; skip = 0;
bar_up_ur_y = bar_up_ll_y; bar_up_ur_y = bar_up_ll_y;
...@@ -483,8 +483,11 @@ void GrowBarChart::draw(GlowWind* w, GlowTransform* t, int highlight, int hot, ...@@ -483,8 +483,11 @@ void GrowBarChart::draw(GlowWind* w, GlowTransform* t, int highlight, int hot,
drawtype = GlowColor::shift_drawtype(fillcolor, chot, 0); drawtype = GlowColor::shift_drawtype(fillcolor, chot, 0);
else else
drawtype = fillcolor; drawtype = fillcolor;
ctx->gdraw->fill_rect(w, bar_ll_x, bar_down_ll_y, bar_ur_x - bar_ll_x, ctx->gdraw->rect(bar_ll_x, bar_down_ll_y, bar_ur_x - bar_ll_x,
bar_down_ur_y - bar_down_ll_y, drawtype); bar_down_ur_y - bar_down_ll_y, drawtype, 1, 0);
if (bar_up_ll_y > ll_y)
ctx->gdraw->rect(bar_ll_x, ll_y, bar_ur_x - bar_ll_x,
bar_up_ll_y - ll_y, drawtype, 1, 0);
} else { } else {
glow_eDrawType f1, f2; glow_eDrawType f1, f2;
if (gradient_contrast >= 0) { if (gradient_contrast >= 0) {
...@@ -516,9 +519,9 @@ void GrowBarChart::draw(GlowWind* w, GlowTransform* t, int highlight, int hot, ...@@ -516,9 +519,9 @@ void GrowBarChart::draw(GlowWind* w, GlowTransform* t, int highlight, int hot,
} }
if ( min_value >= 0) { if ( min_value >= 0) {
brect_ll_x = bar_ll_x; brect_ll_x = bar_ll_x;
brect_ll_y = bar_up_ll_y; brect_ll_y = int(f_bar_up_ll_y);
brect_width = bar_ur_x - bar_ll_x; brect_width = bar_ur_x - bar_ll_x;
brect_height = ur_y - bar_up_ll_y; brect_height = ur_y - int(f_bar_up_ll_y);
} else { } else {
brect_ll_x = bar_ll_x; brect_ll_x = bar_ll_x;
brect_ll_y = bar_up_ll_y; brect_ll_y = bar_up_ll_y;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment