summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2007-12-04 22:40:59 +0100
committerGuillaume Seguin <guillaume@segu.in>2007-12-04 22:40:59 +0100
commitf6298e09bcef0de54b0f621168e1f36354ae7956 (patch)
treeadadeeb6f67023413d3ac3fc9f0ccd561cc74e98
parent701f89eef42902814f6bc4bf13b872e0af429c9d (diff)
downloadgmathlib-f6298e09bcef0de54b0f621168e1f36354ae7956.tar.gz
gmathlib-f6298e09bcef0de54b0f621168e1f36354ae7956.tar.bz2
* Improve rendering of empty symbols
-rw-r--r--cairo/gmathcairo_utils.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/cairo/gmathcairo_utils.c b/cairo/gmathcairo_utils.c
index a183ef2..d23116f 100644
--- a/cairo/gmathcairo_utils.c
+++ b/cairo/gmathcairo_utils.c
@@ -112,7 +112,7 @@ gmathcairo_render_empty (GMathCairoContext *ccontext, GMathSymbol *symbol,
PangoLayout *layout;
GMathBoxed *boxed;
- double dash[] = {1.5 * EMPTY_LINE_WIDTH};
+ double dash[] = {3 * EMPTY_LINE_WIDTH};
gmathcairo_get_layout_and_size (ccontext, " ", size,
&layout, &width, &height);
@@ -131,13 +131,12 @@ gmathcairo_render_empty (GMathCairoContext *ccontext, GMathSymbol *symbol,
cairo_set_dash (cr, dash, sizeof (dash) / sizeof (dash[0]), 0);
cairo_set_line_width (cr, EMPTY_LINE_WIDTH);
- cairo_move_to (cr, 0, 0);
- cairo_line_to (cr, width, 0);
- cairo_line_to (cr, width, height);
- cairo_line_to (cr, 0, height);
- cairo_line_to (cr, 0, 0);
-
+ cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE);
+ cairo_save (cr);
+ cairo_rectangle (cr, width / 10, height / 10,
+ 8 * width / 10, 8 * height / 10);
cairo_stroke (cr);
+ cairo_restore (cr);
cairo_destroy (cr);