Beispiel #1
0
            private Shape getProjectedClip()
            {
                if (projectedClip == null)
                {
                    if (clip == null)
                    {
                        return(null);
                    }
                    Shape s = new Rectangle(clip.getX(), clip.getY(), clip.getWidth(), clip.getHeight());
                    if (clipTransform != null && !clipTransform.isIdentity())
                    {
                        GeneralPath p = new GeneralPath();
                        p.setShape(s, clipTransform.getInverse());
                        s = p;
                    }
                    if (transform != null && !transform.isIdentity())
                    {
                        GeneralPath p = new GeneralPath();
                        p.setShape(s, transform);
                        s = p;
                    }
                    projectedClip = s;
                }


                return(projectedClip);
            }
Beispiel #2
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);
 }