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;
}
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;
}
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;
}
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;
}
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);
}
Aggregations