Package org.terasology.math

Examples of org.terasology.math.Rect2i.width()


    public void onDraw(Canvas canvas) {
        Rect2i region = canvas.getRegion();
        inputPort.updateRect();
        canvas.drawWidget(inputPort, Rect2i.createFromMinAndMax(
                (int) (inputPort.rect.minX() / 10.f * region.width()),
                (int) (inputPort.rect.minY() / 5.f * region.height()),
                (int) (inputPort.rect.maxX() / 10.f * region.width()),
                (int) (inputPort.rect.maxY() / 5.f * region.height())));
        for (Port port : ports) {
            port.updateRect();
View Full Code Here


        Rect2i region = canvas.getRegion();
        inputPort.updateRect();
        canvas.drawWidget(inputPort, Rect2i.createFromMinAndMax(
                (int) (inputPort.rect.minX() / 10.f * region.width()),
                (int) (inputPort.rect.minY() / 5.f * region.height()),
                (int) (inputPort.rect.maxX() / 10.f * region.width()),
                (int) (inputPort.rect.maxY() / 5.f * region.height())));
        for (Port port : ports) {
            port.updateRect();
            canvas.drawWidget(port, Rect2i.createFromMinAndMax(
                    (int) (port.rect.minX() / 10.f * region.width()),
 
View Full Code Here

                (int) (inputPort.rect.maxX() / 10.f * region.width()),
                (int) (inputPort.rect.maxY() / 5.f * region.height())));
        for (Port port : ports) {
            port.updateRect();
            canvas.drawWidget(port, Rect2i.createFromMinAndMax(
                    (int) (port.rect.minX() / 10.f * region.width()),
                    (int) (port.rect.minY() / 5.f * region.height()),
                    (int) (port.rect.maxX() / 10.f * region.width()),
                    (int) (port.rect.maxY() / 5.f * region.height())));
        }
    }
View Full Code Here

        for (Port port : ports) {
            port.updateRect();
            canvas.drawWidget(port, Rect2i.createFromMinAndMax(
                    (int) (port.rect.minX() / 10.f * region.width()),
                    (int) (port.rect.minY() / 5.f * region.height()),
                    (int) (port.rect.maxX() / 10.f * region.width()),
                    (int) (port.rect.maxY() / 5.f * region.height())));
        }
    }

    public Port.InputPort getInputPort() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.