INNER CODE UNIT · C

y_scale

lxi-tools/lxi-tools · src/gtkchart.c:550

    float y_scale = (h - 2 * 0.1 * h) / self->value_max;
    cairo_set_line_width (cr, 0.2 * w);
    cairo_line_to(cr, 0, self->value * y_scale);
    cairo_stroke (cr);

    cairo_destroy (cr);
}

static void chart_draw_gauge_angular(GtkChart *self,
        GtkSnapshot *snapshot,
        float h,
        float w)
{
    GdkRGBA bg_color, white, blue, red, line, grid;
    cairo_text_extents_t extents;
    char value[20];

    gdk_rgba_parse (&bg_color, "black");

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…