/** * @since Available in iOS 2.0 and later. */ @Bridge(symbol="CGAffineTransformConcat", optional=true) private static native @ByVal CGAffineTransform concat(@ByVal CGAffineTransform t1, @ByVal CGAffineTransform t2); /**
@Override public boolean equals(Object obj) { return obj instanceof CGAffineTransform && equalsTo(this, (CGAffineTransform) obj); }
/** * @since Available in iOS 2.0 and later. */ @Bridge(symbol="CGAffineTransformInvert", optional=true) private static native @ByVal CGAffineTransform invert(@ByVal CGAffineTransform t); /**
public CGAffineTransform(@MachineSizedFloat double a, @MachineSizedFloat double b, @MachineSizedFloat double c, @MachineSizedFloat double d, @MachineSizedFloat double tx, @MachineSizedFloat double ty) { this.setA(a); this.setB(b); this.setC(c); this.setD(d); this.setTx(tx); this.setTy(ty); } /*</constructors>*/
@Override public void show() { alertWindow.makeKeyAndVisible(); alertWindow.getRootViewController().getView().addSubview(this); Platform.getPlatform().runOnUIThread(() -> { setTransform(CGAffineTransform.Identity().concat(CGAffineTransform.createScale(0.5, 0.5))); isShown = true; UIView.animate(0.3, () -> { setAlpha(1); setTransform(CGAffineTransform.Identity()); }); }); }
/** * Resolves the CTFont for the PlayN {@code font}. {@code font} may be {@code null}, in which * case the default font is returned. */ static CTFont resolveFont (Font font) { CTFont ctFont = fonts.get(font == null ? DEFAULT_FONT : font); if (ctFont == null) { String iosName = getVariant(font.name, font.style); fonts.put(font, ctFont = CTFont.create(iosName, font.size, CGAffineTransform.Identity())); } return ctFont; }
/** * @since Available in iOS 2.0 and later. */ @Bridge(symbol="CGAffineTransformScale", optional=true) private static native @ByVal CGAffineTransform scale(@ByVal CGAffineTransform t, @MachineSizedFloat double sx, @MachineSizedFloat double sy); /**
/** * @since Available in iOS 2.0 and later. */ @Bridge(symbol="CGAffineTransformRotate", optional=true) private static native @ByVal CGAffineTransform rotate(@ByVal CGAffineTransform t, @MachineSizedFloat double angle); /**
/** * @since Available in iOS 2.0 and later. */ @Bridge(symbol="CGAffineTransformIsIdentity", optional=true) private static native boolean isIdentity(@ByVal CGAffineTransform t); /**
public CGAffineTransform(@MachineSizedFloat double a, @MachineSizedFloat double b, @MachineSizedFloat double c, @MachineSizedFloat double d, @MachineSizedFloat double tx, @MachineSizedFloat double ty) { this.setA(a); this.setB(b); this.setC(c); this.setD(d); this.setTx(tx); this.setTy(ty); } /*</constructors>*/
@Override public void hide() { Platform.getPlatform().runOnUIThread(() -> { if (isShown) { UIView.animate(0.3, () -> { setTransform(CGAffineTransform.Identity().concat(CGAffineTransform.createScale(1.5, 1.5))); setAlpha(0.02); }, (complete) -> { setAlpha(0); removeFromSuperview(); alertWindow.setHidden(true); }); } }); }
public RoboFont(RoboGraphics graphics, String name, Style style, float size) { super(graphics, name, style, size); ctFont = CTFont.create(iosName(), size, CGAffineTransform.Identity()); }
/** * @since Available in iOS 2.0 and later. */ @Bridge(symbol="CGAffineTransformScale", optional=true) private static native @ByVal CGAffineTransform scale(@ByVal CGAffineTransform t, @MachineSizedFloat double sx, @MachineSizedFloat double sy); /**
/** * @since Available in iOS 2.0 and later. */ @Bridge(symbol="CGAffineTransformRotate", optional=true) private static native @ByVal CGAffineTransform rotate(@ByVal CGAffineTransform t, @MachineSizedFloat double angle); /**
/** * @since Available in iOS 2.0 and later. */ @Bridge(symbol="CGAffineTransformIsIdentity", optional=true) private static native boolean isIdentity(@ByVal CGAffineTransform t); /**
public CGAffineTransform(@MachineSizedFloat double a, @MachineSizedFloat double b, @MachineSizedFloat double c, @MachineSizedFloat double d, @MachineSizedFloat double tx, @MachineSizedFloat double ty) { this.setA(a); this.setB(b); this.setC(c); this.setD(d); this.setTx(tx); this.setTy(ty); } /*</constructors>*/
/** * @since Available in iOS 2.0 and later. */ @Bridge(symbol="CGAffineTransformEqualToTransform", optional=true) private static native boolean equalsTo(@ByVal CGAffineTransform t1, @ByVal CGAffineTransform t2); /*</methods>*/
/** * @since Available in iOS 2.0 and later. */ @Bridge(symbol="CGAffineTransformConcat", optional=true) private static native @ByVal CGAffineTransform concat(@ByVal CGAffineTransform t1, @ByVal CGAffineTransform t2); /**
private static CFArray wrapLines(NSAttributedString astring, float wrapWidth) { CTFramesetter fs = CTFramesetter.create(astring); try { // iOS lays things out from max-y up to zero (inverted coordinate system); so we need to // provide a large height for our rectangle to ensure that all lines "fit" CGPath path = CGPath.createWithRect( new CGRect(0, 0, wrapWidth, Float.MAX_VALUE/2), CGAffineTransform.Identity()); CTFrame frame = fs.createFrame(new CFRange(0, 0), path, null); return frame.getLines(); } finally { fs.dispose(); } }
/** * @since Available in iOS 2.0 and later. */ @Bridge(symbol="CGAffineTransformScale", optional=true) private static native @ByVal CGAffineTransform scale(@ByVal CGAffineTransform t, @MachineSizedFloat double sx, @MachineSizedFloat double sy); /**