예제 #1
0
 internal virtual void setClip(ui.geom.Rectangle clip)
 {
     removeClip();
     if (clip == null)
     {
         return;
     }
     if (clip.getWidth() <= 0)
     {
         // System.Diagnostics.Debug.WriteLine("aaaaaaaaaaaaaaaaaaaa width");
         clip.setWidth(1);
     }
     if (clip.getHeight() <= 0)
     {
         // System.Diagnostics.Debug.WriteLine("aaaaaaaaaaaaaaaaaaaa height");
         clip.setHeight(1);
     }
     if (transform != null && !transform.isIdentity())
     {
         GeneralPath gp = new GeneralPath();
         gp.setShape(clip, transform);
         layer = graphics.CreateLayer(1f, CanvasGeometry.CreatePath(SilverlightImplementation.instance.cn1ShapeToAndroidPath(gp)));
     }
     else
     {
         layer = graphics.CreateLayer(1f, new Rect(
                                          clip.getX(),
                                          clip.getY(),
                                          clip.getWidth(),
                                          clip.getHeight()
                                          ));
     }
 }
예제 #2
0
 public FillPathPainter(ui.geom.Rectangle clip, int color, int alpha, Microsoft.Graphics.Canvas.Geometry.CanvasPathBuilder path)
     : base(clip)
 {
     this.clip  = clip;
     this.color = color;
     this.alpha = alpha;
     this.path  = path;
 }
예제 #3
0
 public FillPolygonPainter(ui.geom.Rectangle clip, int[] p1, int[] p2, int color, int alpha) : base(clip)
 {
     // TODO: Complete member initialization
     this.clip  = clip;
     this.p1    = p1;
     this.p2    = p2;
     this.color = color;
     this.alpha = alpha;
 }
예제 #4
0
 public FillPolygonPainter(ui.geom.Rectangle clip, int[] p1, int[] p2, int color, int alpha) : base(clip)
 {
     // TODO: Complete member initialization
     this.clip = clip;
     this.p1 = p1;
     this.p2 = p2;
     this.color = color;
     this.alpha = alpha;
 }
예제 #5
0
 public DrawPathPainter(ui.geom.Rectangle clip, int color, int alpha, Microsoft.Graphics.Canvas.Geometry.CanvasPathBuilder path, com.codename1.ui.Stroke stroke)
     : base(clip)
 {
     this.clip   = clip;
     this.color  = color;
     this.alpha  = alpha;
     this.path   = path;
     this.stroke = new ui.Stroke(stroke.getLineWidth(), stroke.getCapStyle(), stroke.getJoinStyle(), stroke.getMiterLimit());
 }
 public FillRadialGradientPainter(ui.geom.Rectangle clip, int startColor, int endColor, int x, int y, int width, int height) : base(clip)
 {
     this.clip       = clip;
     this.startColor = startColor;
     this.endColor   = endColor;
     this.x          = x;
     this.y          = y;
     this.width      = width;
     this.height     = height;
 }
 public FillRadialGradientPainter(ui.geom.Rectangle clip, int startColor, int endColor, int x, int y, int width, int height):base(clip)
 {
     this.clip = clip;
     this.startColor = startColor;
     this.endColor = endColor;
     this.x = x;
     this.y = y;
     this.width = width;
     this.height = height;
 }
예제 #8
0
 public FillLinearGradientPainter(ui.geom.Rectangle clip, int startColor, int endColor, int x, int y, int width, int height, bool horizontal)
     : base(clip)
 {
     this.clip       = clip;
     this.startColor = startColor;
     this.endColor   = endColor;
     this.x          = x;
     this.y          = y;
     this.width      = width;
     this.height     = height;
     this.horizontal = horizontal;
 }
 public FillLinearGradientPainter(ui.geom.Rectangle clip, int startColor, int endColor, int x, int y, int width, int height, bool horizontal)
     : base(clip)
 {
     this.clip = clip;
     this.startColor = startColor;
     this.endColor = endColor;
     this.x = x;
     this.y = y;
     this.width = width;
     this.height = height;
     this.horizontal = horizontal;
 }
예제 #10
0
 internal virtual void setClip(ui.geom.Rectangle clip)
 {
     if (clip == null)
     {
         return;
     }
     if (clip.getWidth() <= 0)
     {
         // System.Diagnostics.Debug.WriteLine("aaaaaaaaaaaaaaaaaaaa width");
         clip.setWidth(1);
     }
     if (clip.getHeight() <= 0)
     {
         // System.Diagnostics.Debug.WriteLine("aaaaaaaaaaaaaaaaaaaa height");
         clip.setHeight(1);
     }
     layer = graphics.CreateLayer(1, new Rect(
                                      clip.getX(),
                                      clip.getY(),
                                      clip.getWidth(),
                                      clip.getHeight()
                                      ));
 }
 internal override void setClip(ui.geom.Rectangle clip)
 {
     this.clip = clip;
 }
예제 #12
0
 internal override void setClip(ui.geom.Rectangle clip)
 {
     this.clip = clip;
 }