All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.bugvm.apple.uikit.UIBezierPath Maven / Gradle / Ivy
/*
* Copyright (C) 2013-2015 RoboVM AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.bugvm.apple.uikit;
/**/
import java.io.*;
import java.nio.*;
import java.util.*;
import com.bugvm.objc.*;
import com.bugvm.objc.annotation.*;
import com.bugvm.objc.block.*;
import com.bugvm.rt.*;
import com.bugvm.rt.annotation.*;
import com.bugvm.rt.bro.*;
import com.bugvm.rt.bro.annotation.*;
import com.bugvm.rt.bro.ptr.*;
import com.bugvm.apple.foundation.*;
import com.bugvm.apple.coreanimation.*;
import com.bugvm.apple.coregraphics.*;
import com.bugvm.apple.coredata.*;
import com.bugvm.apple.coreimage.*;
import com.bugvm.apple.coretext.*;
import com.bugvm.apple.corelocation.*;
/* */
/**/
/**
* @since Available in iOS 3.2 and later.
*/
/* */
/**/@Library("UIKit") @NativeClass/* */
/**/public/* */ class /**/UIBezierPath/* */
extends /**/NSObject/* */
/**/implements NSCoding/* */ {
/**/public static class UIBezierPathPtr extends Ptr {}/* */
/**/static { ObjCRuntime.bind(UIBezierPath.class); }/* */
/**//* */
/**/
public UIBezierPath() {}
protected UIBezierPath(SkipInit skipInit) { super(skipInit); }
public UIBezierPath(NSCoder aDecoder) { super((SkipInit) null); initObject(init(aDecoder)); }
/* */
/**/
@Property(selector = "CGPath")
public native CGPath getCGPath();
@Property(selector = "setCGPath:")
public native void setCGPath(CGPath v);
@Property(selector = "isEmpty")
public native boolean isEmpty();
@Property(selector = "bounds")
public native @ByVal CGRect getBounds();
@Property(selector = "currentPoint")
public native @ByVal CGPoint getCurrentPoint();
@Property(selector = "lineWidth")
public native @MachineSizedFloat double getLineWidth();
@Property(selector = "setLineWidth:")
public native void setLineWidth(@MachineSizedFloat double v);
@Property(selector = "lineCapStyle")
public native CGLineCap getLineCapStyle();
@Property(selector = "setLineCapStyle:")
public native void setLineCapStyle(CGLineCap v);
@Property(selector = "lineJoinStyle")
public native CGLineJoin getLineJoinStyle();
@Property(selector = "setLineJoinStyle:")
public native void setLineJoinStyle(CGLineJoin v);
@Property(selector = "miterLimit")
public native @MachineSizedFloat double getMiterLimit();
@Property(selector = "setMiterLimit:")
public native void setMiterLimit(@MachineSizedFloat double v);
@Property(selector = "flatness")
public native @MachineSizedFloat double getFlatness();
@Property(selector = "setFlatness:")
public native void setFlatness(@MachineSizedFloat double v);
@Property(selector = "usesEvenOddFillRule")
public native boolean usesEvenOddFillRule();
@Property(selector = "setUsesEvenOddFillRule:")
public native void setUsesEvenOddFillRule(boolean v);
/* */
/**//* */
public void setLineDash(double[] pattern, double phase) {
if (pattern == null) {
throw new NullPointerException("pattern");
}
MachineSizedFloatPtr patternPtr = Struct.allocate(MachineSizedFloatPtr.class, pattern.length);
patternPtr.set(pattern);
setLineDash(patternPtr, pattern.length, phase);
}
public void setLineDash(float[] pattern, double phase) {
if (pattern == null) {
throw new NullPointerException("pattern");
}
MachineSizedFloatPtr patternPtr = Struct.allocate(MachineSizedFloatPtr.class, pattern.length);
patternPtr.set(pattern);
setLineDash(patternPtr, pattern.length, phase);
}
public double[] getLineDashD() {
MachineSizedSIntPtr countPtr = new MachineSizedSIntPtr();
getLineDash(null, countPtr, null);
int count = (int) countPtr.get();
MachineSizedFloatPtr patternPtr = Struct.allocate(MachineSizedFloatPtr.class, count);
getLineDash(patternPtr, null, null);
return patternPtr.toDoubleArray(count);
}
public float[] getLineDashF() {
MachineSizedSIntPtr countPtr = new MachineSizedSIntPtr();
getLineDash(null, countPtr, null);
int count = (int) countPtr.get();
MachineSizedFloatPtr patternPtr = Struct.allocate(MachineSizedFloatPtr.class, count);
getLineDash(patternPtr, null, null);
return patternPtr.toFloatArray(count);
}
public double getLineDashPhase() {
MachineSizedFloatPtr phasePtr = new MachineSizedFloatPtr();
getLineDash(null, null, phasePtr);
return phasePtr.get();
}
/**/
@Method(selector = "initWithCoder:")
protected native @Pointer long init(NSCoder aDecoder);
@Method(selector = "moveToPoint:")
public native void move(@ByVal CGPoint point);
@Method(selector = "addLineToPoint:")
public native void addLine(@ByVal CGPoint point);
@Method(selector = "addCurveToPoint:controlPoint1:controlPoint2:")
public native void addCurve(@ByVal CGPoint endPoint, @ByVal CGPoint controlPoint1, @ByVal CGPoint controlPoint2);
@Method(selector = "addQuadCurveToPoint:controlPoint:")
public native void addQuadCurve(@ByVal CGPoint endPoint, @ByVal CGPoint controlPoint);
/**
* @since Available in iOS 4.0 and later.
*/
@Method(selector = "addArcWithCenter:radius:startAngle:endAngle:clockwise:")
public native void addArc(@ByVal CGPoint center, @MachineSizedFloat double radius, @MachineSizedFloat double startAngle, @MachineSizedFloat double endAngle, boolean clockwise);
@Method(selector = "closePath")
public native void closePath();
@Method(selector = "removeAllPoints")
public native void removeAllPoints();
@Method(selector = "appendPath:")
public native void appendPath(UIBezierPath bezierPath);
/**
* @since Available in iOS 6.0 and later.
*/
@Method(selector = "bezierPathByReversingPath")
public native UIBezierPath reverse();
@Method(selector = "applyTransform:")
public native void applyTransform(@ByVal CGAffineTransform transform);
@Method(selector = "containsPoint:")
public native boolean containsPoint(@ByVal CGPoint point);
@Method(selector = "setLineDash:count:phase:")
protected native void setLineDash(MachineSizedFloatPtr pattern, @MachineSizedSInt long count, @MachineSizedFloat double phase);
@Method(selector = "getLineDash:count:phase:")
protected native void getLineDash(MachineSizedFloatPtr pattern, MachineSizedSIntPtr count, MachineSizedFloatPtr phase);
@Method(selector = "fill")
public native void fill();
@Method(selector = "stroke")
public native void stroke();
@Method(selector = "fillWithBlendMode:alpha:")
public native void fill(CGBlendMode blendMode, @MachineSizedFloat double alpha);
@Method(selector = "strokeWithBlendMode:alpha:")
public native void stroke(CGBlendMode blendMode, @MachineSizedFloat double alpha);
@Method(selector = "addClip")
public native void addClip();
@Method(selector = "bezierPathWithRect:")
public static native UIBezierPath newRect(@ByVal CGRect rect);
@Method(selector = "bezierPathWithOvalInRect:")
public static native UIBezierPath newOval(@ByVal CGRect rect);
@Method(selector = "bezierPathWithRoundedRect:cornerRadius:")
public static native UIBezierPath newRoundedRect(@ByVal CGRect rect, @MachineSizedFloat double cornerRadius);
@Method(selector = "bezierPathWithRoundedRect:byRoundingCorners:cornerRadii:")
public static native UIBezierPath newRoundedRect(@ByVal CGRect rect, UIRectCorner corners, @ByVal CGSize cornerRadii);
@Method(selector = "bezierPathWithArcCenter:radius:startAngle:endAngle:clockwise:")
public static native UIBezierPath newArc(@ByVal CGPoint center, @MachineSizedFloat double radius, @MachineSizedFloat double startAngle, @MachineSizedFloat double endAngle, boolean clockwise);
@Method(selector = "bezierPathWithCGPath:")
public static native UIBezierPath newPath(CGPath CGPath);
@Method(selector = "encodeWithCoder:")
public native void encode(NSCoder coder);
/* */
}