mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-05 02:16:49 +00:00
Revert^2 "Moving taskbar lifecycle to TouchInteractionService"
430465a3d5
Bug: 187353581
Change-Id: I7b2280d16adfafd3e85ffc1d22e32d0c00d12b67
This commit is contained in:
@@ -324,15 +324,17 @@ public final class Utilities {
|
||||
}
|
||||
|
||||
public static void scaleRectFAboutCenter(RectF r, float scale) {
|
||||
scaleRectFAboutPivot(r, scale, r.centerX(), r.centerY());
|
||||
}
|
||||
|
||||
public static void scaleRectFAboutPivot(RectF r, float scale, float px, float py) {
|
||||
if (scale != 1.0f) {
|
||||
float cx = r.centerX();
|
||||
float cy = r.centerY();
|
||||
r.offset(-cx, -cy);
|
||||
r.offset(-px, -py);
|
||||
r.left = r.left * scale;
|
||||
r.top = r.top * scale ;
|
||||
r.right = r.right * scale;
|
||||
r.bottom = r.bottom * scale;
|
||||
r.offset(cx, cy);
|
||||
r.offset(px, py);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user