public void setFillColor(double[] components) { setFillColor(VM.getArrayValuesAddress(CoreGraphics.toMachineSizedFloatArray(components))); } public void setFillColor(float[] components) {
public void setStrokeColor(float[] components) { setStrokeColor(VM.getArrayValuesAddress(CoreGraphics.toMachineSizedFloatArray(components))); } public void setFillPattern(CGPattern pattern, double[] components) {
public void addLines(CGPoint[] points) { if (points == null) { throw new NullPointerException("points"); } CGPoint first = Struct.allocate(CGPoint.class, points.length); first.update(points); addLines(first, points.length); } public void clipToRects(CGRect[] rects) {
context.setLineWidth(2); context.setStrokeColor(lineColor.getCGColor()); context.setFillColor(progressRemainingColor.getCGColor()); context.moveToPoint(2, rect.getHeight() / 2); context.addArcToPoint(2, 2, radius + 2, 2, radius); context.addLineToPoint(rect.getWidth() - radius - 2, 2); context.addArcToPoint(rect.getWidth() - 2, 2, rect.getWidth() - 2, rect.getHeight() / 2, radius); context.addArcToPoint(rect.getWidth() - 2, rect.getHeight() - 2, rect.getWidth() - radius - 2, rect.getHeight() - 2, radius); context.addLineToPoint(radius + 2, rect.getHeight() - 2); context.addArcToPoint(2, rect.getHeight() - 2, 2, rect.getHeight() / 2, radius); context.fillPath(); context.moveToPoint(2, rect.getHeight() / 2); context.addArcToPoint(2, 2, radius + 2, 2, radius); context.addLineToPoint(rect.getWidth() - radius - 2, 2); context.addArcToPoint(rect.getWidth() - 2, 2, rect.getWidth() - 2, rect.getHeight() / 2, radius); context.addArcToPoint(rect.getWidth() - 2, rect.getHeight() - 2, rect.getWidth() - radius - 2, rect.getHeight() - 2, radius); context.addLineToPoint(radius + 2, rect.getHeight() - 2); context.addArcToPoint(2, rect.getHeight() - 2, 2, rect.getHeight() / 2, radius); context.strokePath(); context.setFillColor(progressColor.getCGColor()); radius = radius - 2; double amount = progress * rect.getWidth(); context.moveToPoint(4, rect.getHeight() / 2);
double gradRadius = Math.min(getBounds().getWidth(), getBounds().getHeight()); context.drawRadialGradient(gradient, gradCenter, 0, gradCenter, gradRadius, CGGradientDrawingOptions.AfterEndLocation); context.setFillColor(color.getCGColor()); } else { context.setGrayFillColor(0, 0.8); context.beginPath(); context.moveToPoint(boxRect.getMinX() + radius, boxRect.getMinY()); context.addArc(boxRect.getMaxX() - radius, boxRect.getMinY() + radius, radius, 3 * Math.PI / 2, 0, false); context.addArc(boxRect.getMaxX() - radius, boxRect.getMaxY() - radius, radius, 0, Math.PI / 2, false); context.addArc(boxRect.getMinX() + radius, boxRect.getMaxY() - radius, radius, Math.PI / 2, Math.PI, false); context.addArc(boxRect.getMinX() + radius, boxRect.getMinY() + radius, radius, Math.PI, 3 * Math.PI / 2, false); context.closePath(); context.fillPath();
public void setLineDash(double phase, double[] lengths) { if (lengths == null) { setLineDash(phase, 0, 0); } else { setLineDash(phase, VM.getArrayValuesAddress(CoreGraphics.toMachineSizedFloatArray(lengths)), lengths.length); } } public void setLineDash(double phase, float[] lengths, long count) {
public void setFillPattern(CGPattern pattern, float[] components) { setFillPattern(pattern, VM.getArrayValuesAddress(CoreGraphics.toMachineSizedFloatArray(components))); } public void setStrokePattern(CGPattern pattern, double[] components) {
public void setStrokePattern(CGPattern pattern, float[] components) { setStrokePattern(pattern, VM.getArrayValuesAddress(CoreGraphics.toMachineSizedFloatArray(components))); } public void setLineDash(double phase, double[] lengths) {
public void clipToRects(CGRect[] rects) { if (rects == null) { throw new NullPointerException("rects"); } CGRect first = Struct.allocate(CGRect.class, rects.length); first.update(rects); clipToRects(first, rects.length); } public void fillRects(CGRect[] rects) {
/** * @since Available in iOS 2.0 and later. * @deprecated Deprecated in iOS 7.0. */ @Deprecated public void selectFont(String name, double size, CGTextEncoding textEncoding) { selectFont(VM.getStringUTFChars(name), size, textEncoding); } /**
public void addRects(CGRect[] rects) { if (rects == null) { throw new NullPointerException("rects"); } CGRect first = Struct.allocate(CGRect.class, rects.length); first.update(rects); addRects(first, rects.length); } public void addLines(CGPoint[] points) {
public void fillRects(CGRect[] rects) { if (rects == null) { throw new NullPointerException("rects"); } CGRect first = Struct.allocate(CGRect.class, rects.length); first.update(rects); fillRects(first, rects.length); } public void setFillColor(double[] components) {
public void setLineDash(double phase, float[] lengths, long count) { if (lengths == null) { setLineDash(phase, 0, 0); } else { setLineDash(phase, VM.getArrayValuesAddress(CoreGraphics.toMachineSizedFloatArray(lengths)), lengths.length); } } public void strokeLineSegments(CGPoint[] points) {
public void setFillPattern(CGPattern pattern, double[] components) { setFillPattern(pattern, VM.getArrayValuesAddress(CoreGraphics.toMachineSizedFloatArray(components))); } public void setFillPattern(CGPattern pattern, float[] components) {
public void setStrokePattern(CGPattern pattern, double[] components) { setStrokePattern(pattern, VM.getArrayValuesAddress(CoreGraphics.toMachineSizedFloatArray(components))); } public void setStrokePattern(CGPattern pattern, float[] components) {
public void clipToRects(CGRect[] rects) { if (rects == null) { throw new NullPointerException("rects"); } CGRect first = Struct.allocate(CGRect.class, rects.length); first.update(rects); clipToRects(first, rects.length); } public void fillRects(CGRect[] rects) {
/** * @since Available in iOS 2.0 and later. * @deprecated Deprecated in iOS 7.0. */ @Deprecated public void selectFont(String name, double size, CGTextEncoding textEncoding) { selectFont(VM.getStringUTFChars(name), size, textEncoding); } /**
public void addRects(CGRect[] rects) { if (rects == null) { throw new NullPointerException("rects"); } CGRect first = Struct.allocate(CGRect.class, rects.length); first.update(rects); addRects(first, rects.length); } public void addLines(CGPoint[] points) {
public void fillRects(CGRect[] rects) { if (rects == null) { throw new NullPointerException("rects"); } CGRect first = Struct.allocate(CGRect.class, rects.length); first.update(rects); fillRects(first, rects.length); } public void setFillColor(double[] components) {
public void setStrokeColor(double[] components) { setStrokeColor(VM.getArrayValuesAddress(CoreGraphics.toMachineSizedFloatArray(components))); } public void setStrokeColor(float[] components) {