~ubuntu-branches/ubuntu/lucid/gbrainy/lucid

« back to all changes in this revision

Viewing changes to src/Core/Main/Memory.cs

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2010-03-08 11:11:11 UTC
  • mfrom: (13.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100308111111-pxz008t81zfu1w8q
Tags: 1.40-1ubuntu1
* Update from Debian unstable, remaining changes: (LP: #534113)
* debian/patches/01_lpi.patch:
* debian/patches/99_autoreconf.patch:
* debian/control:
  - Add Launchpad integration

Show diffs side-by-side

added added

removed removed

Lines of Context:
162
162
                                downview.Draw (gr, area_width, area_height, rtl);
163
163
                                return;
164
164
                        }
165
 
 
166
 
                        base.Draw (gr, area_width, area_height, rtl);
 
165
                        
 
166
                        InitDraw (gr, area_width, area_height, rtl);
167
167
 
168
168
                        if (shade) {
169
169
                                if (alpha > 0)
170
170
                                        alpha -= (1 / (double) shading_time);
171
171
 
172
172
                                gr.Color = new Color (DefaultDrawingColor.R, DefaultDrawingColor.G, DefaultDrawingColor.B, alpha);
173
 
                                DrawObjectToMemorize (gr, area_width, area_height);
 
173
                                DrawObjectToMemorize (gr, area_width, area_height, rtl);
174
174
                                return;
175
175
                        }
176
176
                
177
177
                        alpha = 1;
178
178
                        gr.Color = new Color (DefaultDrawingColor.R, DefaultDrawingColor.G, DefaultDrawingColor.B, alpha);
179
179
                        if (request_answer && DrawAnswer == false) {
180
 
                                DrawPossibleAnswers (gr, area_width, area_height);
 
180
                                DrawPossibleAnswers (gr, area_width, area_height, rtl);
181
181
                        } else {
182
 
                                DrawObjectToMemorize (gr, area_width, area_height);                     
 
182
                                DrawObjectToMemorize (gr, area_width, area_height, rtl);
183
183
                        }               
184
184
                }
185
185
 
189
189
                        gr.DrawBackground ();
190
190
                        gr.Color = new Cairo.Color (0, 0, 0);
191
191
                        gr.LineWidth = LineWidth;
192
 
                        DrawObjectToMemorize (gr, width, height);
193
 
                }
194
 
 
195
 
                public virtual void DrawPossibleAnswers (CairoContextEx gr, int area_width, int area_height) {}
196
 
 
197
 
                public virtual void DrawObjectToMemorize (CairoContextEx gr, int area_width, int area_height)
 
192
                        DrawObjectToMemorize (gr, width, height, rtl);
 
193
                }
 
194
 
 
195
                public virtual void DrawPossibleAnswers (CairoContextEx gr, int area_width, int area_height, bool rtl)
 
196
                {
 
197
                        foreach (Toolkit.Container container in Widgets)
 
198
                                container.Draw (gr, area_width, area_height, rtl);
 
199
                }
 
200
 
 
201
                public virtual void DrawObjectToMemorize (CairoContextEx gr, int area_width, int area_height, bool rtl)
198
202
                {
199
203
                        double percentage;
200
204
 
201
 
                        if (draw_timer == false)
 
205
                        if (draw_timer == false || IsPreviewMode == true)
202
206
                                return;
203
207
 
204
208
                        percentage = 100 - ((time_left * 100) / total_time);