diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-01-16 00:52:43 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-01-16 01:11:31 +0800 |
commit | d1b440a268b6f43f86114df12b543f7e7c6d6588 (patch) | |
tree | 8717cb7ffa86737f3344917062bacdc746e570bd /widgets/text | |
parent | a4d8c30310cfcd95a54153930336ff8196adde76 (diff) | |
download | gsoc2013-evolution-d1b440a268b6f43f86114df12b543f7e7c6d6588.tar gsoc2013-evolution-d1b440a268b6f43f86114df12b543f7e7c6d6588.tar.gz gsoc2013-evolution-d1b440a268b6f43f86114df12b543f7e7c6d6588.tar.bz2 gsoc2013-evolution-d1b440a268b6f43f86114df12b543f7e7c6d6588.tar.lz gsoc2013-evolution-d1b440a268b6f43f86114df12b543f7e7c6d6588.tar.xz gsoc2013-evolution-d1b440a268b6f43f86114df12b543f7e7c6d6588.tar.zst gsoc2013-evolution-d1b440a268b6f43f86114df12b543f7e7c6d6588.zip |
Remove some unused gnome-canvas options.
Simplifies the drawing code a bit.
Public API removed:
GnomeCanvas.center_scroll_region (is always TRUE)
GnomeCanvas.pixels_per_unit (is always 1.0)
gnome_canvas_set_center_scroll_region()
gnome_canvas_get_center_scroll_region()
gnome_canvas_set_pixels_per_unit()
Diffstat (limited to 'widgets/text')
-rw-r--r-- | widgets/text/e-text.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c index fc0c5ee922..c6d3d81502 100644 --- a/widgets/text/e-text.c +++ b/widgets/text/e-text.c @@ -539,8 +539,8 @@ get_bounds (EText *text, gdouble *px1, gdouble *py1, gdouble *px2, gdouble *py2) clip_height = text->clip_height; /* Get canvas pixel coordinates for clip rectangle position */ - text->clip_cwidth = clip_width * item->canvas->pixels_per_unit; - text->clip_cheight = clip_height * item->canvas->pixels_per_unit; + text->clip_cwidth = clip_width; + text->clip_cheight = clip_height; text->text_cx = text->cx; text->text_cy = text->cy; @@ -1006,11 +1006,11 @@ e_text_get_property (GObject *object, break; case PROP_TEXT_WIDTH: - g_value_set_double (value, text->width / text->item.canvas->pixels_per_unit); + g_value_set_double (value, text->width); break; case PROP_TEXT_HEIGHT: - g_value_set_double (value, text->height / text->item.canvas->pixels_per_unit); + g_value_set_double (value, text->height); break; case PROP_EDITABLE: @@ -1045,8 +1045,7 @@ e_text_get_property (GObject *object, g_value_set_double ( value, text->clip && text->clip_height != -1 ? - text->clip_height : text->height / - text->item.canvas->pixels_per_unit); + text->clip_height : text->height); break; case PROP_DRAW_BORDERS: @@ -1557,10 +1556,6 @@ e_text_point (GnomeCanvasItem *item, gdouble x, gdouble y, else clip_height = text->clip_height; - /* Get canvas pixel coordinates for clip rectangle position */ - clip_width = clip_width * item->canvas->pixels_per_unit; - clip_height = clip_height * item->canvas->pixels_per_unit; - if (cx < text->clip_cx || cx > text->clip_cx + clip_width || cy < text->clip_cy || @@ -1604,9 +1599,6 @@ e_text_bounds (GnomeCanvasItem *item, height = text->clip_height; } - width = width / item->canvas->pixels_per_unit; - height = height / item->canvas->pixels_per_unit; - *x2 = *x1 + width; *y2 = *y1 + height; } |