public void resetClip()
 {
     Rectangle r = new Rectangle();
     r.@this(0, 0, Convert.ToInt32(SilverlightImplementation.screen.ActualWidth), Convert.ToInt32(SilverlightImplementation.screen.ActualHeight));
     clip = r;
 }
        public override void clipRect(java.lang.Object graphics, int x, int y, int w, int h) {

            NativeGraphics ng = (NativeGraphics)graphics;
            Rectangle clip = new Rectangle();
            clip.@this(x, y, w, h);
            if (ng.clip != null) {
                ng.clip = (Rectangle)clip.intersection(ng.clip);
            }
            else {
                Debug.WriteLine("clipRect nulo " + ng.destination);
                ng.clip = clip;
            }
            //Debug.WriteLine("clipRect " + x + " " + y + " " + w + " " + h);
        }
 public override void flushGraphics(int x, int y, int width, int height) {
     if (width <= 0 || height <= 0) return;
     Rectangle rect = new Rectangle();
     rect.@this(x, y, width, height);
     myView.flushGraphics(rect);
 }
 public override void setClip(java.lang.Object graphics, int clipX, int clipY, int clipW, int clipH) {
     NativeGraphics ng = (NativeGraphics)graphics;
     Rectangle clip = new Rectangle();
     clip.@this(clipX, clipY, clipW, clipH);
     ng.clip = clip;
     //Debug.WriteLine("setClip " + clipX + " " + clipY + " " + clipW + " " + clipH);
 }