gbrainy r287 - trunk/src
- From: jmas svn gnome org
- To: svn-commits-list gnome org
- Subject: gbrainy r287 - trunk/src
- Date: Fri, 4 Apr 2008 17:28:31 +0100 (BST)
Author: jmas
Date: Fri Apr 4 17:28:31 2008
New Revision: 287
URL: http://svn.gnome.org/viewvc/gbrainy?rev=287&view=rev
Log:
2008-04-04 Jordi Mas <jmas softcatala org>
* CalculationGreatestDivisor.cs: Move Font functions to GC class
* CairoContextEx.cs: Move Font functions to GC class
* PuzzleNumericSequence.cs: Move Font functions to GC class
* Game.cs: Move Font functions to GC class
* PuzzleNumericRelation.cs: Move Font functions to GC class
* CalculationOperator.cs: Move Font functions to GC class
* PuzzleOstracism.cs: Move Font functions to GC class
* CalculationTwoNumbers.cs: Move Font functions to GC class
* CalculationArithmetical.cs: Move Font functions to GC class
* CalculationWhichNumber.cs: Move Font functions to GC class
Modified:
trunk/src/CairoContextEx.cs
trunk/src/CalculationArithmetical.cs
trunk/src/CalculationGreatestDivisor.cs
trunk/src/CalculationOperator.cs
trunk/src/CalculationTwoNumbers.cs
trunk/src/CalculationWhichNumber.cs
trunk/src/ChangeLog
trunk/src/Game.cs
trunk/src/MemoryFigures.cs
trunk/src/PuzzleNumericRelation.cs
trunk/src/PuzzleNumericSequence.cs
trunk/src/PuzzleOstracism.cs
Modified: trunk/src/CairoContextEx.cs
==============================================================================
--- trunk/src/CairoContextEx.cs (original)
+++ trunk/src/CairoContextEx.cs Fri Apr 4 17:28:31 2008
@@ -108,5 +108,15 @@
LineTo (x + size / 2, y);
Stroke ();
}
+
+ public void SetLargeFont ()
+ {
+ SetFontSize (0.05);
+ }
+
+ public void SetNormalFont ()
+ {
+ SetFontSize (0.03);
+ }
}
Modified: trunk/src/CalculationArithmetical.cs
==============================================================================
--- trunk/src/CalculationArithmetical.cs (original)
+++ trunk/src/CalculationArithmetical.cs Fri Apr 4 17:28:31 2008
@@ -110,7 +110,7 @@
DrawBackground (gr);
PrepareGC (gr);
- SetLargeFont (gr);
+ gr.SetLargeFont ();
for (int i = 0; i < operands.Length - 1; i++)
{
gr.DrawTextAlignedRight (aligned_pos, operand_y, operands[i].ToString ());
Modified: trunk/src/CalculationGreatestDivisor.cs
==============================================================================
--- trunk/src/CalculationGreatestDivisor.cs (original)
+++ trunk/src/CalculationGreatestDivisor.cs Fri Apr 4 17:28:31 2008
@@ -200,7 +200,7 @@
gr.Scale (area_width, area_height);
DrawBackground (gr);
PrepareGC (gr);
- SetLargeFont (gr);
+ gr.SetLargeFont ();
gr.MoveTo (0.05, y);
gr.ShowText (Catalog.GetString ("Numbers"));
Modified: trunk/src/CalculationOperator.cs
==============================================================================
--- trunk/src/CalculationOperator.cs (original)
+++ trunk/src/CalculationOperator.cs Fri Apr 4 17:28:31 2008
@@ -88,7 +88,7 @@
gr.Scale (area_width, area_height);
DrawBackground (gr);
PrepareGC (gr);
- SetLargeFont (gr);
+ gr.SetLargeFont ();
gr.DrawTextAlignedRight (aligned_pos, DrawAreaY + 0.2, number_a.ToString ());
gr.DrawTextAlignedRight (aligned_pos, DrawAreaY + 0.3, number_b.ToString ());
Modified: trunk/src/CalculationTwoNumbers.cs
==============================================================================
--- trunk/src/CalculationTwoNumbers.cs (original)
+++ trunk/src/CalculationTwoNumbers.cs Fri Apr 4 17:28:31 2008
@@ -69,7 +69,7 @@
gr.Scale (area_width, area_height);
DrawBackground (gr);
PrepareGC (gr);
- SetLargeFont (gr);
+ gr.SetLargeFont ();
gr.MoveTo (x, DrawAreaY + 0.2);
gr.ShowText (String.Format (Catalog.GetString ("number1 + number2 = {0}"), op1));
Modified: trunk/src/CalculationWhichNumber.cs
==============================================================================
--- trunk/src/CalculationWhichNumber.cs (original)
+++ trunk/src/CalculationWhichNumber.cs Fri Apr 4 17:28:31 2008
@@ -145,7 +145,7 @@
gr.Scale (area_width, area_height);
DrawBackground (gr);
PrepareGC (gr);
- SetLargeFont (gr);
+ gr.SetLargeFont ();
for (int i = 0; i < options_cnt; i++)
{
Modified: trunk/src/Game.cs
==============================================================================
--- trunk/src/Game.cs (original)
+++ trunk/src/Game.cs Fri Apr 4 17:28:31 2008
@@ -241,22 +241,13 @@
return (String.Compare (answer, right_answer, true) == 0);
}
- public void SetLargeFont (CairoContextEx gr)
- {
- gr.SetFontSize (0.05);
- }
-
- public void SetNormalFont (CairoContextEx gr)
- {
- gr.SetFontSize (0.03);
- }
virtual public void PrepareGC (CairoContextEx gr)
{
gr.LineWidth = LineWidth;
gr.Color = DefaultDrawingColor;
gr.SelectFontFace ("Sans", FontSlant.Normal, FontWeight.Bold);
- SetNormalFont (gr);
+ gr.SetNormalFont ();
}
protected void DrawBackground (CairoContextEx gr)
Modified: trunk/src/MemoryFigures.cs
==============================================================================
--- trunk/src/MemoryFigures.cs (original)
+++ trunk/src/MemoryFigures.cs Fri Apr 4 17:28:31 2008
@@ -115,7 +115,7 @@
return;
}
- SetLargeFont (gr);
+ gr.SetLargeFont ();
for (int figure = 0; figure < figures.Count; figure++, col++)
{
fig = (int)figures[figure];
Modified: trunk/src/PuzzleNumericRelation.cs
==============================================================================
--- trunk/src/PuzzleNumericRelation.cs (original)
+++ trunk/src/PuzzleNumericRelation.cs Fri Apr 4 17:28:31 2008
@@ -111,7 +111,7 @@
gr.Scale (area_width, area_height);
DrawBackground (gr);
PrepareGC (gr);
- SetLargeFont (gr);
+ gr.SetLargeFont ();
for (int num = 0; num < max_num - 1; num++)
{
Modified: trunk/src/PuzzleNumericSequence.cs
==============================================================================
--- trunk/src/PuzzleNumericSequence.cs (original)
+++ trunk/src/PuzzleNumericSequence.cs Fri Apr 4 17:28:31 2008
@@ -89,7 +89,7 @@
gr.Scale (area_width, area_height);
DrawBackground (gr);
PrepareGC (gr);
- SetLargeFont (gr);
+ gr.SetLargeFont ();
for (int num = 0; num < max_num - 1; num++)
{
Modified: trunk/src/PuzzleOstracism.cs
==============================================================================
--- trunk/src/PuzzleOstracism.cs (original)
+++ trunk/src/PuzzleOstracism.cs Fri Apr 4 17:28:31 2008
@@ -77,7 +77,7 @@
gr.Scale (area_width, area_height);
DrawBackground (gr);
PrepareGC (gr);
- SetLargeFont (gr);
+ gr.SetLargeFont ();
for (int i = 0; i < random_indices.Count; i++)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]