gbrainy r368 - trunk/src
- From: jmas svn gnome org
- To: svn-commits-list gnome org
- Subject: gbrainy r368 - trunk/src
- Date: Tue, 3 Jun 2008 14:52:13 +0000 (UTC)
Author: jmas
Date: Tue Jun 3 14:52:12 2008
New Revision: 368
URL: http://svn.gnome.org/viewvc/gbrainy?rev=368&view=rev
Log:
2008-06-03 Jordi Mas <jmas softcatala org>
* GameManager.cs: Fixes to PDF generation
* CairoContextEx.cs: New constructor
Modified:
trunk/src/CairoContextEx.cs
trunk/src/ChangeLog
trunk/src/GameManager.cs
Modified: trunk/src/CairoContextEx.cs
==============================================================================
--- trunk/src/CairoContextEx.cs (original)
+++ trunk/src/CairoContextEx.cs Tue Jun 3 14:52:12 2008
@@ -30,6 +30,12 @@
{
}
+
+ // Used by GeneratePDF
+ public CairoContextEx (Cairo.Surface s) : base (s)
+ {
+
+ }
// No dispose of resources on this class
protected override void Dispose (bool disposing)
Modified: trunk/src/GameManager.cs
==============================================================================
--- trunk/src/GameManager.cs (original)
+++ trunk/src/GameManager.cs Tue Jun 3 14:52:12 2008
@@ -103,6 +103,7 @@
game_type = GameSession.Types.None;
difficulty = Game.Difficulty.Medium;
games = new List <Type> ();
+ //GeneratePDF ();
}
public GameSession.Types GameType {
@@ -270,10 +271,14 @@
// Generates a single PDF document with all the puzzles contained in gbrainy (4 games per page)
public void GeneratePDF ()
{
- int width = 300, height = 400, margin = 20, x, y, cnt, games_page = 4;
+ int width = 400, height = 400, margin = 20, x, y, cnt, games_page = 4;
Game puzzle;
game_type = GameSession.Types.AllGames;
- BuildGameList ();
+ Type [] allgames = CustomGames;
+
+ for (int i = 0; i < allgames.Length; i++)
+ games.Add (allgames [i]);
+
PdfSurface pdf = new PdfSurface ("games.pdf", (width + margin) * 2, (height + margin) * games_page / 2);
x = y = cnt = 0;
CairoContextEx cr = new CairoContextEx (pdf);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]