X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fcharts%2Froc-chart-cairo.c;h=910d6152f0a7f64140b67cae932aa60a9bc7a652;hb=ff79bb95e5c3de40d359a60214ece51db8561d3e;hp=2ac494e3cd16f9549be3ca49de1699002e8a8f47;hpb=0df9cdd3df66caf4353128feff3008289cda8115;p=pspp diff --git a/src/output/charts/roc-chart-cairo.c b/src/output/charts/roc-chart-cairo.c index 2ac494e3cd..910d6152f0 100644 --- a/src/output/charts/roc-chart-cairo.c +++ b/src/output/charts/roc-chart-cairo.c @@ -27,20 +27,22 @@ #define _(msgid) gettext (msgid) void -xrchart_draw_roc (const struct chart_item *chart_item, cairo_t *cr, +xrchart_draw_roc (const struct chart *chart, cairo_t *cr, struct xrchart_geometry *geom) { - const struct roc_chart *rc = to_roc_chart (chart_item); + const struct roc_chart *rc = to_roc_chart (chart); size_t i; xrchart_write_title (cr, geom, _("ROC Curve")); xrchart_write_xlabel (cr, geom, _("1 - Specificity")); xrchart_write_ylabel (cr, geom, _("Sensitivity")); - xrchart_write_xscale (cr, geom, 0, 1); - xrchart_write_yscale (cr, geom, 0, 1); + if (! xrchart_write_xscale (cr, geom, 0, 1)) + return; + if (! xrchart_write_yscale (cr, geom, 0, 1)) + return; - if ( rc->reference ) + if (rc->reference) { xrchart_line (cr, geom, 1.0, 0, 0.0, 1.0,