~pcwalton-mimiga/docky/unanimate

« back to all changes in this revision

Viewing changes to StandardPlugins/Clock/src/ClockDockItem.cs

  • Committer: Rico Tzschichholz
  • Date: 2011-03-13 16:47:29 UTC
  • Revision ID: ricotz@t-online.de-20110313164729-js9bqms4gvrp5c77
Fix drawing with mono 2.10+

Show diffs side-by-side

added added

removed removed

Lines of Context:
388
388
                        double minuteRotation = 2 * Math.PI * (DateTime.Now.Minute / 60.0) + Math.PI;
389
389
                        cr.Rotate (minuteRotation);
390
390
                        cr.MoveTo (0, radius - radius * .35);
391
 
                        cr.LineTo (0, 0 - radius * .15);
 
391
                        cr.LineTo (0, -radius * .15);
392
392
                        cr.Stroke ();
393
 
                        cr.Rotate (0 - minuteRotation);
 
393
                        cr.Rotate (-minuteRotation);
394
394
                        
395
395
                        cr.Color = new Cairo.Color (0, 0, 0);
396
396
                        double hourRotation = 2 * Math.PI * (DateTime.Now.Hour / (ShowMilitary ? 24.0 : 12.0)) + 
397
397
                                        Math.PI + (Math.PI / (ShowMilitary ? 12.0 : 6.0)) * DateTime.Now.Minute / 60.0;
398
398
                        cr.Rotate (hourRotation);
399
399
                        cr.MoveTo (0, radius - radius * .5);
400
 
                        cr.LineTo (0, 0 - radius * .15);
 
400
                        cr.LineTo (0, -radius * .15);
401
401
                        cr.Stroke ();
402
 
                        cr.Rotate (0 - hourRotation);
 
402
                        cr.Rotate (-hourRotation);
403
403
                        
404
 
                        cr.Translate (0 - center, 0 - center);
 
404
                        cr.Translate (-center, -center);
405
405
                        
406
406
                        RenderFileOntoContext (cr, System.IO.Path.Combine (ThemePath, "clock-glass.svg"), radius * 2);
407
407
                        RenderFileOntoContext (cr, System.IO.Path.Combine (ThemePath, "clock-frame.svg"), radius * 2);