Update Cairo sample

svn path=/trunk/gtk-sharp/; revision=22636
This commit is contained in:
Miguel de Icaza 2004-01-31 03:52:22 +00:00
parent a57d46e5ee
commit 5b371fd827

View file

@ -35,7 +35,7 @@ class X {
{ {
int offx, offy; int offx, offy;
using (Cairo.Object o = args.Event.window.CairoGraphics (out offx, out offy)){ using (Cairo.Graphics o = args.Event.window.CairoGraphics (out offx, out offy)){
o.SetRGBColor (1, 0, 0); o.SetRGBColor (1, 0, 0);
o.Translate (-offx, -offy); o.Translate (-offx, -offy);
o.MoveTo (0, 0); o.MoveTo (0, 0);
@ -59,7 +59,7 @@ class X {
int x, y; int x, y;
//Cairo.Object o = p.CairoGraphics (); //Cairo.Object o = p.CairoGraphics ();
using (Cairo.Object o = window.CairoGraphics (out x, out y)) using (Cairo.Graphics o = window.CairoGraphics (out x, out y))
{ {
o.Translate (-area.x, -area.y); o.Translate (-area.x, -area.y);
DrawCircles (o, rect); DrawCircles (o, rect);
@ -70,14 +70,14 @@ class X {
} }
} }
static void DrawCircles (Cairo.Object o, Gdk.Rectangle rect) static void DrawCircles (Cairo.Graphics o, Gdk.Rectangle rect)
{ {
FillChecks (o, rect); FillChecks (o, rect);
} }
const int CS = 32; const int CS = 32;
static void FillChecks (Cairo.Object o, Gdk.Rectangle rect) static void FillChecks (Cairo.Graphics o, Gdk.Rectangle rect)
{ {
Surface check; Surface check;
// Draw the check // Draw the check