Search in sources :

Example 1 with Vector2

use of net.schattenkind.androidLove.utils.Vector2 in project love-android by hagish.

the class LuanRenderer method convertUnscaledRectToRealScreenRect.

public Rectangle convertUnscaledRectToRealScreenRect(Rectangle r) {
    Vector2 p0 = convertUnscaledXYToRealScreenXY(new Vector2(r.left, r.top));
    Vector2 p1 = convertUnscaledXYToRealScreenXY(new Vector2(r.left + r.width, r.top + r.height));
    return new Rectangle(p0.x, p0.y, p1.x - p0.x, p1.y - p0.y);
}
Also used : Vector2(net.schattenkind.androidLove.utils.Vector2) Rectangle(net.schattenkind.androidLove.utils.Rectangle)

Aggregations

Rectangle (net.schattenkind.androidLove.utils.Rectangle)1 Vector2 (net.schattenkind.androidLove.utils.Vector2)1