gnumeric r16773 - in trunk: . src
- From: guelzow svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r16773 - in trunk: . src
- Date: Tue, 2 Sep 2008 15:21:45 +0000 (UTC)
Author: guelzow
Date: Tue Sep 2 15:21:44 2008
New Revision: 16773
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16773&view=rev
Log:
2008-09-02 Andreas Guelzow <aguelzow pyrshep ca>
Fix of #539734 (slight adjustment to Jean's patch)
* src/print-cell.c (print_cell_gtk): anchor the lines of
rotated text correctly.
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/src/print-cell.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Tue Sep 2 15:21:44 2008
@@ -4,6 +4,9 @@
* Do not print hidden sheets. [#525368]
* Print wysiwyg. [#153578]
+Jean:
+ * Fix printing of rotated text. [#539734]
+
J.H.M. Dassen (Ray):
* Understand and ignore byte-order markers for CSV/stf probing and
importing. [#549743]
Modified: trunk/src/print-cell.c
==============================================================================
--- trunk/src/print-cell.c (original)
+++ trunk/src/print-cell.c Tue Sep 2 15:21:44 2008
@@ -115,13 +115,26 @@
UINT_RGBA_G (fore_color) / 255.,
UINT_RGBA_B (fore_color) / 255.);
- cairo_translate (context, x1, y1);
+ cairo_translate (context, x1+0.5, y1);
if (rv->rotation) {
+ GnmRenderedRotatedValue *rrv = (GnmRenderedRotatedValue *)rv;
+ struct GnmRenderedRotatedValueInfo const *li = rrv->lines;
+ GSList *lines;
+
cairo_scale (context, scale_h, scale_v);
- cairo_rotate (context, rv->rotation * (-M_PI / 180));
cairo_move_to (context, 0.,0.);
- pango_cairo_show_layout (context, rv->layout);
+ for (lines = pango_layout_get_lines (rv->layout);
+ lines;
+ lines = lines->next, li++) {
+ cairo_save (context);
+ cairo_move_to (context, PANGO_PIXELS (li->dx), PANGO_PIXELS (li->dy));
+ cairo_rotate (context, rv->rotation * (-M_PI / 180));
+ pango_cairo_show_layout_line (context, lines->data);
+ cairo_restore (context);
+ }
+
+
} else {
cairo_scale (context, scale_h, scale_v);
cairo_move_to (context, x / (double)PANGO_SCALE , - y / (double)PANGO_SCALE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]