Search in sources :

Example 1 with CGRect

use of org.robovm.apple.coregraphics.CGRect in project playn by threerings.

the class RoboCanvas method strokeRect.

@Override
public Canvas strokeRect(float x, float y, float width, float height) {
    bctx.strokeRect(new CGRect(x, y, width, height));
    isDirty = true;
    return this;
}
Also used : CGRect(org.robovm.apple.coregraphics.CGRect)

Example 2 with CGRect

use of org.robovm.apple.coregraphics.CGRect in project playn by threerings.

the class RoboCanvas method clear.

@Override
public Canvas clear() {
    bctx.clearRect(new CGRect(0, 0, texWidth, texHeight));
    isDirty = true;
    return this;
}
Also used : CGRect(org.robovm.apple.coregraphics.CGRect)

Example 3 with CGRect

use of org.robovm.apple.coregraphics.CGRect in project playn by threerings.

the class RoboCanvas method strokeCircle.

@Override
public Canvas strokeCircle(float x, float y, float radius) {
    bctx.strokeEllipseInRect(new CGRect(x - radius, y - radius, 2 * radius, 2 * radius));
    isDirty = true;
    return this;
}
Also used : CGRect(org.robovm.apple.coregraphics.CGRect)

Example 4 with CGRect

use of org.robovm.apple.coregraphics.CGRect in project playn by threerings.

the class RoboCanvas method fillRect.

@Override
public Canvas fillRect(float x, float y, float width, float height) {
    RoboGradient gradient = currentState().gradient;
    if (gradient == null) {
        bctx.fillRect(new CGRect(x, y, width, height));
    } else {
        bctx.saveGState();
        bctx.clipToRect(new CGRect(x, y, width, height));
        gradient.fill(bctx);
        bctx.restoreGState();
    }
    isDirty = true;
    return this;
}
Also used : CGRect(org.robovm.apple.coregraphics.CGRect)

Example 5 with CGRect

use of org.robovm.apple.coregraphics.CGRect in project libgdx by libgdx.

the class IOSInput method createDefaultTextField.

private void createDefaultTextField() {
    textfield = new UITextField(new CGRect(10, 10, 100, 50));
    //Parameters
    // Setting parameters
    textfield.setKeyboardType(UIKeyboardType.Default);
    textfield.setReturnKeyType(UIReturnKeyType.Done);
    textfield.setAutocapitalizationType(UITextAutocapitalizationType.None);
    textfield.setAutocorrectionType(UITextAutocorrectionType.No);
    textfield.setSpellCheckingType(UITextSpellCheckingType.No);
    textfield.setHidden(true);
    // Text field needs to have at least one symbol - so we can use backspace
    textfield.setText("x");
    app.getUIViewController().getView().addSubview(textfield);
}
Also used : UITextField(org.robovm.apple.uikit.UITextField) CGRect(org.robovm.apple.coregraphics.CGRect)

Aggregations

CGRect (org.robovm.apple.coregraphics.CGRect)14 CGBitmapContext (org.robovm.apple.coregraphics.CGBitmapContext)2 CFRange (org.robovm.apple.corefoundation.CFRange)1 CGImage (org.robovm.apple.coregraphics.CGImage)1 CGMutablePath (org.robovm.apple.coregraphics.CGMutablePath)1 CGPath (org.robovm.apple.coregraphics.CGPath)1 CGPoint (org.robovm.apple.coregraphics.CGPoint)1 UIInterfaceOrientation (org.robovm.apple.uikit.UIInterfaceOrientation)1 UITextField (org.robovm.apple.uikit.UITextField)1 UITouch (org.robovm.apple.uikit.UITouch)1 UITouchPhase (org.robovm.apple.uikit.UITouchPhase)1 UIWindow (org.robovm.apple.uikit.UIWindow)1 RoboPlatform (playn.robovm.RoboPlatform)1 TestsGame (playn.tests.core.TestsGame)1