Exemple #1
0
        public void resetClip()
        {
            Rectangle r = new Rectangle(0, 0, Convert.ToInt32(SilverlightImplementation.screen.ActualWidth), Convert.ToInt32(SilverlightImplementation.screen.ActualHeight));

            clip          = r;
            clipTransform = null;
        }
Exemple #2
0
 internal override void setClip(Rectangle clip)
 {
     this.clip      = clip;
     this.clipShape = null;
     clipTransform  = transform == null ? null : transform.copy();
     projectedClip  = null;
     pendingRenderingOperations.Add(new SetClipOp(getProjectedClip()));
 }
Exemple #3
0
 public virtual void setTransform(com.codename1.ui.Transform transform)
 {
     this.transform.setTransform(transform);
     if (!transform.isIdentity())
     {
         graphics.Transform = SilverlightImplementation.clamp(((SilverlightImplementation.NativeTransform)transform.getNativeTransform()).m);
     }
     else
     {
         graphics.Transform = Matrix3x2.Identity;
     }
 }
Exemple #4
0
 internal override void setClipShape(Shape clip)
 {
     clipTransform = transform == null ? null : transform.copy();
     if (clip.isRectangle())
     {
         this.clip      = clip.getBounds();
         this.clipShape = null;
     }
     else
     {
         this.clipShape = SilverlightImplementation.instance.cn1ShapeToAndroidPath(clip);
         this.clip      = null;
     }
     projectedClip = null;
 }
Exemple #5
0
 public com.codename1.ui.geom.Shape getClipProjection()
 {
     com.codename1.ui.Transform  t = destination.getTransform();
     com.codename1.ui.geom.Shape s = actualClip;
     if (clipTransform != null && !clipTransform.isIdentity())
     {
         com.codename1.ui.geom.GeneralPath gp = new com.codename1.ui.geom.GeneralPath();
         gp.setShape(s, clipTransform.getInverse());
         s = gp;
     }
     if (t != null && !t.isIdentity())
     {
         com.codename1.ui.geom.GeneralPath gp = new com.codename1.ui.geom.GeneralPath();
         gp.setShape(s, t);
         s = gp;
     }
     return(s);
 }
Exemple #6
0
 public override void setTransform(com.codename1.ui.Transform transform)
 {
     this.transform.setTransform(transform);
     pendingRenderingOperations.Add(new SetTransformOp(clip, transform));
 }