[gnome-games/sudoku-vala] sudoku: Display notes using simple text Cairo API



commit ae9b53486dd2b74a3ff7475efffcbe5223879176
Author: LubomÃr SedlÃÅ <lubomir sedlar gmail com>
Date:   Sun Jul 3 23:19:13 2011 +0200

    sudoku: Display notes using simple text Cairo API

 gnome-sudoku/src/sudoku-view.vala |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/gnome-sudoku/src/sudoku-view.vala b/gnome-sudoku/src/sudoku-view.vala
index 0e5a545..40560b4 100644
--- a/gnome-sudoku/src/sudoku-view.vala
+++ b/gnome-sudoku/src/sudoku-view.vala
@@ -192,9 +192,20 @@ private class SudokuCellView : Gtk.DrawingArea
 
         double scale = ((double) get_allocated_height () / size_ratio) / height;
         c.move_to ((get_allocated_width () - glyph_width * scale) / 2, (get_allocated_height () - glyph_height * scale) / 2);
+        c.save ();
         c.scale (scale, scale);
         Pango.cairo_update_layout (c, layout);
         Pango.cairo_show_layout (c, layout);
+        c.restore ();
+
+        double note_size = get_allocated_height () / (size_ratio * 2);
+        c.set_font_size (note_size);
+
+        c.move_to (0, note_size);
+        c.show_text ("123456789");
+
+        c.move_to (0, (get_allocated_height () - 3));
+        c.show_text ("123456789");
 
         return false;
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]