public void setRawClip(ui.geom.Shape clip) { removeClip(); if (clip == null) { return; } com.codename1.ui.geom.Rectangle bounds = clip.getBounds(); if (bounds.getWidth() <= 0 || bounds.getHeight() <= 0) { layer = graphics.CreateLayer(1f, new Rect( bounds.getX(), bounds.getY(), 1, 1 )); return; } if (clip.isRectangle()) { layer = graphics.CreateLayer(1f, new Rect( bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight() )); return; } layer = graphics.CreateLayer(1f, CanvasGeometry.CreatePath(SilverlightImplementation.instance.cn1ShapeToAndroidPath(clip))); }
public FillPathPainter(ui.geom.Shape 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; }
public DrawPathPainter(ui.geom.Shape 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 FillPolygonPainter(ui.geom.Shape 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; }
public FillRadialGradientPainter(ui.geom.Shape 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 FillLinearGradientPainter(ui.geom.Shape 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; }
internal virtual void setClipShape(ui.geom.Shape clip) { removeClip(); if (clip == null) { return; } com.codename1.ui.geom.Rectangle bounds = clip.getBounds(); if (bounds.getWidth() <= 0 || bounds.getHeight() <= 0) { setClip(bounds); return; } CanvasPathBuilder nativeShape = SilverlightImplementation.instance.cn1ShapeToAndroidPath(clip); layer = graphics.CreateLayer(1f, CanvasGeometry.CreatePath(nativeShape)); }