diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/HabiticaIcons.java b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/HabiticaIcons.java
index 2dc734973..2650dabe4 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/HabiticaIcons.java
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/HabiticaIcons.java
@@ -2,7 +2,6 @@ package com.habitrpg.android.habitica.ui.views;
import android.content.Context;
import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
import android.graphics.BitmapShader;
import android.graphics.BlurMaskFilter;
import android.graphics.Canvas;
@@ -11,7 +10,6 @@ import android.graphics.DashPathEffect;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Path;
-import android.graphics.PointF;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.RectF;
@@ -20,7 +18,6 @@ import android.text.Layout;
import android.text.StaticLayout;
import android.text.TextPaint;
-import java.lang.ref.WeakReference;
import java.util.Stack;
@@ -28,9 +25,8 @@ import java.util.Stack;
/**
* Created by Phillip Thelen on 9. Apr 2021.
* Copyright © 2021 HabitRPG Inc.. All rights reserved.
- *
* Generated by PaintCode
- * http://www.paintcodeapp.com
+ * PaintCode
*
* @author Phillip Thelen
*/
@@ -52,31 +48,31 @@ public class HabiticaIcons {
// Tab
private static class CacheForHeart {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 18f, 18f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
- private static RectF bezier4Rect = new RectF();
- private static Path bezier4Path = new Path();
- private static RectF bezier5Rect = new RectF();
- private static Path bezier5Path = new Path();
- private static RectF bezier6Rect = new RectF();
- private static Path bezier6Path = new Path();
- private static RectF bezier7Rect = new RectF();
- private static Path bezier7Path = new Path();
- private static RectF bezier8Rect = new RectF();
- private static Path bezier8Path = new Path();
- private static RectF bezier9Rect = new RectF();
- private static Path bezier9Path = new Path();
- private static RectF bezier10Rect = new RectF();
- private static Path bezier10Path = new Path();
- private static RectF bezier11Rect = new RectF();
- private static Path bezier11Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 18f, 18f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final RectF bezier2Rect = new RectF();
+ private static final Path bezier2Path = new Path();
+ private static final RectF bezier3Rect = new RectF();
+ private static final Path bezier3Path = new Path();
+ private static final RectF bezier4Rect = new RectF();
+ private static final Path bezier4Path = new Path();
+ private static final RectF bezier5Rect = new RectF();
+ private static final Path bezier5Path = new Path();
+ private static final RectF bezier6Rect = new RectF();
+ private static final Path bezier6Path = new Path();
+ private static final RectF bezier7Rect = new RectF();
+ private static final Path bezier7Path = new Path();
+ private static final RectF bezier8Rect = new RectF();
+ private static final Path bezier8Path = new Path();
+ private static final RectF bezier9Rect = new RectF();
+ private static final Path bezier9Path = new Path();
+ private static final RectF bezier10Rect = new RectF();
+ private static final Path bezier10Path = new Path();
+ private static final RectF bezier11Rect = new RectF();
+ private static final Path bezier11Path = new Path();
}
public static void drawHeart(Canvas canvas, boolean darkBackground) {
@@ -334,29 +330,29 @@ public class HabiticaIcons {
}
private static class CacheForExperience {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 18f, 18f);
- private static RectF resizedFrame = new RectF();
- private static RectF starRect = new RectF();
- private static Path starPath = new Path();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
- private static RectF bezier4Rect = new RectF();
- private static Path bezier4Path = new Path();
- private static RectF bezier5Rect = new RectF();
- private static Path bezier5Path = new Path();
- private static RectF bezier6Rect = new RectF();
- private static Path bezier6Path = new Path();
- private static RectF bezier7Rect = new RectF();
- private static Path bezier7Path = new Path();
- private static RectF bezier8Rect = new RectF();
- private static Path bezier8Path = new Path();
- private static RectF star2Rect = new RectF();
- private static Path star2Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 18f, 18f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF starRect = new RectF();
+ private static final Path starPath = new Path();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final RectF bezier2Rect = new RectF();
+ private static final Path bezier2Path = new Path();
+ private static final RectF bezier3Rect = new RectF();
+ private static final Path bezier3Path = new Path();
+ private static final RectF bezier4Rect = new RectF();
+ private static final Path bezier4Path = new Path();
+ private static final RectF bezier5Rect = new RectF();
+ private static final Path bezier5Path = new Path();
+ private static final RectF bezier6Rect = new RectF();
+ private static final Path bezier6Path = new Path();
+ private static final RectF bezier7Rect = new RectF();
+ private static final Path bezier7Path = new Path();
+ private static final RectF bezier8Rect = new RectF();
+ private static final Path bezier8Path = new Path();
+ private static final RectF star2Rect = new RectF();
+ private static final Path star2Path = new Path();
}
public static void drawExperience(Canvas canvas) {
@@ -573,21 +569,21 @@ public class HabiticaIcons {
}
private static class CacheForMagic {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 18f, 18f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
- private static RectF bezier4Rect = new RectF();
- private static Path bezier4Path = new Path();
- private static RectF bezier5Rect = new RectF();
- private static Path bezier5Path = new Path();
- private static RectF bezier6Rect = new RectF();
- private static Path bezier6Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 18f, 18f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final RectF bezier2Rect = new RectF();
+ private static final Path bezier2Path = new Path();
+ private static final RectF bezier3Rect = new RectF();
+ private static final Path bezier3Path = new Path();
+ private static final RectF bezier4Rect = new RectF();
+ private static final Path bezier4Path = new Path();
+ private static final RectF bezier5Rect = new RectF();
+ private static final Path bezier5Path = new Path();
+ private static final RectF bezier6Rect = new RectF();
+ private static final Path bezier6Path = new Path();
}
public static void drawMagic(Canvas canvas) {
@@ -726,19 +722,19 @@ public class HabiticaIcons {
}
private static class CacheForGold {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 18f, 18f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
- private static RectF bezier4Rect = new RectF();
- private static Path bezier4Path = new Path();
- private static RectF bezier5Rect = new RectF();
- private static Path bezier5Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 18f, 18f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final RectF bezier2Rect = new RectF();
+ private static final Path bezier2Path = new Path();
+ private static final RectF bezier3Rect = new RectF();
+ private static final Path bezier3Path = new Path();
+ private static final RectF bezier4Rect = new RectF();
+ private static final Path bezier4Path = new Path();
+ private static final RectF bezier5Rect = new RectF();
+ private static final Path bezier5Path = new Path();
}
public static void drawGold(Canvas canvas) {
@@ -872,27 +868,27 @@ public class HabiticaIcons {
}
private static class CacheForGem {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 18f, 18f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
- private static RectF bezier4Rect = new RectF();
- private static Path bezier4Path = new Path();
- private static RectF bezier5Rect = new RectF();
- private static Path bezier5Path = new Path();
- private static RectF bezier6Rect = new RectF();
- private static Path bezier6Path = new Path();
- private static RectF bezier7Rect = new RectF();
- private static Path bezier7Path = new Path();
- private static RectF bezier8Rect = new RectF();
- private static Path bezier8Path = new Path();
- private static RectF bezier9Rect = new RectF();
- private static Path bezier9Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 18f, 18f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final RectF bezier2Rect = new RectF();
+ private static final Path bezier2Path = new Path();
+ private static final RectF bezier3Rect = new RectF();
+ private static final Path bezier3Path = new Path();
+ private static final RectF bezier4Rect = new RectF();
+ private static final Path bezier4Path = new Path();
+ private static final RectF bezier5Rect = new RectF();
+ private static final Path bezier5Path = new Path();
+ private static final RectF bezier6Rect = new RectF();
+ private static final Path bezier6Path = new Path();
+ private static final RectF bezier7Rect = new RectF();
+ private static final Path bezier7Path = new Path();
+ private static final RectF bezier8Rect = new RectF();
+ private static final Path bezier8Path = new Path();
+ private static final RectF bezier9Rect = new RectF();
+ private static final Path bezier9Path = new Path();
}
public static void drawGem(Canvas canvas) {
@@ -1087,21 +1083,21 @@ public class HabiticaIcons {
}
private static class CacheForHourglass {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 18f, 18f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
- private static RectF bezier4Rect = new RectF();
- private static Path bezier4Path = new Path();
- private static RectF bezier5Rect = new RectF();
- private static Path bezier5Path = new Path();
- private static RectF bezier6Rect = new RectF();
- private static Path bezier6Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 18f, 18f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final RectF bezier2Rect = new RectF();
+ private static final Path bezier2Path = new Path();
+ private static final RectF bezier3Rect = new RectF();
+ private static final Path bezier3Path = new Path();
+ private static final RectF bezier4Rect = new RectF();
+ private static final Path bezier4Path = new Path();
+ private static final RectF bezier5Rect = new RectF();
+ private static final Path bezier5Path = new Path();
+ private static final RectF bezier6Rect = new RectF();
+ private static final Path bezier6Path = new Path();
}
public static void drawHourglass(Canvas canvas) {
@@ -1278,255 +1274,119 @@ public class HabiticaIcons {
canvas.restore();
}
- private static class CacheForExperienceReward {
- private static RectF originalFrame = new RectF(0f, 0f, 40f, 40f);
- private static RectF resizedFrame = new RectF();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
- }
-
- private static void drawExperienceReward(Canvas canvas) {
- HabiticaIcons.drawExperienceReward(canvas, new RectF(0f, 0f, 40f, 40f), ResizingBehavior.AspectFit);
- }
-
- private static void drawExperienceReward(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForExperienceReward.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForExperienceReward.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 40f, resizedFrame.height() / 40f);
-
- // Symbol
- RectF symbolRect = CacheForExperienceReward.symbolRect;
- symbolRect.set(0f, 0f, 40f, 40f);
- canvas.save();
- canvas.clipRect(symbolRect);
- canvas.translate(symbolRect.left, symbolRect.top);
- RectF symbolTargetRect = CacheForExperienceReward.symbolTargetRect;
- symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
- HabiticaIcons.drawExperience(canvas, symbolTargetRect, ResizingBehavior.Stretch);
- canvas.restore();
-
- canvas.restore();
- }
-
- private static class CacheForGoldReward {
- private static RectF originalFrame = new RectF(0f, 0f, 40f, 40f);
- private static RectF resizedFrame = new RectF();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
- }
-
- private static void drawGoldReward(Canvas canvas) {
- HabiticaIcons.drawGoldReward(canvas, new RectF(0f, 0f, 40f, 40f), ResizingBehavior.AspectFit);
- }
-
- private static void drawGoldReward(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForGoldReward.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForGoldReward.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 40f, resizedFrame.height() / 40f);
-
- // Symbol
- RectF symbolRect = CacheForGoldReward.symbolRect;
- symbolRect.set(0f, 0f, 40f, 40f);
- canvas.save();
- canvas.clipRect(symbolRect);
- canvas.translate(symbolRect.left, symbolRect.top);
- RectF symbolTargetRect = CacheForGoldReward.symbolTargetRect;
- symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
- HabiticaIcons.drawGold(canvas, symbolTargetRect, ResizingBehavior.Stretch);
- canvas.restore();
-
- canvas.restore();
- }
-
- private static class CacheForHeartDarkBg {
- private static RectF originalFrame = new RectF(0f, 0f, 18f, 18f);
- private static RectF resizedFrame = new RectF();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
- }
-
- private static void drawHeartDarkBg(Canvas canvas) {
- HabiticaIcons.drawHeartDarkBg(canvas, new RectF(0f, 0f, 18f, 18f), ResizingBehavior.AspectFit);
- }
-
- private static void drawHeartDarkBg(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForHeartDarkBg.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForHeartDarkBg.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 18f, resizedFrame.height() / 18f);
-
- // Symbol
- RectF symbolRect = CacheForHeartDarkBg.symbolRect;
- symbolRect.set(0f, 0f, 18f, 18f);
- canvas.save();
- canvas.clipRect(symbolRect);
- canvas.translate(symbolRect.left, symbolRect.top);
- RectF symbolTargetRect = CacheForHeartDarkBg.symbolTargetRect;
- symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
- HabiticaIcons.drawHeart(canvas, symbolTargetRect, ResizingBehavior.Stretch, true);
- canvas.restore();
-
- canvas.restore();
- }
-
- private static class CacheForHeartLightBg {
- private static RectF originalFrame = new RectF(0f, 0f, 18f, 18f);
- private static RectF resizedFrame = new RectF();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
- }
-
- private static void drawHeartLightBg(Canvas canvas) {
- HabiticaIcons.drawHeartLightBg(canvas, new RectF(0f, 0f, 18f, 18f), ResizingBehavior.AspectFit);
- }
-
- private static void drawHeartLightBg(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForHeartLightBg.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForHeartLightBg.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 18f, resizedFrame.height() / 18f);
-
- // Symbol
- RectF symbolRect = CacheForHeartLightBg.symbolRect;
- symbolRect.set(0f, 0f, 18f, 18f);
- canvas.save();
- canvas.clipRect(symbolRect);
- canvas.translate(symbolRect.left, symbolRect.top);
- RectF symbolTargetRect = CacheForHeartLightBg.symbolTargetRect;
- symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
- HabiticaIcons.drawHeart(canvas, symbolTargetRect, ResizingBehavior.Stretch, false);
- canvas.restore();
-
- canvas.restore();
- }
-
private static class CacheForWarrior {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 32f, 32f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF rectangleRect = new RectF();
- private static Path rectanglePath = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
- private static RectF bezier4Rect = new RectF();
- private static Path bezier4Path = new Path();
- private static RectF bezier5Rect = new RectF();
- private static Path bezier5Path = new Path();
- private static RectF bezier6Rect = new RectF();
- private static Path bezier6Path = new Path();
- private static RectF bezier7Rect = new RectF();
- private static Path bezier7Path = new Path();
- private static RectF bezier8Rect = new RectF();
- private static Path bezier8Path = new Path();
- private static RectF bezier9Rect = new RectF();
- private static Path bezier9Path = new Path();
- private static RectF bezier10Rect = new RectF();
- private static Path bezier10Path = new Path();
- private static RectF bezier11Rect = new RectF();
- private static Path bezier11Path = new Path();
- private static RectF bezier12Rect = new RectF();
- private static Path bezier12Path = new Path();
- private static RectF bezier13Rect = new RectF();
- private static Path bezier13Path = new Path();
- private static RectF bezier14Rect = new RectF();
- private static Path bezier14Path = new Path();
- private static RectF bezier15Rect = new RectF();
- private static Path bezier15Path = new Path();
- private static RectF rectangle2Rect = new RectF();
- private static Path rectangle2Path = new Path();
- private static RectF rectangle3Rect = new RectF();
- private static Path rectangle3Path = new Path();
- private static RectF rectangle4Rect = new RectF();
- private static Path rectangle4Path = new Path();
- private static RectF bezier16Rect = new RectF();
- private static Path bezier16Path = new Path();
- private static RectF bezier17Rect = new RectF();
- private static Path bezier17Path = new Path();
- private static RectF bezier18Rect = new RectF();
- private static Path bezier18Path = new Path();
- private static RectF bezier19Rect = new RectF();
- private static Path bezier19Path = new Path();
- private static RectF group3 = new RectF();
- private static Path clipPath = new Path();
- private static RectF bezier20Rect = new RectF();
- private static Path bezier20Path = new Path();
- private static RectF rectangle5Rect = new RectF();
- private static Path rectangle5Path = new Path();
- private static RectF bezier21Rect = new RectF();
- private static Path bezier21Path = new Path();
- private static RectF bezier22Rect = new RectF();
- private static Path bezier22Path = new Path();
- private static RectF rectangle6Rect = new RectF();
- private static Path rectangle6Path = new Path();
- private static RectF bezier23Rect = new RectF();
- private static Path bezier23Path = new Path();
- private static RectF bezier24Rect = new RectF();
- private static Path bezier24Path = new Path();
- private static RectF bezier25Rect = new RectF();
- private static Path bezier25Path = new Path();
- private static RectF bezier26Rect = new RectF();
- private static Path bezier26Path = new Path();
- private static RectF bezier27Rect = new RectF();
- private static Path bezier27Path = new Path();
- private static RectF bezier28Rect = new RectF();
- private static Path bezier28Path = new Path();
- private static RectF bezier29Rect = new RectF();
- private static Path bezier29Path = new Path();
- private static RectF bezier30Rect = new RectF();
- private static Path bezier30Path = new Path();
- private static RectF bezier31Rect = new RectF();
- private static Path bezier31Path = new Path();
- private static RectF bezier32Rect = new RectF();
- private static Path bezier32Path = new Path();
- private static RectF bezier33Rect = new RectF();
- private static Path bezier33Path = new Path();
- private static RectF bezier34Rect = new RectF();
- private static Path bezier34Path = new Path();
- private static RectF bezier35Rect = new RectF();
- private static Path bezier35Path = new Path();
- private static RectF rectangle7Rect = new RectF();
- private static Path rectangle7Path = new Path();
- private static RectF rectangle8Rect = new RectF();
- private static Path rectangle8Path = new Path();
- private static RectF rectangle9Rect = new RectF();
- private static Path rectangle9Path = new Path();
- private static RectF bezier36Rect = new RectF();
- private static Path bezier36Path = new Path();
- private static RectF bezier37Rect = new RectF();
- private static Path bezier37Path = new Path();
- private static RectF bezier38Rect = new RectF();
- private static Path bezier38Path = new Path();
- private static RectF bezier39Rect = new RectF();
- private static Path bezier39Path = new Path();
- private static RectF group5 = new RectF();
- private static Path clip2Path = new Path();
- private static RectF bezier40Rect = new RectF();
- private static Path bezier40Path = new Path();
- private static RectF rectangle10Rect = new RectF();
- private static Path rectangle10Path = new Path();
- }
-
- public static void drawWarrior(Canvas canvas, boolean darkBackground) {
- HabiticaIcons.drawWarrior(canvas, new RectF(0f, 0f, 32f, 32f), ResizingBehavior.AspectFit, darkBackground);
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 32f, 32f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final RectF bezier2Rect = new RectF();
+ private static final Path bezier2Path = new Path();
+ private static final RectF rectangleRect = new RectF();
+ private static final Path rectanglePath = new Path();
+ private static final RectF bezier3Rect = new RectF();
+ private static final Path bezier3Path = new Path();
+ private static final RectF bezier4Rect = new RectF();
+ private static final Path bezier4Path = new Path();
+ private static final RectF bezier5Rect = new RectF();
+ private static final Path bezier5Path = new Path();
+ private static final RectF bezier6Rect = new RectF();
+ private static final Path bezier6Path = new Path();
+ private static final RectF bezier7Rect = new RectF();
+ private static final Path bezier7Path = new Path();
+ private static final RectF bezier8Rect = new RectF();
+ private static final Path bezier8Path = new Path();
+ private static final RectF bezier9Rect = new RectF();
+ private static final Path bezier9Path = new Path();
+ private static final RectF bezier10Rect = new RectF();
+ private static final Path bezier10Path = new Path();
+ private static final RectF bezier11Rect = new RectF();
+ private static final Path bezier11Path = new Path();
+ private static final RectF bezier12Rect = new RectF();
+ private static final Path bezier12Path = new Path();
+ private static final RectF bezier13Rect = new RectF();
+ private static final Path bezier13Path = new Path();
+ private static final RectF bezier14Rect = new RectF();
+ private static final Path bezier14Path = new Path();
+ private static final RectF bezier15Rect = new RectF();
+ private static final Path bezier15Path = new Path();
+ private static final RectF rectangle2Rect = new RectF();
+ private static final Path rectangle2Path = new Path();
+ private static final RectF rectangle3Rect = new RectF();
+ private static final Path rectangle3Path = new Path();
+ private static final RectF rectangle4Rect = new RectF();
+ private static final Path rectangle4Path = new Path();
+ private static final RectF bezier16Rect = new RectF();
+ private static final Path bezier16Path = new Path();
+ private static final RectF bezier17Rect = new RectF();
+ private static final Path bezier17Path = new Path();
+ private static final RectF bezier18Rect = new RectF();
+ private static final Path bezier18Path = new Path();
+ private static final RectF bezier19Rect = new RectF();
+ private static final Path bezier19Path = new Path();
+ private static final RectF group3 = new RectF();
+ private static final Path clipPath = new Path();
+ private static final RectF bezier20Rect = new RectF();
+ private static final Path bezier20Path = new Path();
+ private static final RectF rectangle5Rect = new RectF();
+ private static final Path rectangle5Path = new Path();
+ private static final RectF bezier21Rect = new RectF();
+ private static final Path bezier21Path = new Path();
+ private static final RectF bezier22Rect = new RectF();
+ private static final Path bezier22Path = new Path();
+ private static final RectF rectangle6Rect = new RectF();
+ private static final Path rectangle6Path = new Path();
+ private static final RectF bezier23Rect = new RectF();
+ private static final Path bezier23Path = new Path();
+ private static final RectF bezier24Rect = new RectF();
+ private static final Path bezier24Path = new Path();
+ private static final RectF bezier25Rect = new RectF();
+ private static final Path bezier25Path = new Path();
+ private static final RectF bezier26Rect = new RectF();
+ private static final Path bezier26Path = new Path();
+ private static final RectF bezier27Rect = new RectF();
+ private static final Path bezier27Path = new Path();
+ private static final RectF bezier28Rect = new RectF();
+ private static final Path bezier28Path = new Path();
+ private static final RectF bezier29Rect = new RectF();
+ private static final Path bezier29Path = new Path();
+ private static final RectF bezier30Rect = new RectF();
+ private static final Path bezier30Path = new Path();
+ private static final RectF bezier31Rect = new RectF();
+ private static final Path bezier31Path = new Path();
+ private static final RectF bezier32Rect = new RectF();
+ private static final Path bezier32Path = new Path();
+ private static final RectF bezier33Rect = new RectF();
+ private static final Path bezier33Path = new Path();
+ private static final RectF bezier34Rect = new RectF();
+ private static final Path bezier34Path = new Path();
+ private static final RectF bezier35Rect = new RectF();
+ private static final Path bezier35Path = new Path();
+ private static final RectF rectangle7Rect = new RectF();
+ private static final Path rectangle7Path = new Path();
+ private static final RectF rectangle8Rect = new RectF();
+ private static final Path rectangle8Path = new Path();
+ private static final RectF rectangle9Rect = new RectF();
+ private static final Path rectangle9Path = new Path();
+ private static final RectF bezier36Rect = new RectF();
+ private static final Path bezier36Path = new Path();
+ private static final RectF bezier37Rect = new RectF();
+ private static final Path bezier37Path = new Path();
+ private static final RectF bezier38Rect = new RectF();
+ private static final Path bezier38Path = new Path();
+ private static final RectF bezier39Rect = new RectF();
+ private static final Path bezier39Path = new Path();
+ private static final RectF group5 = new RectF();
+ private static final Path clip2Path = new Path();
+ private static final RectF bezier40Rect = new RectF();
+ private static final Path bezier40Path = new Path();
+ private static final RectF rectangle10Rect = new RectF();
+ private static final Path rectangle10Path = new Path();
}
public static void drawWarrior(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, boolean darkBackground) {
// General Declarations
- Stack currentTransformation = new Stack();
+ Stack currentTransformation = new Stack<>();
currentTransformation.push(new Matrix());
Paint paint = CacheForWarrior.paint;
@@ -2653,237 +2513,20 @@ public class HabiticaIcons {
canvas.restore();
}
- private static class CacheForHeartLarge {
- private static RectF originalFrame = new RectF(0f, 0f, 36f, 36f);
- private static RectF resizedFrame = new RectF();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
- }
-
- private static void drawHeartLarge(Canvas canvas) {
- HabiticaIcons.drawHeartLarge(canvas, new RectF(0f, 0f, 36f, 36f), ResizingBehavior.AspectFit);
- }
-
- private static void drawHeartLarge(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForHeartLarge.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForHeartLarge.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 36f, resizedFrame.height() / 36f);
-
- // Symbol
- RectF symbolRect = CacheForHeartLarge.symbolRect;
- symbolRect.set(0f, 0f, 36f, 36f);
- canvas.save();
- canvas.clipRect(symbolRect);
- canvas.translate(symbolRect.left, symbolRect.top);
- RectF symbolTargetRect = CacheForHeartLarge.symbolTargetRect;
- symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
- HabiticaIcons.drawHeart(canvas, symbolTargetRect, ResizingBehavior.Stretch, false);
- canvas.restore();
-
- canvas.restore();
- }
-
- private static class CacheForDifficultyStars {
- private static RectF originalFrame = new RectF(0f, 0f, 48f, 12f);
- private static RectF resizedFrame = new RectF();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
- private static RectF symbol2Rect = new RectF();
- private static RectF symbol2TargetRect = new RectF();
- private static RectF symbol3Rect = new RectF();
- private static RectF symbol3TargetRect = new RectF();
- private static RectF symbol4Rect = new RectF();
- private static RectF symbol4TargetRect = new RectF();
- }
-
- public static void drawDifficultyStars(Canvas canvas, float difficulty) {
- HabiticaIcons.drawDifficultyStars(canvas, new RectF(0f, 0f, 48f, 12f), ResizingBehavior.AspectFit, difficulty);
- }
-
- public static void drawDifficultyStars(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, float difficulty) {
- // Local Variables
- float _2StarDifficulty = difficulty >= 2f ? 1f : (difficulty >= 1.5f ? 0.5f : 0f);
- float _1StarDifficulty = difficulty >= 1f ? 1f : (difficulty >= 0.5f ? 0.5f : 0f);
- float _3StarDifficulty = difficulty >= 3f ? 1f : (difficulty >= 2.5f ? 0.5f : 0f);
- float _4StarDifficulty = difficulty >= 4f ? 1f : (difficulty >= 3.5f ? 0.5f : 0f);
-
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForDifficultyStars.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForDifficultyStars.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 48f, resizedFrame.height() / 12f);
-
- // Symbol
- RectF symbolRect = CacheForDifficultyStars.symbolRect;
- symbolRect.set(0f, 0f, 12f, 12f);
- canvas.save();
- canvas.clipRect(symbolRect);
- canvas.translate(symbolRect.left, symbolRect.top);
- RectF symbolTargetRect = CacheForDifficultyStars.symbolTargetRect;
- symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
- HabiticaIcons.drawDifficultyStar(canvas, symbolTargetRect, ResizingBehavior.Stretch, _1StarDifficulty);
- canvas.restore();
-
- // Symbol 2
- RectF symbol2Rect = CacheForDifficultyStars.symbol2Rect;
- symbol2Rect.set(12f, 0f, 24f, 12f);
- canvas.save();
- canvas.clipRect(symbol2Rect);
- canvas.translate(symbol2Rect.left, symbol2Rect.top);
- RectF symbol2TargetRect = CacheForDifficultyStars.symbol2TargetRect;
- symbol2TargetRect.set(0f, 0f, symbol2Rect.width(), symbol2Rect.height());
- HabiticaIcons.drawDifficultyStar(canvas, symbol2TargetRect, ResizingBehavior.Stretch, _2StarDifficulty);
- canvas.restore();
-
- // Symbol 3
- RectF symbol3Rect = CacheForDifficultyStars.symbol3Rect;
- symbol3Rect.set(24f, 0f, 36f, 12f);
- canvas.save();
- canvas.clipRect(symbol3Rect);
- canvas.translate(symbol3Rect.left, symbol3Rect.top);
- RectF symbol3TargetRect = CacheForDifficultyStars.symbol3TargetRect;
- symbol3TargetRect.set(0f, 0f, symbol3Rect.width(), symbol3Rect.height());
- HabiticaIcons.drawDifficultyStar(canvas, symbol3TargetRect, ResizingBehavior.Stretch, _3StarDifficulty);
- canvas.restore();
-
- // Symbol 4
- RectF symbol4Rect = CacheForDifficultyStars.symbol4Rect;
- symbol4Rect.set(36f, 0f, 48f, 12f);
- canvas.save();
- canvas.clipRect(symbol4Rect);
- canvas.translate(symbol4Rect.left, symbol4Rect.top);
- RectF symbol4TargetRect = CacheForDifficultyStars.symbol4TargetRect;
- symbol4TargetRect.set(0f, 0f, symbol4Rect.width(), symbol4Rect.height());
- HabiticaIcons.drawDifficultyStar(canvas, symbol4TargetRect, ResizingBehavior.Stretch, _4StarDifficulty);
- canvas.restore();
-
- canvas.restore();
- }
-
- private static class CacheForDifficultyStar {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 12f, 12f);
- private static RectF resizedFrame = new RectF();
- private static RectF star3Rect = new RectF();
- private static Path star3Path = new Path();
- private static RectF starRect = new RectF();
- private static Path starPath = new Path();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- }
-
- public static void drawDifficultyStar(Canvas canvas, float singleDifficulty) {
- HabiticaIcons.drawDifficultyStar(canvas, new RectF(0f, 0f, 12f, 12f), ResizingBehavior.AspectFit, singleDifficulty);
- }
-
- public static void drawDifficultyStar(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, float singleDifficulty) {
- // General Declarations
- Paint paint = CacheForDifficultyStar.paint;
-
- // Local Colors
- int fillColor25 = Color.argb(255, 225, 224, 227);
- int fillColor24 = Color.argb(255, 255, 166, 36);
-
- // Local Variables
- boolean isHalf = singleDifficulty == 0.5f;
- boolean isFull = singleDifficulty == 1f;
-
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForDifficultyStar.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForDifficultyStar.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 12f, resizedFrame.height() / 12f);
-
- // Star 3
- RectF star3Rect = CacheForDifficultyStar.star3Rect;
- star3Rect.set(0f, 0f, 12f, 12f);
- Path star3Path = CacheForDifficultyStar.star3Path;
- star3Path.reset();
- star3Path.moveTo(6f, 0f);
- star3Path.lineTo(8.02f, 3.98f);
- star3Path.lineTo(12f, 6f);
- star3Path.lineTo(8.02f, 8.02f);
- star3Path.lineTo(6f, 12f);
- star3Path.lineTo(3.98f, 8.02f);
- star3Path.lineTo(0f, 6f);
- star3Path.lineTo(3.98f, 3.98f);
- star3Path.lineTo(6f, 0f);
- star3Path.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(fillColor25);
- canvas.drawPath(star3Path, paint);
-
- // Star
- if (isFull) {
- RectF starRect = CacheForDifficultyStar.starRect;
- starRect.set(0f, 0f, 12f, 12f);
- Path starPath = CacheForDifficultyStar.starPath;
- starPath.reset();
- starPath.moveTo(6f, 0f);
- starPath.lineTo(8.02f, 3.98f);
- starPath.lineTo(12f, 6f);
- starPath.lineTo(8.02f, 8.02f);
- starPath.lineTo(6f, 12f);
- starPath.lineTo(3.98f, 8.02f);
- starPath.lineTo(0f, 6f);
- starPath.lineTo(3.98f, 3.98f);
- starPath.lineTo(6f, 0f);
- starPath.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(fillColor24);
- canvas.drawPath(starPath, paint);
- }
-
- // Bezier
- if (isHalf) {
- RectF bezierRect = CacheForDifficultyStar.bezierRect;
- bezierRect.set(0f, 0f, 6f, 12f);
- Path bezierPath = CacheForDifficultyStar.bezierPath;
- bezierPath.reset();
- bezierPath.moveTo(6f, 0f);
- bezierPath.lineTo(4f, 4f);
- bezierPath.lineTo(0f, 6f);
- bezierPath.lineTo(4f, 8f);
- bezierPath.lineTo(6f, 12f);
- bezierPath.lineTo(6f, 0f);
- bezierPath.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- bezierPath.setFillType(Path.FillType.EVEN_ODD);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(fillColor24);
- canvas.drawPath(bezierPath, paint);
- }
-
- canvas.restore();
- }
-
private static class CacheForStarSmall {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 9f, 9f);
- private static RectF resizedFrame = new RectF();
- private static RectF rectangleRect = new RectF();
- private static Path rectanglePath = new Path();
- private static RectF rectangle2Rect = new RectF();
- private static Path rectangle2Path = new Path();
- private static RectF rectangle3Rect = new RectF();
- private static Path rectangle3Path = new Path();
- private static RectF rectangle4Rect = new RectF();
- private static Path rectangle4Path = new Path();
- private static RectF rectangle5Rect = new RectF();
- private static Path rectangle5Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 9f, 9f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF rectangleRect = new RectF();
+ private static final Path rectanglePath = new Path();
+ private static final RectF rectangle2Rect = new RectF();
+ private static final Path rectangle2Path = new Path();
+ private static final RectF rectangle3Rect = new RectF();
+ private static final Path rectangle3Path = new Path();
+ private static final RectF rectangle4Rect = new RectF();
+ private static final Path rectangle4Path = new Path();
+ private static final RectF rectangle5Rect = new RectF();
+ private static final Path rectangle5Path = new Path();
}
public static void drawStarSmall(Canvas canvas) {
@@ -2974,59 +2617,59 @@ public class HabiticaIcons {
}
private static class CacheForStarLarge {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 27f, 27f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF rectangleRect = new RectF();
- private static Path rectanglePath = new Path();
- private static RectF rectangle2Rect = new RectF();
- private static Path rectangle2Path = new Path();
- private static RectF rectangle3Rect = new RectF();
- private static Path rectangle3Path = new Path();
- private static RectF rectangle4Rect = new RectF();
- private static Path rectangle4Path = new Path();
- private static RectF rectangle5Rect = new RectF();
- private static Path rectangle5Path = new Path();
- private static RectF rectangle6Rect = new RectF();
- private static Path rectangle6Path = new Path();
- private static RectF rectangle7Rect = new RectF();
- private static Path rectangle7Path = new Path();
- private static RectF rectangle8Rect = new RectF();
- private static Path rectangle8Path = new Path();
- private static RectF rectangle9Rect = new RectF();
- private static Path rectangle9Path = new Path();
- private static RectF rectangle10Rect = new RectF();
- private static Path rectangle10Path = new Path();
- private static RectF rectangle11Rect = new RectF();
- private static Path rectangle11Path = new Path();
- private static RectF rectangle12Rect = new RectF();
- private static Path rectangle12Path = new Path();
- private static RectF rectangle13Rect = new RectF();
- private static Path rectangle13Path = new Path();
- private static RectF rectangle14Rect = new RectF();
- private static Path rectangle14Path = new Path();
- private static RectF rectangle15Rect = new RectF();
- private static Path rectangle15Path = new Path();
- private static RectF rectangle16Rect = new RectF();
- private static Path rectangle16Path = new Path();
- private static RectF rectangle17Rect = new RectF();
- private static Path rectangle17Path = new Path();
- private static RectF rectangle18Rect = new RectF();
- private static Path rectangle18Path = new Path();
- private static RectF rectangle19Rect = new RectF();
- private static Path rectangle19Path = new Path();
- private static RectF rectangle20Rect = new RectF();
- private static Path rectangle20Path = new Path();
- private static RectF rectangle21Rect = new RectF();
- private static Path rectangle21Path = new Path();
- private static RectF rectangle22Rect = new RectF();
- private static Path rectangle22Path = new Path();
- private static RectF rectangle23Rect = new RectF();
- private static Path rectangle23Path = new Path();
- private static RectF rectangle24Rect = new RectF();
- private static Path rectangle24Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 27f, 27f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final RectF rectangleRect = new RectF();
+ private static final Path rectanglePath = new Path();
+ private static final RectF rectangle2Rect = new RectF();
+ private static final Path rectangle2Path = new Path();
+ private static final RectF rectangle3Rect = new RectF();
+ private static final Path rectangle3Path = new Path();
+ private static final RectF rectangle4Rect = new RectF();
+ private static final Path rectangle4Path = new Path();
+ private static final RectF rectangle5Rect = new RectF();
+ private static final Path rectangle5Path = new Path();
+ private static final RectF rectangle6Rect = new RectF();
+ private static final Path rectangle6Path = new Path();
+ private static final RectF rectangle7Rect = new RectF();
+ private static final Path rectangle7Path = new Path();
+ private static final RectF rectangle8Rect = new RectF();
+ private static final Path rectangle8Path = new Path();
+ private static final RectF rectangle9Rect = new RectF();
+ private static final Path rectangle9Path = new Path();
+ private static final RectF rectangle10Rect = new RectF();
+ private static final Path rectangle10Path = new Path();
+ private static final RectF rectangle11Rect = new RectF();
+ private static final Path rectangle11Path = new Path();
+ private static final RectF rectangle12Rect = new RectF();
+ private static final Path rectangle12Path = new Path();
+ private static final RectF rectangle13Rect = new RectF();
+ private static final Path rectangle13Path = new Path();
+ private static final RectF rectangle14Rect = new RectF();
+ private static final Path rectangle14Path = new Path();
+ private static final RectF rectangle15Rect = new RectF();
+ private static final Path rectangle15Path = new Path();
+ private static final RectF rectangle16Rect = new RectF();
+ private static final Path rectangle16Path = new Path();
+ private static final RectF rectangle17Rect = new RectF();
+ private static final Path rectangle17Path = new Path();
+ private static final RectF rectangle18Rect = new RectF();
+ private static final Path rectangle18Path = new Path();
+ private static final RectF rectangle19Rect = new RectF();
+ private static final Path rectangle19Path = new Path();
+ private static final RectF rectangle20Rect = new RectF();
+ private static final Path rectangle20Path = new Path();
+ private static final RectF rectangle21Rect = new RectF();
+ private static final Path rectangle21Path = new Path();
+ private static final RectF rectangle22Rect = new RectF();
+ private static final Path rectangle22Path = new Path();
+ private static final RectF rectangle23Rect = new RectF();
+ private static final Path rectangle23Path = new Path();
+ private static final RectF rectangle24Rect = new RectF();
+ private static final Path rectangle24Path = new Path();
}
public static void drawStarLarge(Canvas canvas) {
@@ -3394,43 +3037,43 @@ public class HabiticaIcons {
}
private static class CacheForStarMedium {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 21f, 21f);
- private static RectF resizedFrame = new RectF();
- private static RectF rectangleRect = new RectF();
- private static Path rectanglePath = new Path();
- private static RectF rectangle2Rect = new RectF();
- private static Path rectangle2Path = new Path();
- private static RectF rectangle3Rect = new RectF();
- private static Path rectangle3Path = new Path();
- private static RectF rectangle4Rect = new RectF();
- private static Path rectangle4Path = new Path();
- private static RectF rectangle5Rect = new RectF();
- private static Path rectangle5Path = new Path();
- private static RectF rectangle6Rect = new RectF();
- private static Path rectangle6Path = new Path();
- private static RectF rectangle7Rect = new RectF();
- private static Path rectangle7Path = new Path();
- private static RectF rectangle8Rect = new RectF();
- private static Path rectangle8Path = new Path();
- private static RectF rectangle9Rect = new RectF();
- private static Path rectangle9Path = new Path();
- private static RectF rectangle10Rect = new RectF();
- private static Path rectangle10Path = new Path();
- private static RectF rectangle11Rect = new RectF();
- private static Path rectangle11Path = new Path();
- private static RectF rectangle12Rect = new RectF();
- private static Path rectangle12Path = new Path();
- private static RectF rectangle13Rect = new RectF();
- private static Path rectangle13Path = new Path();
- private static RectF rectangle14Rect = new RectF();
- private static Path rectangle14Path = new Path();
- private static RectF rectangle15Rect = new RectF();
- private static Path rectangle15Path = new Path();
- private static RectF rectangle16Rect = new RectF();
- private static Path rectangle16Path = new Path();
- private static RectF rectangle17Rect = new RectF();
- private static Path rectangle17Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 21f, 21f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF rectangleRect = new RectF();
+ private static final Path rectanglePath = new Path();
+ private static final RectF rectangle2Rect = new RectF();
+ private static final Path rectangle2Path = new Path();
+ private static final RectF rectangle3Rect = new RectF();
+ private static final Path rectangle3Path = new Path();
+ private static final RectF rectangle4Rect = new RectF();
+ private static final Path rectangle4Path = new Path();
+ private static final RectF rectangle5Rect = new RectF();
+ private static final Path rectangle5Path = new Path();
+ private static final RectF rectangle6Rect = new RectF();
+ private static final Path rectangle6Path = new Path();
+ private static final RectF rectangle7Rect = new RectF();
+ private static final Path rectangle7Path = new Path();
+ private static final RectF rectangle8Rect = new RectF();
+ private static final Path rectangle8Path = new Path();
+ private static final RectF rectangle9Rect = new RectF();
+ private static final Path rectangle9Path = new Path();
+ private static final RectF rectangle10Rect = new RectF();
+ private static final Path rectangle10Path = new Path();
+ private static final RectF rectangle11Rect = new RectF();
+ private static final Path rectangle11Path = new Path();
+ private static final RectF rectangle12Rect = new RectF();
+ private static final Path rectangle12Path = new Path();
+ private static final RectF rectangle13Rect = new RectF();
+ private static final Path rectangle13Path = new Path();
+ private static final RectF rectangle14Rect = new RectF();
+ private static final Path rectangle14Path = new Path();
+ private static final RectF rectangle15Rect = new RectF();
+ private static final Path rectangle15Path = new Path();
+ private static final RectF rectangle16Rect = new RectF();
+ private static final Path rectangle16Path = new Path();
+ private static final RectF rectangle17Rect = new RectF();
+ private static final Path rectangle17Path = new Path();
}
public static void drawStarMedium(Canvas canvas) {
@@ -3679,11 +3322,11 @@ public class HabiticaIcons {
}
private static class CacheForPinnedItem {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 16f, 16f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 16f, 16f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
}
public static void drawPinnedItem(Canvas canvas) {
@@ -3752,15 +3395,15 @@ public class HabiticaIcons {
}
private static class CacheForAddRemovePin {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 24f, 24f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 24f, 24f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final RectF bezier2Rect = new RectF();
+ private static final Path bezier2Path = new Path();
+ private static final RectF bezier3Rect = new RectF();
+ private static final Path bezier3Path = new Path();
}
public static void drawAddRemovePin(Canvas canvas, boolean addPin) {
@@ -3881,86 +3524,20 @@ public class HabiticaIcons {
canvas.restore();
}
- private static class CacheForPinItem {
- private static RectF originalFrame = new RectF(0f, 0f, 24f, 24f);
- private static RectF resizedFrame = new RectF();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
- }
-
- private static void drawPinItem(Canvas canvas) {
- HabiticaIcons.drawPinItem(canvas, new RectF(0f, 0f, 24f, 24f), ResizingBehavior.AspectFit);
- }
-
- private static void drawPinItem(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForPinItem.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForPinItem.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 24f, resizedFrame.height() / 24f);
-
- // Symbol
- RectF symbolRect = CacheForPinItem.symbolRect;
- symbolRect.set(2f, 2f, 22f, 22f);
- canvas.save();
- canvas.clipRect(symbolRect);
- canvas.translate(symbolRect.left, symbolRect.top);
- RectF symbolTargetRect = CacheForPinItem.symbolTargetRect;
- symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
- HabiticaIcons.drawAddRemovePin(canvas, symbolTargetRect, ResizingBehavior.Stretch, true);
- canvas.restore();
-
- canvas.restore();
- }
-
- private static class CacheForUnpinItem {
- private static RectF originalFrame = new RectF(0f, 0f, 24f, 24f);
- private static RectF resizedFrame = new RectF();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
- }
-
- private static void drawUnpinItem(Canvas canvas) {
- HabiticaIcons.drawUnpinItem(canvas, new RectF(0f, 0f, 24f, 24f), ResizingBehavior.AspectFit);
- }
-
- private static void drawUnpinItem(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForUnpinItem.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForUnpinItem.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 24f, resizedFrame.height() / 24f);
-
- // Symbol
- RectF symbolRect = CacheForUnpinItem.symbolRect;
- symbolRect.set(2f, 2f, 22f, 22f);
- canvas.save();
- canvas.clipRect(symbolRect);
- canvas.translate(symbolRect.left, symbolRect.top);
- RectF symbolTargetRect = CacheForUnpinItem.symbolTargetRect;
- symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
- HabiticaIcons.drawAddRemovePin(canvas, symbolTargetRect, ResizingBehavior.Stretch, false);
- canvas.restore();
-
- canvas.restore();
- }
-
private static class CacheForItemIndicator {
- private static Paint paint = new Paint();
- private static Paint shadowPaint = new Paint();
- private static PaintCodeShadow shadow = new PaintCodeShadow();
- private static RectF originalFrame = new RectF(0f, 0f, 28f, 28f);
- private static RectF resizedFrame = new RectF();
- private static RectF oval2Rect = new RectF();
- private static Path oval2Path = new Path();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
+ private static final Paint paint = new Paint();
+ private static final Paint shadowPaint = new Paint();
+ private static final PaintCodeShadow shadow = new PaintCodeShadow();
+ private static final RectF originalFrame = new RectF(0f, 0f, 28f, 28f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF oval2Rect = new RectF();
+ private static final Path oval2Path = new Path();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final RectF bezier2Rect = new RectF();
+ private static final Path bezier2Path = new Path();
+ private static final RectF symbolRect = new RectF();
+ private static final RectF symbolTargetRect = new RectF();
}
public static void drawItemIndicator(Canvas canvas, int indicatorLocked, int lockColor, int indicatorLockedDark, int itemIndicatorColorBackground, boolean isLocked, boolean isLimited, boolean isDark) {
@@ -3978,7 +3555,7 @@ public class HabiticaIcons {
int strokeColor = Color.argb(255, 97, 51, 180);
// Local Shadows
- PaintCodeShadow shadow = CacheForItemIndicator.shadow.get(PaintCodeColor.colorByChangingAlpha(shadowTint, (int) (Color.alpha(shadowTint) * 0.12f * 255f)), 0f, 1f, 1f);
+ PaintCodeShadow shadow = CacheForItemIndicator.shadow.get(PaintCodeColor.colorByChangingAlpha(shadowTint, (int) (Color.alpha(shadowTint) * 0.12f * 255f)));
// Local Variables
int itemIndicatorColor = isLocked ? (isDark ? indicatorLockedDark : indicatorLocked) : (isLimited ? strokeColor : (isDark ? indicatorLockedDark : itemIndicatorColorBackground));
@@ -4082,144 +3659,12 @@ public class HabiticaIcons {
canvas.restore();
}
-
- private static class CacheForItemIndicatorNumber {
- private static RectF originalFrame = new RectF(0f, 0f, 28f, 28f);
- private static RectF resizedFrame = new RectF();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
- }
-
- private static void drawItemIndicatorNumber(Canvas canvas, int indicatorLocked, int lockColor, int indicatorLockedDark, int itemIndicatorColorBackground) {
- HabiticaIcons.drawItemIndicatorNumber(canvas, new RectF(0f, 0f, 28f, 28f), ResizingBehavior.AspectFit, indicatorLocked, lockColor, indicatorLockedDark, itemIndicatorColorBackground);
- }
-
- private static void drawItemIndicatorNumber(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, int indicatorLocked, int lockColor, int indicatorLockedDark, int itemIndicatorColorBackground) {
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForItemIndicatorNumber.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForItemIndicatorNumber.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 28f, resizedFrame.height() / 28f);
-
- // Symbol
- RectF symbolRect = CacheForItemIndicatorNumber.symbolRect;
- symbolRect.set(0f, 0f, 28f, 28f);
- canvas.save();
- canvas.clipRect(symbolRect);
- canvas.translate(symbolRect.left, symbolRect.top);
- RectF symbolTargetRect = CacheForItemIndicatorNumber.symbolTargetRect;
- symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
- HabiticaIcons.drawItemIndicator(canvas, symbolTargetRect, ResizingBehavior.Stretch, indicatorLocked, lockColor, indicatorLockedDark, itemIndicatorColorBackground, false, false, false);
- canvas.restore();
-
- canvas.restore();
- }
-
- private static class CacheForItemIndicatorLocked {
- private static RectF originalFrame = new RectF(0f, 0f, 28f, 28f);
- private static RectF resizedFrame = new RectF();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
- }
-
- private static void drawItemIndicatorLocked(Canvas canvas, int indicatorLocked, int lockColor, int indicatorLockedDark, int itemIndicatorColorBackground) {
- HabiticaIcons.drawItemIndicatorLocked(canvas, new RectF(0f, 0f, 28f, 28f), ResizingBehavior.AspectFit, indicatorLocked, lockColor, indicatorLockedDark, itemIndicatorColorBackground);
- }
-
- private static void drawItemIndicatorLocked(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, int indicatorLocked, int lockColor, int indicatorLockedDark, int itemIndicatorColorBackground) {
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForItemIndicatorLocked.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForItemIndicatorLocked.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 28f, resizedFrame.height() / 28f);
-
- // Symbol
- RectF symbolRect = CacheForItemIndicatorLocked.symbolRect;
- symbolRect.set(0f, 0f, 28f, 28f);
- canvas.save();
- canvas.clipRect(symbolRect);
- canvas.translate(symbolRect.left, symbolRect.top);
- RectF symbolTargetRect = CacheForItemIndicatorLocked.symbolTargetRect;
- symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
- HabiticaIcons.drawItemIndicator(canvas, symbolTargetRect, ResizingBehavior.Stretch, indicatorLocked, lockColor, indicatorLockedDark, itemIndicatorColorBackground, true, false, false);
- canvas.restore();
-
- canvas.restore();
- }
-
- private static class CacheForItemIndicatorLimited {
- private static RectF originalFrame = new RectF(0f, 0f, 28f, 28f);
- private static RectF resizedFrame = new RectF();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
- }
-
- private static void drawItemIndicatorLimited(Canvas canvas, int indicatorLocked, int lockColor, int indicatorLockedDark, int itemIndicatorColorBackground) {
- HabiticaIcons.drawItemIndicatorLimited(canvas, new RectF(0f, 0f, 28f, 28f), ResizingBehavior.AspectFit, indicatorLocked, lockColor, indicatorLockedDark, itemIndicatorColorBackground);
- }
-
- private static void drawItemIndicatorLimited(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, int indicatorLocked, int lockColor, int indicatorLockedDark, int itemIndicatorColorBackground) {
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForItemIndicatorLimited.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForItemIndicatorLimited.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 28f, resizedFrame.height() / 28f);
-
- // Symbol
- RectF symbolRect = CacheForItemIndicatorLimited.symbolRect;
- symbolRect.set(0f, 0f, 28f, 28f);
- canvas.save();
- canvas.clipRect(symbolRect);
- canvas.translate(symbolRect.left, symbolRect.top);
- RectF symbolTargetRect = CacheForItemIndicatorLimited.symbolTargetRect;
- symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
- HabiticaIcons.drawItemIndicator(canvas, symbolTargetRect, ResizingBehavior.Stretch, indicatorLocked, lockColor, indicatorLockedDark, itemIndicatorColorBackground, false, true, false);
- canvas.restore();
-
- canvas.restore();
- }
-
- private static class CacheForGem_36 {
- private static RectF originalFrame = new RectF(0f, 0f, 36f, 36f);
- private static RectF resizedFrame = new RectF();
- private static RectF gem36Rect = new RectF();
- private static RectF gem36TargetRect = new RectF();
- }
-
- private static void drawGem_36(Canvas canvas) {
- HabiticaIcons.drawGem_36(canvas, new RectF(0f, 0f, 36f, 36f), ResizingBehavior.AspectFit);
- }
-
- private static void drawGem_36(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForGem_36.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForGem_36.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 36f, resizedFrame.height() / 36f);
-
- // Gem36
- RectF gem36Rect = CacheForGem_36.gem36Rect;
- gem36Rect.set(0f, 0f, 36f, 36f);
- canvas.save();
- canvas.clipRect(gem36Rect);
- canvas.translate(gem36Rect.left, gem36Rect.top);
- RectF gem36TargetRect = CacheForGem_36.gem36TargetRect;
- gem36TargetRect.set(0f, 0f, gem36Rect.width(), gem36Rect.height());
- HabiticaIcons.drawGem(canvas, gem36TargetRect, ResizingBehavior.Stretch);
- canvas.restore();
-
- canvas.restore();
- }
-
+
private static class CacheForWarriorLightBg {
- private static RectF originalFrame = new RectF(0f, 0f, 32f, 32f);
- private static RectF resizedFrame = new RectF();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
+ private static final RectF originalFrame = new RectF(0f, 0f, 32f, 32f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF symbolRect = new RectF();
+ private static final RectF symbolTargetRect = new RectF();
}
public static void drawWarriorLightBg(Canvas canvas) {
@@ -4247,113 +3692,77 @@ public class HabiticaIcons {
canvas.restore();
}
-
- private static class CacheForWarriorDarkBg {
- private static RectF originalFrame = new RectF(0f, 0f, 32f, 32f);
- private static RectF resizedFrame = new RectF();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
- }
-
- public static void drawWarriorDarkBg(Canvas canvas) {
- HabiticaIcons.drawWarriorDarkBg(canvas, new RectF(0f, 0f, 32f, 32f), ResizingBehavior.AspectFit);
- }
-
- public static void drawWarriorDarkBg(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForWarriorDarkBg.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForWarriorDarkBg.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 32f, resizedFrame.height() / 32f);
-
- // Symbol
- RectF symbolRect = CacheForWarriorDarkBg.symbolRect;
- symbolRect.set(0f, 0f, 32f, 32f);
- canvas.save();
- canvas.clipRect(symbolRect);
- canvas.translate(symbolRect.left, symbolRect.top);
- RectF symbolTargetRect = CacheForWarriorDarkBg.symbolTargetRect;
- symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
- HabiticaIcons.drawWarrior(canvas, symbolTargetRect, ResizingBehavior.Stretch, true);
- canvas.restore();
-
- canvas.restore();
- }
-
+
private static class CacheForRogue {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 32f, 32f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
- private static RectF bezier4Rect = new RectF();
- private static Path bezier4Path = new Path();
- private static RectF bezier5Rect = new RectF();
- private static Path bezier5Path = new Path();
- private static RectF bezier6Rect = new RectF();
- private static Path bezier6Path = new Path();
- private static RectF bezier7Rect = new RectF();
- private static Path bezier7Path = new Path();
- private static RectF bezier8Rect = new RectF();
- private static Path bezier8Path = new Path();
- private static RectF bezier9Rect = new RectF();
- private static Path bezier9Path = new Path();
- private static RectF bezier10Rect = new RectF();
- private static Path bezier10Path = new Path();
- private static RectF bezier11Rect = new RectF();
- private static Path bezier11Path = new Path();
- private static RectF starRect = new RectF();
- private static Path starPath = new Path();
- private static RectF star2Rect = new RectF();
- private static Path star2Path = new Path();
- private static RectF bezier12Rect = new RectF();
- private static Path bezier12Path = new Path();
- private static RectF bezier13Rect = new RectF();
- private static Path bezier13Path = new Path();
- private static RectF bezier14Rect = new RectF();
- private static Path bezier14Path = new Path();
- private static RectF bezier15Rect = new RectF();
- private static Path bezier15Path = new Path();
- private static RectF bezier16Rect = new RectF();
- private static Path bezier16Path = new Path();
- private static RectF bezier17Rect = new RectF();
- private static Path bezier17Path = new Path();
- private static RectF bezier18Rect = new RectF();
- private static Path bezier18Path = new Path();
- private static RectF bezier19Rect = new RectF();
- private static Path bezier19Path = new Path();
- private static RectF bezier20Rect = new RectF();
- private static Path bezier20Path = new Path();
- private static RectF bezier21Rect = new RectF();
- private static Path bezier21Path = new Path();
- private static RectF bezier22Rect = new RectF();
- private static Path bezier22Path = new Path();
- private static RectF bezier23Rect = new RectF();
- private static Path bezier23Path = new Path();
- private static RectF star3Rect = new RectF();
- private static Path star3Path = new Path();
- private static RectF bezier24Rect = new RectF();
- private static Path bezier24Path = new Path();
- private static RectF bezier25Rect = new RectF();
- private static Path bezier25Path = new Path();
- private static RectF bezier26Rect = new RectF();
- private static Path bezier26Path = new Path();
- private static RectF bezier27Rect = new RectF();
- private static Path bezier27Path = new Path();
- }
-
- public static void drawRogue(Canvas canvas, boolean darkBackground) {
- HabiticaIcons.drawRogue(canvas, new RectF(0f, 0f, 32f, 32f), ResizingBehavior.AspectFit, darkBackground);
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 32f, 32f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final RectF bezier2Rect = new RectF();
+ private static final Path bezier2Path = new Path();
+ private static final RectF bezier3Rect = new RectF();
+ private static final Path bezier3Path = new Path();
+ private static final RectF bezier4Rect = new RectF();
+ private static final Path bezier4Path = new Path();
+ private static final RectF bezier5Rect = new RectF();
+ private static final Path bezier5Path = new Path();
+ private static final RectF bezier6Rect = new RectF();
+ private static final Path bezier6Path = new Path();
+ private static final RectF bezier7Rect = new RectF();
+ private static final Path bezier7Path = new Path();
+ private static final RectF bezier8Rect = new RectF();
+ private static final Path bezier8Path = new Path();
+ private static final RectF bezier9Rect = new RectF();
+ private static final Path bezier9Path = new Path();
+ private static final RectF bezier10Rect = new RectF();
+ private static final Path bezier10Path = new Path();
+ private static final RectF bezier11Rect = new RectF();
+ private static final Path bezier11Path = new Path();
+ private static final RectF starRect = new RectF();
+ private static final Path starPath = new Path();
+ private static final RectF star2Rect = new RectF();
+ private static final Path star2Path = new Path();
+ private static final RectF bezier12Rect = new RectF();
+ private static final Path bezier12Path = new Path();
+ private static final RectF bezier13Rect = new RectF();
+ private static final Path bezier13Path = new Path();
+ private static final RectF bezier14Rect = new RectF();
+ private static final Path bezier14Path = new Path();
+ private static final RectF bezier15Rect = new RectF();
+ private static final Path bezier15Path = new Path();
+ private static final RectF bezier16Rect = new RectF();
+ private static final Path bezier16Path = new Path();
+ private static final RectF bezier17Rect = new RectF();
+ private static final Path bezier17Path = new Path();
+ private static final RectF bezier18Rect = new RectF();
+ private static final Path bezier18Path = new Path();
+ private static final RectF bezier19Rect = new RectF();
+ private static final Path bezier19Path = new Path();
+ private static final RectF bezier20Rect = new RectF();
+ private static final Path bezier20Path = new Path();
+ private static final RectF bezier21Rect = new RectF();
+ private static final Path bezier21Path = new Path();
+ private static final RectF bezier22Rect = new RectF();
+ private static final Path bezier22Path = new Path();
+ private static final RectF bezier23Rect = new RectF();
+ private static final Path bezier23Path = new Path();
+ private static final RectF star3Rect = new RectF();
+ private static final Path star3Path = new Path();
+ private static final RectF bezier24Rect = new RectF();
+ private static final Path bezier24Path = new Path();
+ private static final RectF bezier25Rect = new RectF();
+ private static final Path bezier25Path = new Path();
+ private static final RectF bezier26Rect = new RectF();
+ private static final Path bezier26Path = new Path();
+ private static final RectF bezier27Rect = new RectF();
+ private static final Path bezier27Path = new Path();
}
+
public static void drawRogue(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, boolean darkBackground) {
// General Declarations
- Stack currentTransformation = new Stack();
+ Stack currentTransformation = new Stack<>();
currentTransformation.push(new Matrix());
Paint paint = CacheForRogue.paint;
@@ -5011,10 +4420,10 @@ public class HabiticaIcons {
}
private static class CacheForRogueLightBg {
- private static RectF originalFrame = new RectF(0f, 0f, 32f, 32f);
- private static RectF resizedFrame = new RectF();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
+ private static final RectF originalFrame = new RectF(0f, 0f, 32f, 32f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF symbolRect = new RectF();
+ private static final RectF symbolTargetRect = new RectF();
}
public static void drawRogueLightBg(Canvas canvas) {
@@ -5042,112 +4451,75 @@ public class HabiticaIcons {
canvas.restore();
}
-
- private static class CacheForRogueDarkBg {
- private static RectF originalFrame = new RectF(0f, 0f, 32f, 32f);
- private static RectF resizedFrame = new RectF();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
- }
-
- public static void drawRogueDarkBg(Canvas canvas) {
- HabiticaIcons.drawRogueDarkBg(canvas, new RectF(0f, 0f, 32f, 32f), ResizingBehavior.AspectFit);
- }
-
- public static void drawRogueDarkBg(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForRogueDarkBg.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForRogueDarkBg.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 32f, resizedFrame.height() / 32f);
-
- // Symbol
- RectF symbolRect = CacheForRogueDarkBg.symbolRect;
- symbolRect.set(0f, 0f, 32f, 32f);
- canvas.save();
- canvas.clipRect(symbolRect);
- canvas.translate(symbolRect.left, symbolRect.top);
- RectF symbolTargetRect = CacheForRogueDarkBg.symbolTargetRect;
- symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
- HabiticaIcons.drawRogue(canvas, symbolTargetRect, ResizingBehavior.Stretch, true);
- canvas.restore();
-
- canvas.restore();
- }
-
+
private static class CacheForHealer {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 32f, 32f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
- private static RectF bezier4Rect = new RectF();
- private static Path bezier4Path = new Path();
- private static RectF bezier5Rect = new RectF();
- private static Path bezier5Path = new Path();
- private static RectF bezier6Rect = new RectF();
- private static Path bezier6Path = new Path();
- private static RectF bezier7Rect = new RectF();
- private static Path bezier7Path = new Path();
- private static RectF bezier8Rect = new RectF();
- private static Path bezier8Path = new Path();
- private static RectF bezier9Rect = new RectF();
- private static Path bezier9Path = new Path();
- private static RectF bezier10Rect = new RectF();
- private static Path bezier10Path = new Path();
- private static RectF bezier11Rect = new RectF();
- private static Path bezier11Path = new Path();
- private static RectF bezier12Rect = new RectF();
- private static Path bezier12Path = new Path();
- private static RectF bezier13Rect = new RectF();
- private static Path bezier13Path = new Path();
- private static RectF bezier14Rect = new RectF();
- private static Path bezier14Path = new Path();
- private static RectF bezier15Rect = new RectF();
- private static Path bezier15Path = new Path();
- private static RectF bezier16Rect = new RectF();
- private static Path bezier16Path = new Path();
- private static RectF bezier17Rect = new RectF();
- private static Path bezier17Path = new Path();
- private static RectF bezier18Rect = new RectF();
- private static Path bezier18Path = new Path();
- private static RectF bezier19Rect = new RectF();
- private static Path bezier19Path = new Path();
- private static RectF bezier20Rect = new RectF();
- private static Path bezier20Path = new Path();
- private static RectF bezier21Rect = new RectF();
- private static Path bezier21Path = new Path();
- private static RectF bezier22Rect = new RectF();
- private static Path bezier22Path = new Path();
- private static RectF bezier23Rect = new RectF();
- private static Path bezier23Path = new Path();
- private static RectF bezier24Rect = new RectF();
- private static Path bezier24Path = new Path();
- private static RectF bezier25Rect = new RectF();
- private static Path bezier25Path = new Path();
- private static RectF bezier26Rect = new RectF();
- private static Path bezier26Path = new Path();
- private static RectF bezier27Rect = new RectF();
- private static Path bezier27Path = new Path();
- private static RectF bezier28Rect = new RectF();
- private static Path bezier28Path = new Path();
- private static RectF bezier29Rect = new RectF();
- private static Path bezier29Path = new Path();
- private static RectF bezier30Rect = new RectF();
- private static Path bezier30Path = new Path();
- private static RectF bezier31Rect = new RectF();
- private static Path bezier31Path = new Path();
- private static RectF bezier32Rect = new RectF();
- private static Path bezier32Path = new Path();
- }
-
- public static void drawHealer(Canvas canvas, boolean darkBackground) {
- HabiticaIcons.drawHealer(canvas, new RectF(0f, 0f, 32f, 32f), ResizingBehavior.AspectFit, darkBackground);
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 32f, 32f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final RectF bezier2Rect = new RectF();
+ private static final Path bezier2Path = new Path();
+ private static final RectF bezier3Rect = new RectF();
+ private static final Path bezier3Path = new Path();
+ private static final RectF bezier4Rect = new RectF();
+ private static final Path bezier4Path = new Path();
+ private static final RectF bezier5Rect = new RectF();
+ private static final Path bezier5Path = new Path();
+ private static final RectF bezier6Rect = new RectF();
+ private static final Path bezier6Path = new Path();
+ private static final RectF bezier7Rect = new RectF();
+ private static final Path bezier7Path = new Path();
+ private static final RectF bezier8Rect = new RectF();
+ private static final Path bezier8Path = new Path();
+ private static final RectF bezier9Rect = new RectF();
+ private static final Path bezier9Path = new Path();
+ private static final RectF bezier10Rect = new RectF();
+ private static final Path bezier10Path = new Path();
+ private static final RectF bezier11Rect = new RectF();
+ private static final Path bezier11Path = new Path();
+ private static final RectF bezier12Rect = new RectF();
+ private static final Path bezier12Path = new Path();
+ private static final RectF bezier13Rect = new RectF();
+ private static final Path bezier13Path = new Path();
+ private static final RectF bezier14Rect = new RectF();
+ private static final Path bezier14Path = new Path();
+ private static final RectF bezier15Rect = new RectF();
+ private static final Path bezier15Path = new Path();
+ private static final RectF bezier16Rect = new RectF();
+ private static final Path bezier16Path = new Path();
+ private static final RectF bezier17Rect = new RectF();
+ private static final Path bezier17Path = new Path();
+ private static final RectF bezier18Rect = new RectF();
+ private static final Path bezier18Path = new Path();
+ private static final RectF bezier19Rect = new RectF();
+ private static final Path bezier19Path = new Path();
+ private static final RectF bezier20Rect = new RectF();
+ private static final Path bezier20Path = new Path();
+ private static final RectF bezier21Rect = new RectF();
+ private static final Path bezier21Path = new Path();
+ private static final RectF bezier22Rect = new RectF();
+ private static final Path bezier22Path = new Path();
+ private static final RectF bezier23Rect = new RectF();
+ private static final Path bezier23Path = new Path();
+ private static final RectF bezier24Rect = new RectF();
+ private static final Path bezier24Path = new Path();
+ private static final RectF bezier25Rect = new RectF();
+ private static final Path bezier25Path = new Path();
+ private static final RectF bezier26Rect = new RectF();
+ private static final Path bezier26Path = new Path();
+ private static final RectF bezier27Rect = new RectF();
+ private static final Path bezier27Path = new Path();
+ private static final RectF bezier28Rect = new RectF();
+ private static final Path bezier28Path = new Path();
+ private static final RectF bezier29Rect = new RectF();
+ private static final Path bezier29Path = new Path();
+ private static final RectF bezier30Rect = new RectF();
+ private static final Path bezier30Path = new Path();
+ private static final RectF bezier31Rect = new RectF();
+ private static final Path bezier31Path = new Path();
+ private static final RectF bezier32Rect = new RectF();
+ private static final Path bezier32Path = new Path();
}
public static void drawHealer(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, boolean darkBackground) {
@@ -5876,10 +5248,10 @@ public class HabiticaIcons {
}
private static class CacheForHealerLightBg {
- private static RectF originalFrame = new RectF(0f, 0f, 32f, 32f);
- private static RectF resizedFrame = new RectF();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
+ private static final RectF originalFrame = new RectF(0f, 0f, 32f, 32f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF symbolRect = new RectF();
+ private static final RectF symbolTargetRect = new RectF();
}
public static void drawHealerLightBg(Canvas canvas) {
@@ -5908,85 +5280,48 @@ public class HabiticaIcons {
canvas.restore();
}
- private static class CacheForHealerDarkBg {
- private static RectF originalFrame = new RectF(0f, 0f, 32f, 32f);
- private static RectF resizedFrame = new RectF();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
- }
-
- public static void drawHealerDarkBg(Canvas canvas) {
- HabiticaIcons.drawHealerDarkBg(canvas, new RectF(0f, 0f, 32f, 32f), ResizingBehavior.AspectFit);
- }
-
- public static void drawHealerDarkBg(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForHealerDarkBg.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForHealerDarkBg.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 32f, resizedFrame.height() / 32f);
-
- // Symbol
- RectF symbolRect = CacheForHealerDarkBg.symbolRect;
- symbolRect.set(0f, 0f, 32f, 32f);
- canvas.save();
- canvas.clipRect(symbolRect);
- canvas.translate(symbolRect.left, symbolRect.top);
- RectF symbolTargetRect = CacheForHealerDarkBg.symbolTargetRect;
- symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
- HabiticaIcons.drawHealer(canvas, symbolTargetRect, ResizingBehavior.Stretch, true);
- canvas.restore();
-
- canvas.restore();
- }
-
private static class CacheForMage {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 32f, 32f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
- private static RectF bezier4Rect = new RectF();
- private static Path bezier4Path = new Path();
- private static RectF bezier5Rect = new RectF();
- private static Path bezier5Path = new Path();
- private static RectF bezier6Rect = new RectF();
- private static Path bezier6Path = new Path();
- private static RectF bezier7Rect = new RectF();
- private static Path bezier7Path = new Path();
- private static RectF bezier8Rect = new RectF();
- private static Path bezier8Path = new Path();
- private static RectF bezier9Rect = new RectF();
- private static Path bezier9Path = new Path();
- private static RectF bezier10Rect = new RectF();
- private static Path bezier10Path = new Path();
- private static RectF bezier11Rect = new RectF();
- private static Path bezier11Path = new Path();
- private static RectF bezier12Rect = new RectF();
- private static Path bezier12Path = new Path();
- private static RectF bezier13Rect = new RectF();
- private static Path bezier13Path = new Path();
- private static RectF bezier14Rect = new RectF();
- private static Path bezier14Path = new Path();
- private static RectF bezier15Rect = new RectF();
- private static Path bezier15Path = new Path();
- private static RectF bezier16Rect = new RectF();
- private static Path bezier16Path = new Path();
- private static RectF bezier17Rect = new RectF();
- private static Path bezier17Path = new Path();
- private static RectF bezier18Rect = new RectF();
- private static Path bezier18Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 32f, 32f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final RectF bezier2Rect = new RectF();
+ private static final Path bezier2Path = new Path();
+ private static final RectF bezier3Rect = new RectF();
+ private static final Path bezier3Path = new Path();
+ private static final RectF bezier4Rect = new RectF();
+ private static final Path bezier4Path = new Path();
+ private static final RectF bezier5Rect = new RectF();
+ private static final Path bezier5Path = new Path();
+ private static final RectF bezier6Rect = new RectF();
+ private static final Path bezier6Path = new Path();
+ private static final RectF bezier7Rect = new RectF();
+ private static final Path bezier7Path = new Path();
+ private static final RectF bezier8Rect = new RectF();
+ private static final Path bezier8Path = new Path();
+ private static final RectF bezier9Rect = new RectF();
+ private static final Path bezier9Path = new Path();
+ private static final RectF bezier10Rect = new RectF();
+ private static final Path bezier10Path = new Path();
+ private static final RectF bezier11Rect = new RectF();
+ private static final Path bezier11Path = new Path();
+ private static final RectF bezier12Rect = new RectF();
+ private static final Path bezier12Path = new Path();
+ private static final RectF bezier13Rect = new RectF();
+ private static final Path bezier13Path = new Path();
+ private static final RectF bezier14Rect = new RectF();
+ private static final Path bezier14Path = new Path();
+ private static final RectF bezier15Rect = new RectF();
+ private static final Path bezier15Path = new Path();
+ private static final RectF bezier16Rect = new RectF();
+ private static final Path bezier16Path = new Path();
+ private static final RectF bezier17Rect = new RectF();
+ private static final Path bezier17Path = new Path();
+ private static final RectF bezier18Rect = new RectF();
+ private static final Path bezier18Path = new Path();
}
-
- public static void drawMage(Canvas canvas, boolean darkBackground) {
- HabiticaIcons.drawMage(canvas, new RectF(0f, 0f, 32f, 32f), ResizingBehavior.AspectFit, darkBackground);
- }
-
+
public static void drawMage(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, boolean darkBackground) {
// General Declarations
Paint paint = CacheForMage.paint;
@@ -6413,44 +5748,11 @@ public class HabiticaIcons {
canvas.restore();
}
- private static class CacheForMageDarkBg {
- private static RectF originalFrame = new RectF(0f, 0f, 32f, 32f);
- private static RectF resizedFrame = new RectF();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
- }
-
- public static void drawMageDarkBg(Canvas canvas) {
- HabiticaIcons.drawMageDarkBg(canvas, new RectF(0f, 0f, 32f, 32f), ResizingBehavior.AspectFit);
- }
-
- public static void drawMageDarkBg(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForMageDarkBg.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForMageDarkBg.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 32f, resizedFrame.height() / 32f);
-
- // Symbol
- RectF symbolRect = CacheForMageDarkBg.symbolRect;
- symbolRect.set(0f, 0f, 32f, 32f);
- canvas.save();
- canvas.clipRect(symbolRect);
- canvas.translate(symbolRect.left, symbolRect.top);
- RectF symbolTargetRect = CacheForMageDarkBg.symbolTargetRect;
- symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
- HabiticaIcons.drawMage(canvas, symbolTargetRect, ResizingBehavior.Stretch, true);
- canvas.restore();
-
- canvas.restore();
- }
-
private static class CacheForMageLightBg {
- private static RectF originalFrame = new RectF(0f, 0f, 32f, 32f);
- private static RectF resizedFrame = new RectF();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
+ private static final RectF originalFrame = new RectF(0f, 0f, 32f, 32f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF symbolRect = new RectF();
+ private static final RectF symbolTargetRect = new RectF();
}
public static void drawMageLightBg(Canvas canvas) {
@@ -6480,12 +5782,12 @@ public class HabiticaIcons {
}
private static class CacheForCheckmark {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 16f, 12f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static PaintCodeDashPathEffect bezierPathDashEffect = new PaintCodeDashPathEffect();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 16f, 12f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final PaintCodeDashPathEffect bezierPathDashEffect = new PaintCodeDashPathEffect();
}
public static void drawCheckmark(Canvas canvas, int checkmarkColor, float percentage) {
@@ -6519,7 +5821,7 @@ public class HabiticaIcons {
paint.setFlags(Paint.ANTI_ALIAS_FLAG);
paint.setStrokeWidth(2f);
paint.setStrokeMiter(10f);
- paint.setPathEffect(CacheForCheckmark.bezierPathDashEffect.get(checkmarkVisibility, 20f, 0f));
+ paint.setPathEffect(CacheForCheckmark.bezierPathDashEffect.get(checkmarkVisibility));
canvas.save();
paint.setStyle(Paint.Style.STROKE);
paint.setColor(checkmarkColor);
@@ -6530,27 +5832,27 @@ public class HabiticaIcons {
}
private static class CacheForHourglassShop {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 42f, 53f);
- private static RectF resizedFrame = new RectF();
- private static RectF rectangleRect = new RectF();
- private static Path rectanglePath = new Path();
- private static RectF clipRect = new RectF();
- private static Path clipPath = new Path();
- private static RectF clip2Rect = new RectF();
- private static Path clip2Path = new Path();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
- private static RectF bezier4Rect = new RectF();
- private static Path bezier4Path = new Path();
- private static RectF bezier5Rect = new RectF();
- private static Path bezier5Path = new Path();
- private static RectF bezier6Rect = new RectF();
- private static Path bezier6Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 42f, 53f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF rectangleRect = new RectF();
+ private static final Path rectanglePath = new Path();
+ private static final RectF clipRect = new RectF();
+ private static final Path clipPath = new Path();
+ private static final RectF clip2Rect = new RectF();
+ private static final Path clip2Path = new Path();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final RectF bezier2Rect = new RectF();
+ private static final Path bezier2Path = new Path();
+ private static final RectF bezier3Rect = new RectF();
+ private static final Path bezier3Path = new Path();
+ private static final RectF bezier4Rect = new RectF();
+ private static final Path bezier4Path = new Path();
+ private static final RectF bezier5Rect = new RectF();
+ private static final Path bezier5Path = new Path();
+ private static final RectF bezier6Rect = new RectF();
+ private static final Path bezier6Path = new Path();
}
public static void drawHourglassShop(Canvas canvas) {
@@ -6791,17 +6093,17 @@ public class HabiticaIcons {
}
private static class CacheForAttributeSparklesLeft {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 77f, 24f);
- private static RectF resizedFrame = new RectF();
- private static RectF starRect = new RectF();
- private static Path starPath = new Path();
- private static RectF star2Rect = new RectF();
- private static Path star2Path = new Path();
- private static RectF star3Rect = new RectF();
- private static Path star3Path = new Path();
- private static RectF star4Rect = new RectF();
- private static Path star4Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 77f, 24f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF starRect = new RectF();
+ private static final Path starPath = new Path();
+ private static final RectF star2Rect = new RectF();
+ private static final Path star2Path = new Path();
+ private static final RectF star3Rect = new RectF();
+ private static final Path star3Path = new Path();
+ private static final RectF star4Rect = new RectF();
+ private static final Path star4Path = new Path();
}
public static void drawAttributeSparklesLeft(Canvas canvas) {
@@ -6917,17 +6219,17 @@ public class HabiticaIcons {
}
private static class CacheForAttributeSparklesRight {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 77f, 24f);
- private static RectF resizedFrame = new RectF();
- private static RectF starRect = new RectF();
- private static Path starPath = new Path();
- private static RectF star2Rect = new RectF();
- private static Path star2Path = new Path();
- private static RectF star3Rect = new RectF();
- private static Path star3Path = new Path();
- private static RectF star4Rect = new RectF();
- private static Path star4Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 77f, 24f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF starRect = new RectF();
+ private static final Path starPath = new Path();
+ private static final RectF star2Rect = new RectF();
+ private static final Path star2Path = new Path();
+ private static final RectF star3Rect = new RectF();
+ private static final Path star3Path = new Path();
+ private static final RectF star4Rect = new RectF();
+ private static final Path star4Path = new Path();
}
public static void drawAttributeSparklesRight(Canvas canvas) {
@@ -7043,11 +6345,11 @@ public class HabiticaIcons {
}
private static class CacheForAttributeAllocateButton {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 24f, 15f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 24f, 15f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
}
public static void drawAttributeAllocateButton(Canvas canvas) {
@@ -7090,11 +6392,11 @@ public class HabiticaIcons {
}
private static class CacheForInfoIcon {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 20f, 20f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 20f, 20f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
}
public static void drawInfoIcon(Canvas canvas, int infoIconColor) {
@@ -7155,29 +6457,29 @@ public class HabiticaIcons {
}
private static class CacheForContributorBadge {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 16f, 16f);
- private static RectF resizedFrame = new RectF();
- private static RectF tier1Rect = new RectF();
- private static Path tier1Path = new Path();
- private static RectF tier2Rect = new RectF();
- private static Path tier2Path = new Path();
- private static RectF tier3Rect = new RectF();
- private static Path tier3Path = new Path();
- private static RectF tier4Rect = new RectF();
- private static Path tier4Path = new Path();
- private static RectF tier5Rect = new RectF();
- private static Path tier5Path = new Path();
- private static RectF tier6Rect = new RectF();
- private static Path tier6Path = new Path();
- private static RectF tier7Rect = new RectF();
- private static Path tier7Path = new Path();
- private static RectF tierModRect = new RectF();
- private static Path tierModPath = new Path();
- private static RectF tierStaffRect = new RectF();
- private static Path tierStaffPath = new Path();
- private static RectF bezier4Rect = new RectF();
- private static Path bezier4Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 16f, 16f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF tier1Rect = new RectF();
+ private static final Path tier1Path = new Path();
+ private static final RectF tier2Rect = new RectF();
+ private static final Path tier2Path = new Path();
+ private static final RectF tier3Rect = new RectF();
+ private static final Path tier3Path = new Path();
+ private static final RectF tier4Rect = new RectF();
+ private static final Path tier4Path = new Path();
+ private static final RectF tier5Rect = new RectF();
+ private static final Path tier5Path = new Path();
+ private static final RectF tier6Rect = new RectF();
+ private static final Path tier6Path = new Path();
+ private static final RectF tier7Rect = new RectF();
+ private static final Path tier7Path = new Path();
+ private static final RectF tierModRect = new RectF();
+ private static final Path tierModPath = new Path();
+ private static final RectF tierStaffRect = new RectF();
+ private static final Path tierStaffPath = new Path();
+ private static final RectF bezier4Rect = new RectF();
+ private static final Path bezier4Path = new Path();
}
public static void drawContributorBadge(Canvas canvas, float _1, boolean isNPC) {
@@ -7186,7 +6488,7 @@ public class HabiticaIcons {
public static void drawContributorBadge(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, float _1, boolean isNPC) {
// General Declarations
- Stack currentTransformation = new Stack();
+ Stack currentTransformation = new Stack<>();
currentTransformation.push(new Matrix());
Paint paint = CacheForContributorBadge.paint;
@@ -7547,118 +6849,42 @@ public class HabiticaIcons {
canvas.restore();
}
- private static class CacheForChatLikeIcon {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 12f, 12f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- }
-
- public static void drawChatLikeIcon(Canvas canvas, boolean wasLiked) {
- HabiticaIcons.drawChatLikeIcon(canvas, new RectF(0f, 0f, 12f, 12f), ResizingBehavior.AspectFit, wasLiked);
- }
-
- public static void drawChatLikeIcon(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, boolean wasLiked) {
- // General Declarations
- Paint paint = CacheForChatLikeIcon.paint;
-
- // Local Colors
- int fillColor25 = Color.argb(255, 225, 224, 227);
- int fillColor82 = Color.argb(255, 154, 98, 255);
-
- // Local Variables
- int expression2 = wasLiked ? fillColor82 : fillColor25;
-
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForChatLikeIcon.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForChatLikeIcon.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 12f, resizedFrame.height() / 12f);
-
- // Bezier
- RectF bezierRect = CacheForChatLikeIcon.bezierRect;
- bezierRect.set(0f, 0f, 12f, 12f);
- Path bezierPath = CacheForChatLikeIcon.bezierPath;
- bezierPath.reset();
- bezierPath.moveTo(8.25f, 7.5f);
- bezierPath.cubicTo(8.25f, 8.74f, 7.24f, 9.75f, 6f, 9.75f);
- bezierPath.cubicTo(4.76f, 9.75f, 3.75f, 8.74f, 3.75f, 7.5f);
- bezierPath.lineTo(8.25f, 7.5f);
- bezierPath.close();
- bezierPath.moveTo(9.75f, 4.88f);
- bezierPath.cubicTo(9.75f, 5.5f, 9.25f, 6f, 8.63f, 6f);
- bezierPath.cubicTo(8f, 6f, 7.5f, 5.5f, 7.5f, 4.88f);
- bezierPath.cubicTo(7.5f, 4.25f, 8f, 3.75f, 8.63f, 3.75f);
- bezierPath.cubicTo(9.25f, 3.75f, 9.75f, 4.25f, 9.75f, 4.88f);
- bezierPath.lineTo(9.75f, 4.88f);
- bezierPath.close();
- bezierPath.moveTo(4.5f, 4.88f);
- bezierPath.cubicTo(4.5f, 5.5f, 4f, 6f, 3.38f, 6f);
- bezierPath.cubicTo(2.75f, 6f, 2.25f, 5.5f, 2.25f, 4.88f);
- bezierPath.cubicTo(2.25f, 4.25f, 2.75f, 3.75f, 3.38f, 3.75f);
- bezierPath.cubicTo(4f, 3.75f, 4.5f, 4.25f, 4.5f, 4.88f);
- bezierPath.lineTo(4.5f, 4.88f);
- bezierPath.close();
- bezierPath.moveTo(10.5f, 0f);
- bezierPath.lineTo(1.5f, 0f);
- bezierPath.cubicTo(0.67f, 0f, 0f, 0.67f, 0f, 1.5f);
- bezierPath.lineTo(0f, 10.5f);
- bezierPath.cubicTo(0f, 11.33f, 0.67f, 12f, 1.5f, 12f);
- bezierPath.lineTo(10.5f, 12f);
- bezierPath.cubicTo(11.33f, 12f, 12f, 11.33f, 12f, 10.5f);
- bezierPath.lineTo(12f, 1.5f);
- bezierPath.cubicTo(12f, 0.67f, 11.33f, 0f, 10.5f, 0f);
- bezierPath.lineTo(10.5f, 0f);
- bezierPath.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- bezierPath.setFillType(Path.FillType.EVEN_ODD);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(expression2);
- canvas.drawPath(bezierPath, paint);
-
- canvas.restore();
- }
-
private static class CacheForQuestBackground {
- private static Paint paint = new Paint();
- private static RectF rectangleRect = new RectF();
- private static Path rectanglePath = new Path();
- private static RectF group = new RectF();
- private static RectF rectangle2Rect = new RectF();
- private static Path rectangle2Path = new Path();
- private static RectF rectangle3Rect = new RectF();
- private static Path rectangle3Path = new Path();
- private static RectF group2 = new RectF();
- private static RectF rectangle4Rect = new RectF();
- private static Path rectangle4Path = new Path();
- private static RectF rectangle5Rect = new RectF();
- private static Path rectangle5Path = new Path();
- private static RectF group3 = new RectF();
- private static RectF rectangle6Rect = new RectF();
- private static Path rectangle6Path = new Path();
- private static RectF rectangle7Rect = new RectF();
- private static Path rectangle7Path = new Path();
- private static RectF group4 = new RectF();
- private static RectF rectangle8Rect = new RectF();
- private static Path rectangle8Path = new Path();
- private static RectF rectangle9Rect = new RectF();
- private static Path rectangle9Path = new Path();
- private static RectF rectangle10Rect = new RectF();
- private static Path rectangle10Path = new Path();
- private static RectF rectangle11Rect = new RectF();
- private static Path rectangle11Path = new Path();
- private static RectF rectangle12Rect = new RectF();
- private static Path rectangle12Path = new Path();
- private static RectF rectangle13Rect = new RectF();
- private static Path rectangle13Path = new Path();
- private static RectF rectangle14Rect = new RectF();
- private static Path rectangle14Path = new Path();
- private static RectF rectangle15Rect = new RectF();
- private static Path rectangle15Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF rectangleRect = new RectF();
+ private static final Path rectanglePath = new Path();
+ private static final RectF group = new RectF();
+ private static final RectF rectangle2Rect = new RectF();
+ private static final Path rectangle2Path = new Path();
+ private static final RectF rectangle3Rect = new RectF();
+ private static final Path rectangle3Path = new Path();
+ private static final RectF group2 = new RectF();
+ private static final RectF rectangle4Rect = new RectF();
+ private static final Path rectangle4Path = new Path();
+ private static final RectF rectangle5Rect = new RectF();
+ private static final Path rectangle5Path = new Path();
+ private static final RectF group3 = new RectF();
+ private static final RectF rectangle6Rect = new RectF();
+ private static final Path rectangle6Path = new Path();
+ private static final RectF rectangle7Rect = new RectF();
+ private static final Path rectangle7Path = new Path();
+ private static final RectF group4 = new RectF();
+ private static final RectF rectangle8Rect = new RectF();
+ private static final Path rectangle8Path = new Path();
+ private static final RectF rectangle9Rect = new RectF();
+ private static final Path rectangle9Path = new Path();
+ private static final RectF rectangle10Rect = new RectF();
+ private static final Path rectangle10Path = new Path();
+ private static final RectF rectangle11Rect = new RectF();
+ private static final Path rectangle11Path = new Path();
+ private static final RectF rectangle12Rect = new RectF();
+ private static final Path rectangle12Path = new Path();
+ private static final RectF rectangle13Rect = new RectF();
+ private static final Path rectangle13Path = new Path();
+ private static final RectF rectangle14Rect = new RectF();
+ private static final Path rectangle14Path = new Path();
+ private static final RectF rectangle15Rect = new RectF();
+ private static final Path rectangle15Path = new Path();
}
@@ -8004,51 +7230,51 @@ public class HabiticaIcons {
}
private static class CacheForDamage {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 18f, 18f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF rectangleRect = new RectF();
- private static Path rectanglePath = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
- private static RectF bezier4Rect = new RectF();
- private static Path bezier4Path = new Path();
- private static RectF bezier5Rect = new RectF();
- private static Path bezier5Path = new Path();
- private static RectF bezier6Rect = new RectF();
- private static Path bezier6Path = new Path();
- private static RectF bezier7Rect = new RectF();
- private static Path bezier7Path = new Path();
- private static RectF bezier8Rect = new RectF();
- private static Path bezier8Path = new Path();
- private static RectF bezier9Rect = new RectF();
- private static Path bezier9Path = new Path();
- private static RectF bezier10Rect = new RectF();
- private static Path bezier10Path = new Path();
- private static RectF bezier11Rect = new RectF();
- private static Path bezier11Path = new Path();
- private static RectF bezier12Rect = new RectF();
- private static Path bezier12Path = new Path();
- private static RectF rectangle2Rect = new RectF();
- private static Path rectangle2Path = new Path();
- private static RectF rectangle3Rect = new RectF();
- private static Path rectangle3Path = new Path();
- private static RectF rectangle4Rect = new RectF();
- private static Path rectangle4Path = new Path();
- private static RectF bezier13Rect = new RectF();
- private static Path bezier13Path = new Path();
- private static RectF bezier14Rect = new RectF();
- private static Path bezier14Path = new Path();
- private static RectF bezier15Rect = new RectF();
- private static Path bezier15Path = new Path();
- private static RectF group3 = new RectF();
- private static Path clipPath = new Path();
- private static RectF bezier16Rect = new RectF();
- private static Path bezier16Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 18f, 18f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final RectF bezier2Rect = new RectF();
+ private static final Path bezier2Path = new Path();
+ private static final RectF rectangleRect = new RectF();
+ private static final Path rectanglePath = new Path();
+ private static final RectF bezier3Rect = new RectF();
+ private static final Path bezier3Path = new Path();
+ private static final RectF bezier4Rect = new RectF();
+ private static final Path bezier4Path = new Path();
+ private static final RectF bezier5Rect = new RectF();
+ private static final Path bezier5Path = new Path();
+ private static final RectF bezier6Rect = new RectF();
+ private static final Path bezier6Path = new Path();
+ private static final RectF bezier7Rect = new RectF();
+ private static final Path bezier7Path = new Path();
+ private static final RectF bezier8Rect = new RectF();
+ private static final Path bezier8Path = new Path();
+ private static final RectF bezier9Rect = new RectF();
+ private static final Path bezier9Path = new Path();
+ private static final RectF bezier10Rect = new RectF();
+ private static final Path bezier10Path = new Path();
+ private static final RectF bezier11Rect = new RectF();
+ private static final Path bezier11Path = new Path();
+ private static final RectF bezier12Rect = new RectF();
+ private static final Path bezier12Path = new Path();
+ private static final RectF rectangle2Rect = new RectF();
+ private static final Path rectangle2Path = new Path();
+ private static final RectF rectangle3Rect = new RectF();
+ private static final Path rectangle3Path = new Path();
+ private static final RectF rectangle4Rect = new RectF();
+ private static final Path rectangle4Path = new Path();
+ private static final RectF bezier13Rect = new RectF();
+ private static final Path bezier13Path = new Path();
+ private static final RectF bezier14Rect = new RectF();
+ private static final Path bezier14Path = new Path();
+ private static final RectF bezier15Rect = new RectF();
+ private static final Path bezier15Path = new Path();
+ private static final RectF group3 = new RectF();
+ private static final Path clipPath = new Path();
+ private static final RectF bezier16Rect = new RectF();
+ private static final Path bezier16Path = new Path();
}
public static void drawDamage(Canvas canvas) {
@@ -8057,7 +7283,7 @@ public class HabiticaIcons {
public static void drawDamage(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
// General Declarations
- Stack currentTransformation = new Stack();
+ Stack currentTransformation = new Stack<>();
currentTransformation.push(new Matrix());
Paint paint = CacheForDamage.paint;
@@ -8564,11 +7790,11 @@ public class HabiticaIcons {
}
private static class CacheForCaret {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 16f, 16f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 16f, 16f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
}
public static void drawCaret(Canvas canvas, int caretColor, boolean pointsUp) {
@@ -8577,7 +7803,7 @@ public class HabiticaIcons {
public static void drawCaret(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, int caretColor, boolean pointsUp) {
// General Declarations
- Stack currentTransformation = new Stack();
+ Stack currentTransformation = new Stack<>();
currentTransformation.push(new Matrix());
Paint paint = CacheForCaret.paint;
@@ -8624,17 +7850,17 @@ public class HabiticaIcons {
}
private static class CacheForRageStrikeInactive {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 63f, 82f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF bezier4Rect = new RectF();
- private static Path bezier4Path = new Path();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF labelRect = new RectF();
- private static Path labelPath = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 63f, 82f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezier2Rect = new RectF();
+ private static final Path bezier2Path = new Path();
+ private static final RectF bezier4Rect = new RectF();
+ private static final Path bezier4Path = new Path();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final RectF labelRect = new RectF();
+ private static final Path labelPath = new Path();
}
public static void drawRageStrikeInactive(Canvas canvas) {
@@ -8791,15 +8017,15 @@ public class HabiticaIcons {
}
private static class CacheForRageStrikeActive {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 63f, 82f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 63f, 82f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final RectF bezier3Rect = new RectF();
+ private static final Path bezier3Path = new Path();
+ private static final RectF bezier2Rect = new RectF();
+ private static final Path bezier2Path = new Path();
}
public static void drawRageStrikeActive(Canvas canvas, Context context, Bitmap rageStrikeNPC) {
@@ -8909,37 +8135,37 @@ public class HabiticaIcons {
}
private static class CacheForRage {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 18f, 18f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
- private static RectF bezier4Rect = new RectF();
- private static Path bezier4Path = new Path();
- private static RectF bezier5Rect = new RectF();
- private static Path bezier5Path = new Path();
- private static RectF bezier6Rect = new RectF();
- private static Path bezier6Path = new Path();
- private static RectF bezier7Rect = new RectF();
- private static Path bezier7Path = new Path();
- private static RectF bezier8Rect = new RectF();
- private static Path bezier8Path = new Path();
- private static RectF bezier9Rect = new RectF();
- private static Path bezier9Path = new Path();
- private static RectF bezier10Rect = new RectF();
- private static Path bezier10Path = new Path();
- private static RectF bezier11Rect = new RectF();
- private static Path bezier11Path = new Path();
- private static RectF bezier12Rect = new RectF();
- private static Path bezier12Path = new Path();
- private static RectF bezier13Rect = new RectF();
- private static Path bezier13Path = new Path();
- private static RectF bezier14Rect = new RectF();
- private static Path bezier14Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 18f, 18f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final RectF bezier2Rect = new RectF();
+ private static final Path bezier2Path = new Path();
+ private static final RectF bezier3Rect = new RectF();
+ private static final Path bezier3Path = new Path();
+ private static final RectF bezier4Rect = new RectF();
+ private static final Path bezier4Path = new Path();
+ private static final RectF bezier5Rect = new RectF();
+ private static final Path bezier5Path = new Path();
+ private static final RectF bezier6Rect = new RectF();
+ private static final Path bezier6Path = new Path();
+ private static final RectF bezier7Rect = new RectF();
+ private static final Path bezier7Path = new Path();
+ private static final RectF bezier8Rect = new RectF();
+ private static final Path bezier8Path = new Path();
+ private static final RectF bezier9Rect = new RectF();
+ private static final Path bezier9Path = new Path();
+ private static final RectF bezier10Rect = new RectF();
+ private static final Path bezier10Path = new Path();
+ private static final RectF bezier11Rect = new RectF();
+ private static final Path bezier11Path = new Path();
+ private static final RectF bezier12Rect = new RectF();
+ private static final Path bezier12Path = new Path();
+ private static final RectF bezier13Rect = new RectF();
+ private static final Path bezier13Path = new Path();
+ private static final RectF bezier14Rect = new RectF();
+ private static final Path bezier14Path = new Path();
}
public static void drawRage(Canvas canvas) {
@@ -9235,28 +8461,28 @@ public class HabiticaIcons {
}
private static class CacheForTaskDifficultyStars {
- private static RectF originalFrame = new RectF(0f, 0f, 36f, 36f);
- private static RectF resizedFrame = new RectF();
- private static RectF symbol2Rect = new RectF();
- private static RectF symbol2TargetRect = new RectF();
- private static RectF symbol3Rect = new RectF();
- private static RectF symbol3TargetRect = new RectF();
- private static RectF symbol4Rect = new RectF();
- private static RectF symbol4TargetRect = new RectF();
- private static RectF symbol5Rect = new RectF();
- private static RectF symbol5TargetRect = new RectF();
- private static RectF symbol6Rect = new RectF();
- private static RectF symbol6TargetRect = new RectF();
- private static RectF symbol7Rect = new RectF();
- private static RectF symbol7TargetRect = new RectF();
- private static RectF symbol8Rect = new RectF();
- private static RectF symbol8TargetRect = new RectF();
- private static RectF symbol9Rect = new RectF();
- private static RectF symbol9TargetRect = new RectF();
- private static RectF symbol10Rect = new RectF();
- private static RectF symbol10TargetRect = new RectF();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
+ private static final RectF originalFrame = new RectF(0f, 0f, 36f, 36f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF symbol2Rect = new RectF();
+ private static final RectF symbol2TargetRect = new RectF();
+ private static final RectF symbol3Rect = new RectF();
+ private static final RectF symbol3TargetRect = new RectF();
+ private static final RectF symbol4Rect = new RectF();
+ private static final RectF symbol4TargetRect = new RectF();
+ private static final RectF symbol5Rect = new RectF();
+ private static final RectF symbol5TargetRect = new RectF();
+ private static final RectF symbol6Rect = new RectF();
+ private static final RectF symbol6TargetRect = new RectF();
+ private static final RectF symbol7Rect = new RectF();
+ private static final RectF symbol7TargetRect = new RectF();
+ private static final RectF symbol8Rect = new RectF();
+ private static final RectF symbol8TargetRect = new RectF();
+ private static final RectF symbol9Rect = new RectF();
+ private static final RectF symbol9TargetRect = new RectF();
+ private static final RectF symbol10Rect = new RectF();
+ private static final RectF symbol10TargetRect = new RectF();
+ private static final RectF symbolRect = new RectF();
+ private static final RectF symbolTargetRect = new RectF();
}
public static void drawTaskDifficultyStars(Canvas canvas, int taskTintColor, float difficulty, boolean isActive) {
@@ -9402,17 +8628,13 @@ public class HabiticaIcons {
}
private static class CacheForTaskFormDifficultyStar {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 16f, 16f);
- private static RectF resizedFrame = new RectF();
- private static RectF star3Rect = new RectF();
- private static Path star3Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 16f, 16f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF star3Rect = new RectF();
+ private static final Path star3Path = new Path();
}
-
- public static void drawTaskFormDifficultyStar(Canvas canvas, int taskTintColor, boolean isActive) {
- HabiticaIcons.drawTaskFormDifficultyStar(canvas, new RectF(0f, 0f, 16f, 16f), ResizingBehavior.AspectFit, taskTintColor, isActive);
- }
-
+
public static void drawTaskFormDifficultyStar(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, int taskTintColor, boolean isActive) {
// General Declarations
Paint paint = CacheForTaskFormDifficultyStar.paint;
@@ -9467,192 +8689,22 @@ public class HabiticaIcons {
canvas.restore();
}
- private static class CacheForHabitControlPlus {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 34f, 34f);
- private static RectF resizedFrame = new RectF();
- private static RectF ovalRect = new RectF();
- private static Path ovalPath = new Path();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- }
-
- public static void drawHabitControlPlus(Canvas canvas, int taskTintColor, boolean isActive) {
- HabiticaIcons.drawHabitControlPlus(canvas, new RectF(0f, 0f, 34f, 34f), ResizingBehavior.AspectFit, taskTintColor, isActive);
- }
-
- public static void drawHabitControlPlus(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, int taskTintColor, boolean isActive) {
- // General Declarations
- Paint paint = CacheForHabitControlPlus.paint;
-
- // Local Colors
- int fillColor37 = Color.argb(255, 255, 255, 255);
- int transparent = Color.argb(0, 204, 82, 82);
- int strokeColor15 = Color.argb(255, 195, 192, 199);
-
- // Local Variables
- int controlFillColor = isActive ? fillColor37 : strokeColor15;
- int starFillColor = isActive ? taskTintColor : transparent;
- int borderColor = isActive ? taskTintColor : strokeColor15;
-
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForHabitControlPlus.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForHabitControlPlus.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 34f, resizedFrame.height() / 34f);
-
- // Oval
- RectF ovalRect = CacheForHabitControlPlus.ovalRect;
- ovalRect.set(1f, 1f, 33f, 33f);
- Path ovalPath = CacheForHabitControlPlus.ovalPath;
- ovalPath.reset();
- ovalPath.addOval(ovalRect, Path.Direction.CW);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(starFillColor);
- canvas.drawPath(ovalPath, paint);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(1f);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(borderColor);
- canvas.drawPath(ovalPath, paint);
- canvas.restore();
-
- // Bezier
- RectF bezierRect = CacheForHabitControlPlus.bezierRect;
- bezierRect.set(10f, 10f, 24f, 24f);
- Path bezierPath = CacheForHabitControlPlus.bezierPath;
- bezierPath.reset();
- bezierPath.moveTo(16f, 16f);
- bezierPath.lineTo(16f, 10f);
- bezierPath.lineTo(18f, 10f);
- bezierPath.lineTo(18f, 16f);
- bezierPath.lineTo(24f, 16f);
- bezierPath.lineTo(24f, 18f);
- bezierPath.lineTo(18f, 18f);
- bezierPath.lineTo(18f, 24f);
- bezierPath.lineTo(16f, 24f);
- bezierPath.lineTo(16f, 18f);
- bezierPath.lineTo(10f, 18f);
- bezierPath.lineTo(10f, 16f);
- bezierPath.lineTo(16f, 16f);
- bezierPath.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- bezierPath.setFillType(Path.FillType.EVEN_ODD);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(controlFillColor);
- canvas.drawPath(bezierPath, paint);
-
- canvas.restore();
- }
-
- private static class CacheForHabitControlMinus {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 34f, 34f);
- private static RectF resizedFrame = new RectF();
- private static RectF ovalRect = new RectF();
- private static Path ovalPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- }
-
- public static void drawHabitControlMinus(Canvas canvas, int taskTintColor, boolean isActive) {
- HabiticaIcons.drawHabitControlMinus(canvas, new RectF(0f, 0f, 34f, 34f), ResizingBehavior.AspectFit, taskTintColor, isActive);
- }
-
- public static void drawHabitControlMinus(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, int taskTintColor, boolean isActive) {
- // General Declarations
- Paint paint = CacheForHabitControlMinus.paint;
-
- // Local Colors
- int fillColor37 = Color.argb(255, 255, 255, 255);
- int transparent = Color.argb(0, 204, 82, 82);
- int strokeColor15 = Color.argb(255, 195, 192, 199);
-
- // Local Variables
- int controlFillColor = isActive ? fillColor37 : strokeColor15;
- int starFillColor = isActive ? taskTintColor : transparent;
- int borderColor = isActive ? taskTintColor : strokeColor15;
-
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForHabitControlMinus.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForHabitControlMinus.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 34f, resizedFrame.height() / 34f);
-
- // Oval
- RectF ovalRect = CacheForHabitControlMinus.ovalRect;
- ovalRect.set(1f, 1f, 33f, 33f);
- Path ovalPath = CacheForHabitControlMinus.ovalPath;
- ovalPath.reset();
- ovalPath.addOval(ovalRect, Path.Direction.CW);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(starFillColor);
- canvas.drawPath(ovalPath, paint);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(1f);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(borderColor);
- canvas.drawPath(ovalPath, paint);
- canvas.restore();
-
- // Bezier 2
- RectF bezier2Rect = CacheForHabitControlMinus.bezier2Rect;
- bezier2Rect.set(10f, 16f, 24f, 17.96f);
- Path bezier2Path = CacheForHabitControlMinus.bezier2Path;
- bezier2Path.reset();
- bezier2Path.moveTo(10f, 17.96f);
- bezier2Path.lineTo(24f, 17.96f);
- bezier2Path.lineTo(24f, 16f);
- bezier2Path.lineTo(10f, 16f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- bezier2Path.setFillType(Path.FillType.EVEN_ODD);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(controlFillColor);
- canvas.drawPath(bezier2Path, paint);
-
- canvas.restore();
- }
-
private static class CacheForLocked {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 15f, 17f);
- private static RectF resizedFrame = new RectF();
- private static RectF rectangleRect = new RectF();
- private static Path rectanglePath = new Path();
- private static RectF group = new RectF();
- private static Path clipPath = new Path();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF group2 = new RectF();
- private static Path clip2Path = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 15f, 17f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF rectangleRect = new RectF();
+ private static final Path rectanglePath = new Path();
+ private static final RectF group = new RectF();
+ private static final Path clipPath = new Path();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final RectF group2 = new RectF();
+ private static final Path clip2Path = new Path();
+ private static final RectF bezier3Rect = new RectF();
+ private static final Path bezier3Path = new Path();
}
-
- public static void drawLocked(Canvas canvas, int lockColor) {
- HabiticaIcons.drawLocked(canvas, new RectF(0f, 0f, 15f, 17f), ResizingBehavior.AspectFit, lockColor);
- }
-
+
public static void drawLocked(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, int lockColor) {
// General Declarations
Paint paint = CacheForLocked.paint;
@@ -9780,59 +8832,59 @@ public class HabiticaIcons {
}
private static class CacheForGuildCrest {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 40f, 38f);
- private static RectF resizedFrame = new RectF();
- private static RectF group = new RectF();
- private static Path clip5Path = new Path();
- private static RectF rectangleRect = new RectF();
- private static Path rectanglePath = new Path();
- private static RectF rectangle2Rect = new RectF();
- private static Path rectangle2Path = new Path();
- private static RectF rectangle4Rect = new RectF();
- private static Path rectangle4Path = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF bezier4Rect = new RectF();
- private static Path bezier4Path = new Path();
- private static RectF bezier7Rect = new RectF();
- private static Path bezier7Path = new Path();
- private static RectF bezier8Rect = new RectF();
- private static Path bezier8Path = new Path();
- private static RectF group8 = new RectF();
- private static Path clip14Path = new Path();
- private static RectF rectangle3Rect = new RectF();
- private static Path rectangle3Path = new Path();
- private static RectF rectangle8Rect = new RectF();
- private static Path rectangle8Path = new Path();
- private static RectF rectangle5Rect = new RectF();
- private static Path rectangle5Path = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
- private static RectF bezier6Rect = new RectF();
- private static Path bezier6Path = new Path();
- private static RectF bezier14Rect = new RectF();
- private static Path bezier14Path = new Path();
- private static RectF bezier15Rect = new RectF();
- private static Path bezier15Path = new Path();
- private static RectF bezier13Rect = new RectF();
- private static Path bezier13Path = new Path();
- private static RectF bezier10Rect = new RectF();
- private static Path bezier10Path = new Path();
- private static RectF bezier11Rect = new RectF();
- private static Path bezier11Path = new Path();
- private static RectF labelRect = new RectF();
- private static TextPaint labelTextPaint = new TextPaint();
- private static PaintCodeStaticLayout labelStaticLayout = new PaintCodeStaticLayout();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 40f, 38f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF group = new RectF();
+ private static final Path clip5Path = new Path();
+ private static final RectF rectangleRect = new RectF();
+ private static final Path rectanglePath = new Path();
+ private static final RectF rectangle2Rect = new RectF();
+ private static final Path rectangle2Path = new Path();
+ private static final RectF rectangle4Rect = new RectF();
+ private static final Path rectangle4Path = new Path();
+ private static final RectF bezier2Rect = new RectF();
+ private static final Path bezier2Path = new Path();
+ private static final RectF bezier4Rect = new RectF();
+ private static final Path bezier4Path = new Path();
+ private static final RectF bezier7Rect = new RectF();
+ private static final Path bezier7Path = new Path();
+ private static final RectF bezier8Rect = new RectF();
+ private static final Path bezier8Path = new Path();
+ private static final RectF group8 = new RectF();
+ private static final Path clip14Path = new Path();
+ private static final RectF rectangle3Rect = new RectF();
+ private static final Path rectangle3Path = new Path();
+ private static final RectF rectangle8Rect = new RectF();
+ private static final Path rectangle8Path = new Path();
+ private static final RectF rectangle5Rect = new RectF();
+ private static final Path rectangle5Path = new Path();
+ private static final RectF bezier3Rect = new RectF();
+ private static final Path bezier3Path = new Path();
+ private static final RectF bezier6Rect = new RectF();
+ private static final Path bezier6Path = new Path();
+ private static final RectF bezier14Rect = new RectF();
+ private static final Path bezier14Path = new Path();
+ private static final RectF bezier15Rect = new RectF();
+ private static final Path bezier15Path = new Path();
+ private static final RectF bezier13Rect = new RectF();
+ private static final Path bezier13Path = new Path();
+ private static final RectF bezier10Rect = new RectF();
+ private static final Path bezier10Path = new Path();
+ private static final RectF bezier11Rect = new RectF();
+ private static final Path bezier11Path = new Path();
+ private static final RectF labelRect = new RectF();
+ private static final TextPaint labelTextPaint = new TextPaint();
+ private static final PaintCodeStaticLayout labelStaticLayout = new PaintCodeStaticLayout();
}
- public static void drawGuildCrest(Canvas canvas, Context context, boolean isOwner, boolean isPublic, float memberCount, String memberCountLabel) {
- HabiticaIcons.drawGuildCrest(canvas, context, new RectF(0f, 0f, 40f, 38f), ResizingBehavior.AspectFit, isOwner, isPublic, memberCount, memberCountLabel);
+ public static void drawGuildCrest(Canvas canvas, boolean isOwner, boolean isPublic, float memberCount, String memberCountLabel) {
+ HabiticaIcons.drawGuildCrest(canvas, new RectF(0f, 0f, 40f, 38f), ResizingBehavior.AspectFit, isOwner, isPublic, memberCount, memberCountLabel);
}
- public static void drawGuildCrest(Canvas canvas, Context context, RectF targetFrame, ResizingBehavior resizing, boolean isOwner, boolean isPublic, float memberCount, String memberCountLabel) {
+ public static void drawGuildCrest(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, boolean isOwner, boolean isPublic, float memberCount, String memberCountLabel) {
// General Declarations
- Stack currentTransformation = new Stack();
+ Stack currentTransformation = new Stack<>();
currentTransformation.push(new Matrix());
Paint paint = CacheForGuildCrest.paint;
@@ -10323,7 +9375,7 @@ public class HabiticaIcons {
labelTextPaint.setFlags(Paint.ANTI_ALIAS_FLAG);
labelTextPaint.setColor(crestColor5);
labelTextPaint.setTextSize(12f);
- StaticLayout labelStaticLayout = CacheForGuildCrest.labelStaticLayout.get((int) labelRect.width(), Layout.Alignment.ALIGN_CENTER, memberCountLabel, labelTextPaint);
+ StaticLayout labelStaticLayout = CacheForGuildCrest.labelStaticLayout.get((int) labelRect.width(), memberCountLabel, labelTextPaint);
canvas.save();
canvas.clipRect(labelRect);
canvas.translate(labelRect.left, labelRect.top + (labelRect.height() - labelStaticLayout.getHeight()) / 2f);
@@ -10547,13 +9599,13 @@ public class HabiticaIcons {
}
private static class CacheForGuildCrestSmall {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 16f, 16f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 16f, 16f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final RectF bezier2Rect = new RectF();
+ private static final Path bezier2Path = new Path();
}
public static void drawGuildCrestSmall(Canvas canvas, float memberCount) {
@@ -10631,594 +9683,12 @@ public class HabiticaIcons {
canvas.restore();
}
- private static class CacheForGuildHeaderCrest {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 116f, 58f);
- private static RectF resizedFrame = new RectF();
- private static RectF group6 = new RectF();
- private static Path clip6Path = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
- private static RectF group11 = new RectF();
- private static Path clip13Path = new Path();
- private static RectF rectangleRect = new RectF();
- private static Path rectanglePath = new Path();
- private static RectF rectangle2Rect = new RectF();
- private static Path rectangle2Path = new Path();
- private static RectF rectangle5Rect = new RectF();
- private static Path rectangle5Path = new Path();
- private static RectF bezier10Rect = new RectF();
- private static Path bezier10Path = new Path();
- private static RectF bezier13Rect = new RectF();
- private static Path bezier13Path = new Path();
- private static RectF bezier14Rect = new RectF();
- private static Path bezier14Path = new Path();
- private static RectF bezier16Rect = new RectF();
- private static Path bezier16Path = new Path();
- private static RectF bezier17Rect = new RectF();
- private static Path bezier17Path = new Path();
- private static RectF bezier18Rect = new RectF();
- private static Path bezier18Path = new Path();
- private static RectF bezier19Rect = new RectF();
- private static Path bezier19Path = new Path();
- private static RectF bezier20Rect = new RectF();
- private static Path bezier20Path = new Path();
- private static RectF rectangle9Rect = new RectF();
- private static Path rectangle9Path = new Path();
- private static RectF label2Rect = new RectF();
- private static Path label2Path = new Path();
- }
-
- public static void drawGuildHeaderCrest(Canvas canvas, int guildHeader) {
- HabiticaIcons.drawGuildHeaderCrest(canvas, new RectF(0f, 0f, 116f, 58f), ResizingBehavior.AspectFit, guildHeader);
- }
-
- public static void drawGuildHeaderCrest(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, int guildHeader) {
- // General Declarations
- Stack currentTransformation = new Stack();
- currentTransformation.push(new Matrix());
- Paint paint = CacheForGuildHeaderCrest.paint;
-
- // Local Colors
- int guildHeaderDark3 = PaintCodeColor.colorByChangingValue(guildHeader, 1f);
- int guildHeaderDark4 = PaintCodeColor.colorByApplyingHighlight(guildHeaderDark3, 0.15f);
- int guildHeaderDark5 = PaintCodeColor.colorByApplyingHighlight(guildHeaderDark3, 0.7f);
- int guildHeaderDark2 = PaintCodeColor.colorByChangingValue(guildHeader, 0.7f);
- int guildHeaderDark6 = PaintCodeColor.colorByApplyingHighlight(guildHeaderDark2, 0.3f);
- int guildHeaderDark8 = PaintCodeColor.colorByApplyingHighlight(guildHeaderDark2, 0.4f);
- int guildHeaderDark7 = PaintCodeColor.colorByChangingValue(guildHeaderDark8, 1f);
- int textForeground2 = Color.argb(255, 255, 255, 255);
-
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForGuildHeaderCrest.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForGuildHeaderCrest.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 116f, resizedFrame.height() / 58f);
-
- // Group
- {
- // Group 6
- {
- RectF group6 = CacheForGuildHeaderCrest.group6;
- group6.set(34f, 1f, 82f, 57f);
- canvas.save();
-
- // Clip 6
- Path clip6Path = CacheForGuildHeaderCrest.clip6Path;
- clip6Path.reset();
- clip6Path.moveTo(80.23f, 11.47f);
- clip6Path.lineTo(59.22f, 1.28f);
- clip6Path.cubicTo(58.45f, 0.91f, 57.55f, 0.91f, 56.78f, 1.28f);
- clip6Path.lineTo(35.77f, 11.47f);
- clip6Path.cubicTo(34.84f, 11.92f, 34.22f, 12.84f, 34.14f, 13.89f);
- clip6Path.cubicTo(34.1f, 14.57f, 33f, 30.58f, 37.73f, 39.77f);
- clip6Path.cubicTo(41.68f, 47.43f, 49.53f, 52.98f, 56.45f, 56.55f);
- clip6Path.lineTo(56.72f, 56.69f);
- clip6Path.cubicTo(57.12f, 56.9f, 57.56f, 57f, 58f, 57f);
- clip6Path.cubicTo(58.44f, 57f, 58.88f, 56.9f, 59.28f, 56.69f);
- clip6Path.lineTo(59.55f, 56.55f);
- clip6Path.cubicTo(66.47f, 52.98f, 74.32f, 47.43f, 78.27f, 39.77f);
- clip6Path.cubicTo(83.01f, 30.58f, 81.9f, 14.57f, 81.86f, 13.89f);
- clip6Path.cubicTo(81.78f, 12.84f, 81.16f, 11.92f, 80.23f, 11.47f);
- clip6Path.close();
- canvas.clipPath(clip6Path);
-
- // Bezier 3
- RectF bezier3Rect = CacheForGuildHeaderCrest.bezier3Rect;
- bezier3Rect.set(34f, 1f, 82f, 57f);
- Path bezier3Path = CacheForGuildHeaderCrest.bezier3Path;
- bezier3Path.reset();
- bezier3Path.moveTo(80.23f, 11.47f);
- bezier3Path.lineTo(59.22f, 1.28f);
- bezier3Path.cubicTo(58.45f, 0.91f, 57.55f, 0.91f, 56.78f, 1.28f);
- bezier3Path.lineTo(35.77f, 11.47f);
- bezier3Path.cubicTo(34.84f, 11.92f, 34.22f, 12.84f, 34.14f, 13.89f);
- bezier3Path.cubicTo(34.1f, 14.57f, 33f, 30.58f, 37.73f, 39.77f);
- bezier3Path.cubicTo(41.68f, 47.43f, 49.53f, 52.98f, 56.45f, 56.55f);
- bezier3Path.lineTo(56.72f, 56.69f);
- bezier3Path.cubicTo(57.12f, 56.9f, 57.56f, 57f, 58f, 57f);
- bezier3Path.cubicTo(58.44f, 57f, 58.88f, 56.9f, 59.28f, 56.69f);
- bezier3Path.lineTo(59.55f, 56.55f);
- bezier3Path.cubicTo(66.47f, 52.98f, 74.32f, 47.43f, 78.27f, 39.77f);
- bezier3Path.cubicTo(83.01f, 30.58f, 81.9f, 14.57f, 81.86f, 13.89f);
- bezier3Path.cubicTo(81.78f, 12.84f, 81.16f, 11.92f, 80.23f, 11.47f);
- bezier3Path.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(9f);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(guildHeaderDark4);
- canvas.drawPath(bezier3Path, paint);
- canvas.restore();
-
- canvas.restore();
- }
-
- // Group 11
- {
- RectF group11 = CacheForGuildHeaderCrest.group11;
- group11.set(37f, 4.03f, 79f, 53.97f);
- canvas.save();
-
- // Clip 13
- Path clip13Path = CacheForGuildHeaderCrest.clip13Path;
- clip13Path.reset();
- clip13Path.moveTo(77.46f, 13.62f);
- clip13Path.lineTo(59.06f, 4.28f);
- clip13Path.cubicTo(58.39f, 3.94f, 57.61f, 3.94f, 56.93f, 4.28f);
- clip13Path.lineTo(38.55f, 13.62f);
- clip13Path.cubicTo(37.73f, 14.03f, 37.19f, 14.88f, 37.13f, 15.84f);
- clip13Path.cubicTo(37.08f, 16.46f, 36.12f, 31.14f, 40.27f, 39.57f);
- clip13Path.cubicTo(43.72f, 46.58f, 50.59f, 50.29f, 56.65f, 53.56f);
- clip13Path.lineTo(56.88f, 53.69f);
- clip13Path.cubicTo(57.23f, 53.88f, 57.62f, 53.97f, 58f, 53.97f);
- clip13Path.cubicTo(58.38f, 53.97f, 58.77f, 53.88f, 59.12f, 53.69f);
- clip13Path.lineTo(59.35f, 53.56f);
- clip13Path.cubicTo(65.41f, 50.29f, 72.28f, 46.58f, 75.73f, 39.57f);
- clip13Path.cubicTo(79.88f, 31.14f, 78.92f, 16.46f, 78.87f, 15.84f);
- clip13Path.cubicTo(78.81f, 14.88f, 78.27f, 14.03f, 77.46f, 13.62f);
- clip13Path.close();
- canvas.clipPath(clip13Path);
-
- // Rectangle
- RectF rectangleRect = CacheForGuildHeaderCrest.rectangleRect;
- rectangleRect.set(32f, 1f, 84f, 57f);
- Path rectanglePath = CacheForGuildHeaderCrest.rectanglePath;
- rectanglePath.reset();
- rectanglePath.addRect(rectangleRect, Path.Direction.CW);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(guildHeaderDark7);
- canvas.drawPath(rectanglePath, paint);
-
- // Rectangle 2
- canvas.save();
- canvas.translate(53.06f, 27f);
- currentTransformation.peek().postTranslate(53.06f, 27f);
- canvas.rotate(-45f);
- currentTransformation.peek().postRotate(-45f);
- RectF rectangle2Rect = CacheForGuildHeaderCrest.rectangle2Rect;
- rectangle2Rect.set(-8.5f, -25f, 8.5f, 25f);
- Path rectangle2Path = CacheForGuildHeaderCrest.rectangle2Path;
- rectangle2Path.reset();
- rectangle2Path.moveTo(rectangle2Rect.left, rectangle2Rect.top);
- rectangle2Path.lineTo(rectangle2Rect.right, rectangle2Rect.top);
- rectangle2Path.lineTo(rectangle2Rect.right, rectangle2Rect.bottom);
- rectangle2Path.lineTo(rectangle2Rect.left, rectangle2Rect.bottom);
- rectangle2Path.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(guildHeaderDark5);
- canvas.drawPath(rectangle2Path, paint);
- canvas.restore();
-
- // Rectangle 5
- canvas.save();
- canvas.translate(63.48f, 18.35f);
- currentTransformation.peek().postTranslate(63.48f, 18.35f);
- canvas.rotate(45f);
- currentTransformation.peek().postRotate(45f);
- RectF rectangle5Rect = CacheForGuildHeaderCrest.rectangle5Rect;
- rectangle5Rect.set(-15f, -1.5f, 15f, 1.5f);
- Path rectangle5Path = CacheForGuildHeaderCrest.rectangle5Path;
- rectangle5Path.reset();
- rectangle5Path.moveTo(rectangle5Rect.left, rectangle5Rect.top);
- rectangle5Path.lineTo(rectangle5Rect.right, rectangle5Rect.top);
- rectangle5Path.lineTo(rectangle5Rect.right, rectangle5Rect.bottom);
- rectangle5Path.lineTo(rectangle5Rect.left, rectangle5Rect.bottom);
- rectangle5Path.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(guildHeaderDark5);
- canvas.drawPath(rectangle5Path, paint);
- canvas.restore();
-
- // Bezier 10
- RectF bezier10Rect = CacheForGuildHeaderCrest.bezier10Rect;
- bezier10Rect.set(37f, 4.03f, 79f, 53.97f);
- Path bezier10Path = CacheForGuildHeaderCrest.bezier10Path;
- bezier10Path.reset();
- bezier10Path.moveTo(77.46f, 13.62f);
- bezier10Path.lineTo(59.06f, 4.28f);
- bezier10Path.cubicTo(58.39f, 3.94f, 57.61f, 3.94f, 56.93f, 4.28f);
- bezier10Path.lineTo(38.55f, 13.62f);
- bezier10Path.cubicTo(37.73f, 14.03f, 37.19f, 14.88f, 37.13f, 15.84f);
- bezier10Path.cubicTo(37.08f, 16.46f, 36.12f, 31.14f, 40.27f, 39.57f);
- bezier10Path.cubicTo(43.72f, 46.58f, 50.59f, 50.29f, 56.65f, 53.56f);
- bezier10Path.lineTo(56.88f, 53.69f);
- bezier10Path.cubicTo(57.23f, 53.88f, 57.62f, 53.97f, 58f, 53.97f);
- bezier10Path.cubicTo(58.38f, 53.97f, 58.77f, 53.88f, 59.12f, 53.69f);
- bezier10Path.lineTo(59.35f, 53.56f);
- bezier10Path.cubicTo(65.41f, 50.29f, 72.28f, 46.58f, 75.73f, 39.57f);
- bezier10Path.cubicTo(79.88f, 31.14f, 78.92f, 16.46f, 78.87f, 15.84f);
- bezier10Path.cubicTo(78.81f, 14.88f, 78.27f, 14.03f, 77.46f, 13.62f);
- bezier10Path.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(6f);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(guildHeader);
- canvas.drawPath(bezier10Path, paint);
- canvas.restore();
-
- canvas.restore();
- }
-
- // Bezier 13
- RectF bezier13Rect = CacheForGuildHeaderCrest.bezier13Rect;
- bezier13Rect.set(50.5f, 13.7f, 65.5f, 28.7f);
- Path bezier13Path = CacheForGuildHeaderCrest.bezier13Path;
- bezier13Path.reset();
- bezier13Path.moveTo(58f, 22.28f);
- bezier13Path.cubicTo(55.5f, 22.28f, 50.5f, 23.53f, 50.5f, 26.03f);
- bezier13Path.lineTo(50.5f, 28.7f);
- bezier13Path.lineTo(65.5f, 28.7f);
- bezier13Path.lineTo(65.5f, 26.03f);
- bezier13Path.cubicTo(65.5f, 23.53f, 60.5f, 22.28f, 58f, 22.28f);
- bezier13Path.close();
- bezier13Path.moveTo(58f, 13.7f);
- bezier13Path.cubicTo(56.23f, 13.7f, 54.79f, 15.14f, 54.79f, 16.92f);
- bezier13Path.cubicTo(54.79f, 18.69f, 56.23f, 20.13f, 58f, 20.13f);
- bezier13Path.cubicTo(59.78f, 20.13f, 61.2f, 18.69f, 61.2f, 16.92f);
- bezier13Path.cubicTo(61.2f, 15.14f, 59.78f, 13.7f, 58f, 13.7f);
- bezier13Path.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- bezier13Path.setFillType(Path.FillType.EVEN_ODD);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(guildHeader);
- canvas.drawPath(bezier13Path, paint);
-
- // Bezier 14
- RectF bezier14Rect = CacheForGuildHeaderCrest.bezier14Rect;
- bezier14Rect.set(65.5f, 16.14f, 74.03f, 24.38f);
- Path bezier14Path = CacheForGuildHeaderCrest.bezier14Path;
- bezier14Path.reset();
- bezier14Path.moveTo(69.77f, 23.29f);
- bezier14Path.lineTo(68.01f, 24.22f);
- bezier14Path.cubicTo(67.28f, 24.61f, 66.79f, 24.25f, 66.93f, 23.45f);
- bezier14Path.lineTo(67.27f, 21.46f);
- bezier14Path.lineTo(65.85f, 20.06f);
- bezier14Path.cubicTo(65.25f, 19.47f, 65.44f, 18.9f, 66.26f, 18.78f);
- bezier14Path.lineTo(68.22f, 18.49f);
- bezier14Path.lineTo(69.1f, 16.7f);
- bezier14Path.cubicTo(69.47f, 15.95f, 70.06f, 15.95f, 70.43f, 16.7f);
- bezier14Path.lineTo(71.31f, 18.49f);
- bezier14Path.lineTo(73.28f, 18.78f);
- bezier14Path.cubicTo(74.1f, 18.9f, 74.28f, 19.47f, 73.69f, 20.06f);
- bezier14Path.lineTo(72.26f, 21.46f);
- bezier14Path.lineTo(72.6f, 23.45f);
- bezier14Path.cubicTo(72.74f, 24.26f, 72.26f, 24.61f, 71.53f, 24.22f);
- bezier14Path.lineTo(69.77f, 23.29f);
- bezier14Path.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- bezier14Path.setFillType(Path.FillType.EVEN_ODD);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(guildHeader);
- canvas.drawPath(bezier14Path, paint);
-
- // Bezier 16
- RectF bezier16Rect = CacheForGuildHeaderCrest.bezier16Rect;
- bezier16Rect.set(42.48f, 15.42f, 51.02f, 23.66f);
- Path bezier16Path = CacheForGuildHeaderCrest.bezier16Path;
- bezier16Path.reset();
- bezier16Path.moveTo(46.75f, 22.57f);
- bezier16Path.lineTo(44.99f, 23.5f);
- bezier16Path.cubicTo(44.26f, 23.89f, 43.78f, 23.54f, 43.91f, 22.73f);
- bezier16Path.lineTo(44.25f, 20.74f);
- bezier16Path.lineTo(42.83f, 19.34f);
- bezier16Path.cubicTo(42.24f, 18.75f, 42.42f, 18.18f, 43.24f, 18.06f);
- bezier16Path.lineTo(45.21f, 17.78f);
- bezier16Path.lineTo(46.09f, 15.98f);
- bezier16Path.cubicTo(46.45f, 15.23f, 47.05f, 15.23f, 47.41f, 15.98f);
- bezier16Path.lineTo(48.29f, 17.78f);
- bezier16Path.lineTo(50.26f, 18.06f);
- bezier16Path.cubicTo(51.08f, 18.18f, 51.26f, 18.76f, 50.67f, 19.34f);
- bezier16Path.lineTo(49.25f, 20.74f);
- bezier16Path.lineTo(49.59f, 22.73f);
- bezier16Path.cubicTo(49.72f, 23.55f, 49.24f, 23.89f, 48.51f, 23.5f);
- bezier16Path.lineTo(46.75f, 22.57f);
- bezier16Path.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- bezier16Path.setFillType(Path.FillType.EVEN_ODD);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(guildHeader);
- canvas.drawPath(bezier16Path, paint);
-
- // Bezier 17
- RectF bezier17Rect = CacheForGuildHeaderCrest.bezier17Rect;
- bezier17Rect.set(0f, 34f, 25f, 53f);
- Path bezier17Path = CacheForGuildHeaderCrest.bezier17Path;
- bezier17Path.reset();
- bezier17Path.moveTo(0f, 34f);
- bezier17Path.lineTo(25f, 34f);
- bezier17Path.lineTo(25f, 53f);
- bezier17Path.lineTo(0f, 53f);
- bezier17Path.lineTo(9f, 43.5f);
- bezier17Path.lineTo(0f, 34f);
- bezier17Path.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- bezier17Path.setFillType(Path.FillType.EVEN_ODD);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(guildHeaderDark2);
- canvas.drawPath(bezier17Path, paint);
-
- // Bezier 18
- RectF bezier18Rect = CacheForGuildHeaderCrest.bezier18Rect;
- bezier18Rect.set(91f, 34f, 116f, 53f);
- Path bezier18Path = CacheForGuildHeaderCrest.bezier18Path;
- bezier18Path.reset();
- bezier18Path.moveTo(116f, 34f);
- bezier18Path.lineTo(91f, 34f);
- bezier18Path.lineTo(91f, 53f);
- bezier18Path.lineTo(116f, 53f);
- bezier18Path.lineTo(107f, 43.5f);
- bezier18Path.lineTo(116f, 34f);
- bezier18Path.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- bezier18Path.setFillType(Path.FillType.EVEN_ODD);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(guildHeaderDark2);
- canvas.drawPath(bezier18Path, paint);
-
- // Bezier 19
- RectF bezier19Rect = CacheForGuildHeaderCrest.bezier19Rect;
- bezier19Rect.set(16f, 41f, 25f, 53f);
- Path bezier19Path = CacheForGuildHeaderCrest.bezier19Path;
- bezier19Path.reset();
- bezier19Path.moveTo(16f, 44f);
- bezier19Path.lineTo(25f, 53f);
- bezier19Path.lineTo(25f, 41f);
- bezier19Path.lineTo(16f, 44f);
- bezier19Path.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- bezier19Path.setFillType(Path.FillType.EVEN_ODD);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(guildHeaderDark6);
- canvas.drawPath(bezier19Path, paint);
-
- // Bezier 20
- RectF bezier20Rect = CacheForGuildHeaderCrest.bezier20Rect;
- bezier20Rect.set(91f, 41f, 100f, 53f);
- Path bezier20Path = CacheForGuildHeaderCrest.bezier20Path;
- bezier20Path.reset();
- bezier20Path.moveTo(100f, 44f);
- bezier20Path.lineTo(91f, 53f);
- bezier20Path.lineTo(91f, 41f);
- bezier20Path.lineTo(100f, 44f);
- bezier20Path.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- bezier20Path.setFillType(Path.FillType.EVEN_ODD);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(guildHeaderDark6);
- canvas.drawPath(bezier20Path, paint);
-
- // Rectangle 9
- RectF rectangle9Rect = CacheForGuildHeaderCrest.rectangle9Rect;
- rectangle9Rect.set(16f, 25f, 100f, 44f);
- Path rectangle9Path = CacheForGuildHeaderCrest.rectangle9Path;
- rectangle9Path.reset();
- rectangle9Path.addRect(rectangle9Rect, Path.Direction.CW);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(guildHeaderDark2);
- canvas.drawPath(rectangle9Path, paint);
-
- // Label 2
- RectF label2Rect = CacheForGuildHeaderCrest.label2Rect;
- label2Rect.set(36.15f, 28.23f, 78.96f, 37.19f);
- Path label2Path = CacheForGuildHeaderCrest.label2Path;
- label2Path.reset();
- label2Path.moveTo(42.98f, 35.93f);
- label2Path.lineTo(43.28f, 37f);
- label2Path.lineTo(44f, 37f);
- label2Path.lineTo(44f, 32.49f);
- label2Path.lineTo(40.24f, 32.49f);
- label2Path.lineTo(40.24f, 33.45f);
- label2Path.lineTo(42.98f, 33.45f);
- label2Path.cubicTo(42.99f, 33.84f, 42.94f, 34.21f, 42.82f, 34.55f);
- label2Path.cubicTo(42.7f, 34.89f, 42.52f, 35.18f, 42.29f, 35.43f);
- label2Path.cubicTo(42.05f, 35.69f, 41.76f, 35.88f, 41.42f, 36.03f);
- label2Path.cubicTo(41.07f, 36.17f, 40.68f, 36.24f, 40.23f, 36.24f);
- label2Path.cubicTo(39.75f, 36.24f, 39.33f, 36.15f, 38.96f, 35.96f);
- label2Path.cubicTo(38.6f, 35.77f, 38.29f, 35.52f, 38.04f, 35.21f);
- label2Path.cubicTo(37.8f, 34.89f, 37.61f, 34.53f, 37.48f, 34.11f);
- label2Path.cubicTo(37.35f, 33.7f, 37.29f, 33.27f, 37.29f, 32.82f);
- label2Path.cubicTo(37.29f, 32.37f, 37.34f, 31.92f, 37.46f, 31.49f);
- label2Path.cubicTo(37.57f, 31.05f, 37.74f, 30.66f, 37.98f, 30.32f);
- label2Path.cubicTo(38.21f, 29.98f, 38.52f, 29.71f, 38.89f, 29.5f);
- label2Path.cubicTo(39.26f, 29.29f, 39.71f, 29.19f, 40.23f, 29.19f);
- label2Path.cubicTo(40.55f, 29.19f, 40.85f, 29.23f, 41.13f, 29.3f);
- label2Path.cubicTo(41.42f, 29.38f, 41.67f, 29.49f, 41.9f, 29.64f);
- label2Path.cubicTo(42.12f, 29.8f, 42.31f, 29.99f, 42.46f, 30.23f);
- label2Path.cubicTo(42.61f, 30.46f, 42.72f, 30.74f, 42.77f, 31.07f);
- label2Path.lineTo(43.91f, 31.07f);
- label2Path.cubicTo(43.83f, 30.57f, 43.68f, 30.14f, 43.46f, 29.78f);
- label2Path.cubicTo(43.24f, 29.43f, 42.97f, 29.13f, 42.65f, 28.9f);
- label2Path.cubicTo(42.32f, 28.67f, 41.95f, 28.5f, 41.54f, 28.39f);
- label2Path.cubicTo(41.13f, 28.28f, 40.69f, 28.23f, 40.23f, 28.23f);
- label2Path.cubicTo(39.55f, 28.23f, 38.95f, 28.35f, 38.45f, 28.61f);
- label2Path.cubicTo(37.94f, 28.86f, 37.51f, 29.2f, 37.17f, 29.62f);
- label2Path.cubicTo(36.83f, 30.04f, 36.58f, 30.54f, 36.41f, 31.1f);
- label2Path.cubicTo(36.23f, 31.67f, 36.15f, 32.26f, 36.15f, 32.88f);
- label2Path.cubicTo(36.15f, 33.44f, 36.24f, 33.98f, 36.42f, 34.5f);
- label2Path.cubicTo(36.61f, 35.02f, 36.88f, 35.48f, 37.23f, 35.88f);
- label2Path.cubicTo(37.58f, 36.28f, 38.01f, 36.6f, 38.51f, 36.84f);
- label2Path.cubicTo(39.02f, 37.07f, 39.59f, 37.19f, 40.23f, 37.19f);
- label2Path.cubicTo(40.73f, 37.19f, 41.23f, 37.09f, 41.73f, 36.9f);
- label2Path.cubicTo(42.22f, 36.7f, 42.64f, 36.38f, 42.98f, 35.93f);
- label2Path.close();
- label2Path.moveTo(52.52f, 33.9f);
- label2Path.lineTo(52.52f, 28.43f);
- label2Path.lineTo(51.38f, 28.43f);
- label2Path.lineTo(51.38f, 33.9f);
- label2Path.cubicTo(51.38f, 34.67f, 51.19f, 35.25f, 50.81f, 35.65f);
- label2Path.cubicTo(50.43f, 36.05f, 49.87f, 36.24f, 49.14f, 36.24f);
- label2Path.cubicTo(48.38f, 36.24f, 47.79f, 36.05f, 47.38f, 35.65f);
- label2Path.cubicTo(46.97f, 35.25f, 46.77f, 34.67f, 46.77f, 33.9f);
- label2Path.lineTo(46.77f, 28.43f);
- label2Path.lineTo(45.63f, 28.43f);
- label2Path.lineTo(45.63f, 33.9f);
- label2Path.cubicTo(45.63f, 35.05f, 45.94f, 35.88f, 46.56f, 36.41f);
- label2Path.cubicTo(47.18f, 36.93f, 48.04f, 37.19f, 49.14f, 37.19f);
- label2Path.cubicTo(50.22f, 37.19f, 51.06f, 36.92f, 51.64f, 36.37f);
- label2Path.cubicTo(52.22f, 35.82f, 52.52f, 35f, 52.52f, 33.9f);
- label2Path.close();
- label2Path.moveTo(54.39f, 28.43f);
- label2Path.lineTo(54.39f, 37f);
- label2Path.lineTo(55.53f, 37f);
- label2Path.lineTo(55.53f, 28.43f);
- label2Path.lineTo(54.39f, 28.43f);
- label2Path.close();
- label2Path.moveTo(57.45f, 28.43f);
- label2Path.lineTo(57.45f, 37f);
- label2Path.lineTo(63.12f, 37f);
- label2Path.lineTo(63.12f, 36.04f);
- label2Path.lineTo(58.59f, 36.04f);
- label2Path.lineTo(58.59f, 28.43f);
- label2Path.lineTo(57.45f, 28.43f);
- label2Path.close();
- label2Path.moveTo(65.26f, 36.04f);
- label2Path.lineTo(65.26f, 29.39f);
- label2Path.lineTo(67.18f, 29.39f);
- label2Path.cubicTo(67.71f, 29.39f, 68.15f, 29.47f, 68.51f, 29.61f);
- label2Path.cubicTo(68.87f, 29.76f, 69.17f, 29.98f, 69.39f, 30.26f);
- label2Path.cubicTo(69.62f, 30.55f, 69.79f, 30.89f, 69.89f, 31.29f);
- label2Path.cubicTo(69.99f, 31.7f, 70.04f, 32.16f, 70.04f, 32.67f);
- label2Path.cubicTo(70.04f, 33.2f, 69.98f, 33.65f, 69.87f, 34.02f);
- label2Path.cubicTo(69.77f, 34.39f, 69.63f, 34.7f, 69.46f, 34.95f);
- label2Path.cubicTo(69.29f, 35.2f, 69.1f, 35.39f, 68.89f, 35.54f);
- label2Path.cubicTo(68.68f, 35.68f, 68.46f, 35.79f, 68.25f, 35.87f);
- label2Path.cubicTo(68.03f, 35.94f, 67.83f, 35.99f, 67.64f, 36.01f);
- label2Path.cubicTo(67.44f, 36.03f, 67.28f, 36.04f, 67.16f, 36.04f);
- label2Path.lineTo(65.26f, 36.04f);
- label2Path.close();
- label2Path.moveTo(64.12f, 28.43f);
- label2Path.lineTo(64.12f, 37f);
- label2Path.lineTo(67.06f, 37f);
- label2Path.cubicTo(67.77f, 37f, 68.39f, 36.9f, 68.91f, 36.7f);
- label2Path.cubicTo(69.43f, 36.5f, 69.86f, 36.21f, 70.19f, 35.83f);
- label2Path.cubicTo(70.53f, 35.45f, 70.78f, 34.98f, 70.94f, 34.43f);
- label2Path.cubicTo(71.1f, 33.87f, 71.18f, 33.23f, 71.18f, 32.51f);
- label2Path.cubicTo(71.18f, 31.14f, 70.82f, 30.11f, 70.11f, 29.44f);
- label2Path.cubicTo(69.4f, 28.77f, 68.38f, 28.43f, 67.06f, 28.43f);
- label2Path.lineTo(64.12f, 28.43f);
- label2Path.close();
- label2Path.moveTo(77.52f, 30.94f);
- label2Path.lineTo(78.6f, 30.94f);
- label2Path.cubicTo(78.59f, 30.47f, 78.5f, 30.06f, 78.33f, 29.72f);
- label2Path.cubicTo(78.17f, 29.38f, 77.95f, 29.1f, 77.66f, 28.88f);
- label2Path.cubicTo(77.38f, 28.65f, 77.05f, 28.49f, 76.67f, 28.38f);
- label2Path.cubicTo(76.3f, 28.28f, 75.89f, 28.23f, 75.45f, 28.23f);
- label2Path.cubicTo(75.06f, 28.23f, 74.67f, 28.28f, 74.3f, 28.38f);
- label2Path.cubicTo(73.93f, 28.48f, 73.6f, 28.63f, 73.31f, 28.83f);
- label2Path.cubicTo(73.01f, 29.04f, 72.78f, 29.3f, 72.6f, 29.61f);
- label2Path.cubicTo(72.43f, 29.93f, 72.34f, 30.3f, 72.34f, 30.74f);
- label2Path.cubicTo(72.34f, 31.13f, 72.42f, 31.45f, 72.57f, 31.71f);
- label2Path.cubicTo(72.73f, 31.97f, 72.94f, 32.19f, 73.2f, 32.35f);
- label2Path.cubicTo(73.46f, 32.51f, 73.75f, 32.65f, 74.08f, 32.75f);
- label2Path.cubicTo(74.41f, 32.85f, 74.74f, 32.93f, 75.08f, 33.01f);
- label2Path.cubicTo(75.42f, 33.09f, 75.76f, 33.16f, 76.08f, 33.23f);
- label2Path.cubicTo(76.41f, 33.3f, 76.71f, 33.4f, 76.97f, 33.51f);
- label2Path.cubicTo(77.23f, 33.63f, 77.43f, 33.78f, 77.59f, 33.96f);
- label2Path.cubicTo(77.75f, 34.15f, 77.82f, 34.39f, 77.82f, 34.68f);
- label2Path.cubicTo(77.82f, 35f, 77.76f, 35.25f, 77.63f, 35.45f);
- label2Path.cubicTo(77.5f, 35.65f, 77.34f, 35.81f, 77.13f, 35.93f);
- label2Path.cubicTo(76.92f, 36.04f, 76.69f, 36.12f, 76.43f, 36.17f);
- label2Path.cubicTo(76.17f, 36.22f, 75.91f, 36.24f, 75.65f, 36.24f);
- label2Path.cubicTo(75.33f, 36.24f, 75.02f, 36.2f, 74.72f, 36.12f);
- label2Path.cubicTo(74.41f, 36.04f, 74.15f, 35.92f, 73.92f, 35.75f);
- label2Path.cubicTo(73.69f, 35.58f, 73.51f, 35.37f, 73.37f, 35.11f);
- label2Path.cubicTo(73.23f, 34.85f, 73.16f, 34.54f, 73.16f, 34.18f);
- label2Path.lineTo(72.08f, 34.18f);
- label2Path.cubicTo(72.08f, 34.7f, 72.17f, 35.15f, 72.36f, 35.53f);
- label2Path.cubicTo(72.55f, 35.91f, 72.8f, 36.22f, 73.13f, 36.47f);
- label2Path.cubicTo(73.45f, 36.71f, 73.83f, 36.89f, 74.25f, 37.01f);
- label2Path.cubicTo(74.68f, 37.13f, 75.14f, 37.19f, 75.62f, 37.19f);
- label2Path.cubicTo(76.01f, 37.19f, 76.4f, 37.15f, 76.8f, 37.05f);
- label2Path.cubicTo(77.19f, 36.96f, 77.55f, 36.81f, 77.87f, 36.61f);
- label2Path.cubicTo(78.19f, 36.41f, 78.45f, 36.14f, 78.66f, 35.82f);
- label2Path.cubicTo(78.86f, 35.49f, 78.96f, 35.1f, 78.96f, 34.65f);
- label2Path.cubicTo(78.96f, 34.22f, 78.89f, 33.87f, 78.73f, 33.59f);
- label2Path.cubicTo(78.57f, 33.31f, 78.37f, 33.08f, 78.11f, 32.9f);
- label2Path.cubicTo(77.85f, 32.71f, 77.55f, 32.57f, 77.22f, 32.46f);
- label2Path.cubicTo(76.9f, 32.35f, 76.56f, 32.26f, 76.22f, 32.18f);
- label2Path.cubicTo(75.88f, 32.1f, 75.55f, 32.02f, 75.22f, 31.95f);
- label2Path.cubicTo(74.89f, 31.89f, 74.6f, 31.8f, 74.34f, 31.7f);
- label2Path.cubicTo(74.08f, 31.59f, 73.87f, 31.46f, 73.71f, 31.29f);
- label2Path.cubicTo(73.56f, 31.13f, 73.48f, 30.92f, 73.48f, 30.65f);
- label2Path.cubicTo(73.48f, 30.37f, 73.53f, 30.14f, 73.64f, 29.95f);
- label2Path.cubicTo(73.75f, 29.76f, 73.89f, 29.61f, 74.07f, 29.5f);
- label2Path.cubicTo(74.25f, 29.39f, 74.46f, 29.31f, 74.69f, 29.26f);
- label2Path.cubicTo(74.92f, 29.21f, 75.16f, 29.19f, 75.4f, 29.19f);
- label2Path.cubicTo(75.99f, 29.19f, 76.48f, 29.33f, 76.86f, 29.6f);
- label2Path.cubicTo(77.24f, 29.88f, 77.46f, 30.32f, 77.52f, 30.94f);
- label2Path.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(textForeground2);
- canvas.drawPath(label2Path, paint);
- }
-
- canvas.restore();
- }
-
private static class CacheForTwoHandedIcon {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 15f, 15f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 15f, 15f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
}
public static void drawTwoHandedIcon(Canvas canvas) {
@@ -11330,558 +9800,15 @@ public class HabiticaIcons {
canvas.restore();
}
-
- private static class CacheForBlankAvatarIcon {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 36f, 34f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- }
-
- public static void drawBlankAvatarIcon(Canvas canvas) {
- HabiticaIcons.drawBlankAvatarIcon(canvas, new RectF(0f, 0f, 36f, 34f), ResizingBehavior.AspectFit);
- }
-
- public static void drawBlankAvatarIcon(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
- // General Declarations
- Paint paint = CacheForBlankAvatarIcon.paint;
-
- // Local Colors
- int fillColor101 = Color.argb(255, 247, 78, 82);
- int fillColor40 = Color.argb(255, 165, 161, 172);
-
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForBlankAvatarIcon.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForBlankAvatarIcon.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 36f, resizedFrame.height() / 34f);
-
- // Bezier
- RectF bezierRect = CacheForBlankAvatarIcon.bezierRect;
- bezierRect.set(6f, 6f, 30f, 30f);
- Path bezierPath = CacheForBlankAvatarIcon.bezierPath;
- bezierPath.reset();
- bezierPath.moveTo(14f, 28f);
- bezierPath.lineTo(22f, 28f);
- bezierPath.lineTo(22f, 30f);
- bezierPath.lineTo(14f, 30f);
- bezierPath.lineTo(14f, 28f);
- bezierPath.close();
- bezierPath.moveTo(12f, 6f);
- bezierPath.lineTo(24f, 6f);
- bezierPath.lineTo(24f, 8f);
- bezierPath.lineTo(12f, 8f);
- bezierPath.lineTo(12f, 6f);
- bezierPath.close();
- bezierPath.moveTo(6f, 12f);
- bezierPath.lineTo(8f, 12f);
- bezierPath.lineTo(8f, 22f);
- bezierPath.lineTo(6f, 22f);
- bezierPath.lineTo(6f, 12f);
- bezierPath.close();
- bezierPath.moveTo(28f, 12f);
- bezierPath.lineTo(30f, 12f);
- bezierPath.lineTo(30f, 22f);
- bezierPath.lineTo(28f, 22f);
- bezierPath.lineTo(28f, 12f);
- bezierPath.close();
- bezierPath.moveTo(26f, 10f);
- bezierPath.lineTo(28f, 10f);
- bezierPath.lineTo(28f, 12f);
- bezierPath.lineTo(26f, 12f);
- bezierPath.lineTo(26f, 10f);
- bezierPath.close();
- bezierPath.moveTo(24f, 8f);
- bezierPath.lineTo(26f, 8f);
- bezierPath.lineTo(26f, 10f);
- bezierPath.lineTo(24f, 10f);
- bezierPath.lineTo(24f, 8f);
- bezierPath.close();
- bezierPath.moveTo(10f, 8f);
- bezierPath.lineTo(12f, 8f);
- bezierPath.lineTo(12f, 10f);
- bezierPath.lineTo(10f, 10f);
- bezierPath.lineTo(10f, 8f);
- bezierPath.close();
- bezierPath.moveTo(8f, 10f);
- bezierPath.lineTo(10f, 10f);
- bezierPath.lineTo(10f, 12f);
- bezierPath.lineTo(8f, 12f);
- bezierPath.lineTo(8f, 10f);
- bezierPath.close();
- bezierPath.moveTo(8f, 22f);
- bezierPath.lineTo(10f, 22f);
- bezierPath.lineTo(10f, 24f);
- bezierPath.lineTo(8f, 24f);
- bezierPath.lineTo(8f, 22f);
- bezierPath.close();
- bezierPath.moveTo(10f, 24f);
- bezierPath.lineTo(12f, 24f);
- bezierPath.lineTo(12f, 26f);
- bezierPath.lineTo(10f, 26f);
- bezierPath.lineTo(10f, 24f);
- bezierPath.close();
- bezierPath.moveTo(12f, 26f);
- bezierPath.lineTo(14f, 26f);
- bezierPath.lineTo(14f, 28f);
- bezierPath.lineTo(12f, 28f);
- bezierPath.lineTo(12f, 26f);
- bezierPath.close();
- bezierPath.moveTo(22f, 26f);
- bezierPath.lineTo(24f, 26f);
- bezierPath.lineTo(24f, 28f);
- bezierPath.lineTo(22f, 28f);
- bezierPath.lineTo(22f, 26f);
- bezierPath.close();
- bezierPath.moveTo(26f, 22f);
- bezierPath.lineTo(28f, 22f);
- bezierPath.lineTo(28f, 24f);
- bezierPath.lineTo(26f, 24f);
- bezierPath.lineTo(26f, 22f);
- bezierPath.close();
- bezierPath.moveTo(24f, 24f);
- bezierPath.lineTo(26f, 24f);
- bezierPath.lineTo(26f, 26f);
- bezierPath.lineTo(24f, 26f);
- bezierPath.lineTo(24f, 24f);
- bezierPath.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- bezierPath.setFillType(Path.FillType.EVEN_ODD);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(fillColor40);
- canvas.drawPath(bezierPath, paint);
-
- // Bezier 2
- RectF bezier2Rect = CacheForBlankAvatarIcon.bezier2Rect;
- bezier2Rect.set(0f, 0f, 36f, 34f);
- Path bezier2Path = CacheForBlankAvatarIcon.bezier2Path;
- bezier2Path.reset();
- bezier2Path.moveTo(34f, 0f);
- bezier2Path.lineTo(36f, 0f);
- bezier2Path.lineTo(36f, 2f);
- bezier2Path.lineTo(34f, 2f);
- bezier2Path.lineTo(34f, 4f);
- bezier2Path.lineTo(32f, 4f);
- bezier2Path.lineTo(32f, 6f);
- bezier2Path.lineTo(30f, 6f);
- bezier2Path.lineTo(30f, 8f);
- bezier2Path.lineTo(28f, 8f);
- bezier2Path.lineTo(28f, 10f);
- bezier2Path.lineTo(26f, 10f);
- bezier2Path.lineTo(26f, 12f);
- bezier2Path.lineTo(24f, 12f);
- bezier2Path.lineTo(24f, 14f);
- bezier2Path.lineTo(22f, 14f);
- bezier2Path.lineTo(22f, 16f);
- bezier2Path.lineTo(20f, 16f);
- bezier2Path.lineTo(20f, 18f);
- bezier2Path.lineTo(18f, 18f);
- bezier2Path.lineTo(18f, 20f);
- bezier2Path.lineTo(16f, 20f);
- bezier2Path.lineTo(16f, 22f);
- bezier2Path.lineTo(14f, 22f);
- bezier2Path.lineTo(14f, 24f);
- bezier2Path.lineTo(12f, 24f);
- bezier2Path.lineTo(12f, 26f);
- bezier2Path.lineTo(10f, 26f);
- bezier2Path.lineTo(10f, 28f);
- bezier2Path.lineTo(8f, 28f);
- bezier2Path.lineTo(8f, 30f);
- bezier2Path.lineTo(6f, 30f);
- bezier2Path.lineTo(6f, 32f);
- bezier2Path.lineTo(4f, 32f);
- bezier2Path.lineTo(4f, 34f);
- bezier2Path.lineTo(2f, 34f);
- bezier2Path.lineTo(0f, 34f);
- bezier2Path.lineTo(0f, 32f);
- bezier2Path.lineTo(2f, 32f);
- bezier2Path.lineTo(2f, 30f);
- bezier2Path.lineTo(4f, 30f);
- bezier2Path.lineTo(4f, 28f);
- bezier2Path.lineTo(6f, 28f);
- bezier2Path.lineTo(6f, 26f);
- bezier2Path.lineTo(8f, 26f);
- bezier2Path.lineTo(8f, 24f);
- bezier2Path.lineTo(10f, 24f);
- bezier2Path.lineTo(10f, 22f);
- bezier2Path.lineTo(12f, 22f);
- bezier2Path.lineTo(12f, 20f);
- bezier2Path.lineTo(14f, 20f);
- bezier2Path.lineTo(14f, 18f);
- bezier2Path.lineTo(16f, 18f);
- bezier2Path.lineTo(16f, 16f);
- bezier2Path.lineTo(18f, 16f);
- bezier2Path.lineTo(18f, 14f);
- bezier2Path.lineTo(20f, 14f);
- bezier2Path.lineTo(20f, 12f);
- bezier2Path.lineTo(22f, 12f);
- bezier2Path.lineTo(22f, 10f);
- bezier2Path.lineTo(24f, 10f);
- bezier2Path.lineTo(24f, 8f);
- bezier2Path.lineTo(26f, 8f);
- bezier2Path.lineTo(26f, 6f);
- bezier2Path.lineTo(28f, 6f);
- bezier2Path.lineTo(28f, 4f);
- bezier2Path.lineTo(30f, 4f);
- bezier2Path.lineTo(30f, 2f);
- bezier2Path.lineTo(32f, 2f);
- bezier2Path.lineTo(32f, 0f);
- bezier2Path.lineTo(34f, 0f);
- bezier2Path.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- bezier2Path.setFillType(Path.FillType.EVEN_ODD);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(fillColor101);
- canvas.drawPath(bezier2Path, paint);
-
- canvas.restore();
- }
-
- private static class CacheForDisclosureArrow {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 8f, 13f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- }
-
- public static void drawDisclosureArrow(Canvas canvas) {
- HabiticaIcons.drawDisclosureArrow(canvas, new RectF(0f, 0f, 8f, 13f), ResizingBehavior.AspectFit);
- }
-
- public static void drawDisclosureArrow(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
- // General Declarations
- Paint paint = CacheForDisclosureArrow.paint;
-
- // Local Colors
- int fillColor102 = Color.argb(255, 199, 199, 204);
-
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForDisclosureArrow.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForDisclosureArrow.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 8f, resizedFrame.height() / 13f);
-
- // Bezier
- RectF bezierRect = CacheForDisclosureArrow.bezierRect;
- bezierRect.set(0f, 0f, 8f, 13f);
- Path bezierPath = CacheForDisclosureArrow.bezierPath;
- bezierPath.reset();
- bezierPath.moveTo(0f, 1.5f);
- bezierPath.lineTo(1.5f, 0f);
- bezierPath.lineTo(8f, 6.5f);
- bezierPath.lineTo(1.5f, 13f);
- bezierPath.lineTo(0f, 11.5f);
- bezierPath.lineTo(5f, 6.5f);
- bezierPath.lineTo(0f, 1.5f);
- bezierPath.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- bezierPath.setFillType(Path.FillType.EVEN_ODD);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(fillColor102);
- canvas.drawPath(bezierPath, paint);
-
- canvas.restore();
- }
-
- private static class CacheForFilterIcon {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 22f, 22f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
- private static RectF oval2Rect = new RectF();
- private static Path oval2Path = new Path();
- private static RectF oval4Rect = new RectF();
- private static Path oval4Path = new Path();
- private static RectF oval6Rect = new RectF();
- private static Path oval6Path = new Path();
- }
-
- public static void drawFilterIcon(Canvas canvas, float percentage) {
- HabiticaIcons.drawFilterIcon(canvas, new RectF(0f, 0f, 22f, 22f), ResizingBehavior.AspectFit, percentage);
- }
-
- public static void drawFilterIcon(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, float percentage) {
- // General Declarations
- Paint paint = CacheForFilterIcon.paint;
-
- // Local Colors
- int strokeColor19 = Color.argb(255, 154, 98, 255);
-
- // Local Variables
- float filterNode2Position = 13f - 10f * percentage;
- float filterNode1Position = 3f + 10f * percentage;
- float filterNode3Position = 3f + 5f * percentage;
-
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForFilterIcon.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForFilterIcon.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 22f, resizedFrame.height() / 22f);
-
- // Bezier
- RectF bezierRect = CacheForFilterIcon.bezierRect;
- bezierRect.set(1.5f, 18f, 20.53f, 18f);
- Path bezierPath = CacheForFilterIcon.bezierPath;
- bezierPath.reset();
- bezierPath.moveTo(1.5f, 18f);
- bezierPath.lineTo(20.53f, 18f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(2f);
- paint.setStrokeCap(Paint.Cap.ROUND);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor19);
- canvas.drawPath(bezierPath, paint);
- canvas.restore();
-
- // Bezier 2
- RectF bezier2Rect = CacheForFilterIcon.bezier2Rect;
- bezier2Rect.set(1.5f, 11f, 20.53f, 11f);
- Path bezier2Path = CacheForFilterIcon.bezier2Path;
- bezier2Path.reset();
- bezier2Path.moveTo(1.5f, 11f);
- bezier2Path.lineTo(20.53f, 11f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(2f);
- paint.setStrokeCap(Paint.Cap.ROUND);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor19);
- canvas.drawPath(bezier2Path, paint);
- canvas.restore();
-
- // Bezier 3
- RectF bezier3Rect = CacheForFilterIcon.bezier3Rect;
- bezier3Rect.set(1.5f, 4f, 20.53f, 4f);
- Path bezier3Path = CacheForFilterIcon.bezier3Path;
- bezier3Path.reset();
- bezier3Path.moveTo(1.5f, 4f);
- bezier3Path.lineTo(20.53f, 4f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(2f);
- paint.setStrokeCap(Paint.Cap.ROUND);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor19);
- canvas.drawPath(bezier3Path, paint);
- canvas.restore();
-
- // Oval 2
- RectF oval2Rect = CacheForFilterIcon.oval2Rect;
- oval2Rect.set(filterNode1Position, 1f, filterNode1Position + 5f, 6f);
- Path oval2Path = CacheForFilterIcon.oval2Path;
- oval2Path.reset();
- oval2Path.addOval(oval2Rect, Path.Direction.CW);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(Color.WHITE);
- canvas.drawPath(oval2Path, paint);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(1.5f);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor19);
- canvas.drawPath(oval2Path, paint);
- canvas.restore();
-
- // Oval 4
- RectF oval4Rect = CacheForFilterIcon.oval4Rect;
- oval4Rect.set(filterNode2Position, 8f, filterNode2Position + 5f, 13f);
- Path oval4Path = CacheForFilterIcon.oval4Path;
- oval4Path.reset();
- oval4Path.addOval(oval4Rect, Path.Direction.CW);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(Color.WHITE);
- canvas.drawPath(oval4Path, paint);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(1.5f);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor19);
- canvas.drawPath(oval4Path, paint);
- canvas.restore();
-
- // Oval 6
- RectF oval6Rect = CacheForFilterIcon.oval6Rect;
- oval6Rect.set(filterNode3Position, 16f, filterNode3Position + 5f, 21f);
- Path oval6Path = CacheForFilterIcon.oval6Path;
- oval6Path.reset();
- oval6Path.addOval(oval6Rect, Path.Direction.CW);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(Color.WHITE);
- canvas.drawPath(oval6Path, paint);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(1.5f);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor19);
- canvas.drawPath(oval6Path, paint);
- canvas.restore();
-
- canvas.restore();
- }
-
- private static class CacheForDeclineIcon {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 13f, 13f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- }
-
- public static void drawDeclineIcon(Canvas canvas) {
- HabiticaIcons.drawDeclineIcon(canvas, new RectF(0f, 0f, 13f, 13f), ResizingBehavior.AspectFit);
- }
-
- public static void drawDeclineIcon(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
- // General Declarations
- Paint paint = CacheForDeclineIcon.paint;
-
- // Local Colors
- int strokeColor20 = Color.argb(255, 247, 78, 82);
-
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForDeclineIcon.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForDeclineIcon.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 13f, resizedFrame.height() / 13f);
-
- // Bezier 2
- RectF bezier2Rect = CacheForDeclineIcon.bezier2Rect;
- bezier2Rect.set(2f, 2f, 11f, 11f);
- Path bezier2Path = CacheForDeclineIcon.bezier2Path;
- bezier2Path.reset();
- bezier2Path.moveTo(2f, 2.75f);
- bezier2Path.lineTo(2.75f, 2f);
- bezier2Path.lineTo(6.5f, 5.75f);
- bezier2Path.lineTo(10.25f, 2f);
- bezier2Path.lineTo(11f, 2.75f);
- bezier2Path.lineTo(7.25f, 6.5f);
- bezier2Path.lineTo(11f, 10.25f);
- bezier2Path.lineTo(10.25f, 11f);
- bezier2Path.lineTo(6.5f, 7.25f);
- bezier2Path.lineTo(2.75f, 11f);
- bezier2Path.lineTo(2f, 10.25f);
- bezier2Path.lineTo(5.75f, 6.5f);
- bezier2Path.lineTo(2f, 2.75f);
- bezier2Path.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(1.1f);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor20);
- canvas.drawPath(bezier2Path, paint);
- canvas.restore();
-
- canvas.restore();
- }
-
- private static class CacheForAcceptIcon {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 13f, 13f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- }
-
- public static void drawAcceptIcon(Canvas canvas) {
- HabiticaIcons.drawAcceptIcon(canvas, new RectF(0f, 0f, 13f, 13f), ResizingBehavior.AspectFit);
- }
-
- public static void drawAcceptIcon(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
- // General Declarations
- Paint paint = CacheForAcceptIcon.paint;
-
- // Local Colors
- int fillColor103 = Color.argb(255, 32, 183, 128);
-
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForAcceptIcon.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForAcceptIcon.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 13f, resizedFrame.height() / 13f);
-
- // Bezier
- RectF bezierRect = CacheForAcceptIcon.bezierRect;
- bezierRect.set(0f, 2f, 13f, 12f);
- Path bezierPath = CacheForAcceptIcon.bezierPath;
- bezierPath.reset();
- bezierPath.moveTo(1.5f, 6.5f);
- bezierPath.lineTo(0f, 8f);
- bezierPath.lineTo(4f, 12f);
- bezierPath.lineTo(13f, 3.5f);
- bezierPath.lineTo(11.5f, 2f);
- bezierPath.lineTo(4f, 9f);
- bezierPath.lineTo(1.5f, 6.5f);
- bezierPath.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- bezierPath.setFillType(Path.FillType.EVEN_ODD);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(fillColor103);
- canvas.drawPath(bezierPath, paint);
-
- canvas.restore();
- }
-
+
private static class CacheForBuffIcon {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 15f, 15f);
- private static RectF resizedFrame = new RectF();
- private static RectF rectangleRect = new RectF();
- private static Path rectanglePath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 15f, 15f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF rectangleRect = new RectF();
+ private static final Path rectanglePath = new Path();
+ private static final RectF bezier2Rect = new RectF();
+ private static final Path bezier2Path = new Path();
}
public static void drawBuffIcon(Canvas canvas) {
@@ -11954,15 +9881,15 @@ public class HabiticaIcons {
}
private static class CacheForParticipantsIcon {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 20f, 20f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 20f, 20f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final RectF bezier2Rect = new RectF();
+ private static final Path bezier2Path = new Path();
+ private static final RectF bezier3Rect = new RectF();
+ private static final Path bezier3Path = new Path();
}
public static void drawParticipantsIcon(Canvas canvas) {
@@ -12104,13 +10031,13 @@ public class HabiticaIcons {
}
private static class CacheForChatReplyIcon {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 17f, 17f);
- private static RectF resizedFrame = new RectF();
- private static RectF group = new RectF();
- private static Path clipPath = new Path();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 17f, 17f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF group = new RectF();
+ private static final Path clipPath = new Path();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
}
public static void drawChatReplyIcon(Canvas canvas) {
@@ -12188,11 +10115,11 @@ public class HabiticaIcons {
}
private static class CacheForChatCopyIcon {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 17f, 17f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 17f, 17f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
}
public static void drawChatCopyIcon(Canvas canvas) {
@@ -12258,11 +10185,11 @@ public class HabiticaIcons {
}
private static class CacheForChatReportIcon {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 17f, 18f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 17f, 18f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
}
public static void drawChatReportIcon(Canvas canvas) {
@@ -12335,11 +10262,11 @@ public class HabiticaIcons {
}
private static class CacheForChatDeleteIcon {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 17f, 17f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 17f, 17f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
}
public static void drawChatDeleteIcon(Canvas canvas) {
@@ -12415,11 +10342,11 @@ public class HabiticaIcons {
}
private static class CacheForAlertIcon {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 16f, 16f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 16f, 16f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
}
public static void drawAlertIcon(Canvas canvas) {
@@ -12485,151 +10412,39 @@ public class HabiticaIcons {
canvas.restore();
}
-
- private static class CacheForItemIndicatorLockedDark {
- private static RectF originalFrame = new RectF(0f, 0f, 28f, 28f);
- private static RectF resizedFrame = new RectF();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
- }
-
- private static void drawItemIndicatorLockedDark(Canvas canvas, int indicatorLocked, int lockColor, int indicatorLockedDark, int itemIndicatorColorBackground) {
- HabiticaIcons.drawItemIndicatorLockedDark(canvas, new RectF(0f, 0f, 28f, 28f), ResizingBehavior.AspectFit, indicatorLocked, lockColor, indicatorLockedDark, itemIndicatorColorBackground);
- }
-
- private static void drawItemIndicatorLockedDark(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, int indicatorLocked, int lockColor, int indicatorLockedDark, int itemIndicatorColorBackground) {
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForItemIndicatorLockedDark.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForItemIndicatorLockedDark.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 28f, resizedFrame.height() / 28f);
-
- // Symbol
- RectF symbolRect = CacheForItemIndicatorLockedDark.symbolRect;
- symbolRect.set(0f, 0f, 28f, 28f);
- canvas.save();
- canvas.clipRect(symbolRect);
- canvas.translate(symbolRect.left, symbolRect.top);
- RectF symbolTargetRect = CacheForItemIndicatorLockedDark.symbolTargetRect;
- symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
- HabiticaIcons.drawItemIndicator(canvas, symbolTargetRect, ResizingBehavior.Stretch, indicatorLocked, lockColor, indicatorLockedDark, itemIndicatorColorBackground, true, false, true);
- canvas.restore();
-
- canvas.restore();
- }
-
- private static class CacheForBuffIconDark {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 15f, 15f);
- private static RectF resizedFrame = new RectF();
- private static RectF rectangleRect = new RectF();
- private static Path rectanglePath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- }
-
- public static void drawBuffIconDark(Canvas canvas) {
- HabiticaIcons.drawBuffIconDark(canvas, new RectF(0f, 0f, 15f, 15f), ResizingBehavior.AspectFit);
- }
-
- public static void drawBuffIconDark(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
- // General Declarations
- Paint paint = CacheForBuffIconDark.paint;
-
- // Local Colors
- int fillColor39 = Color.argb(255, 189, 168, 255);
- int buffBackgroundColorDark = Color.argb(255, 70, 40, 125);
-
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForBuffIconDark.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForBuffIconDark.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 15f, resizedFrame.height() / 15f);
-
- // Rectangle
- RectF rectangleRect = CacheForBuffIconDark.rectangleRect;
- rectangleRect.set(0f, 0f, 15f, 15f);
- Path rectanglePath = CacheForBuffIconDark.rectanglePath;
- rectanglePath.reset();
- rectanglePath.addRoundRect(rectangleRect, 2f, 2f, Path.Direction.CW);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(buffBackgroundColorDark);
- canvas.drawPath(rectanglePath, paint);
-
- // Bezier 2
- RectF bezier2Rect = CacheForBuffIconDark.bezier2Rect;
- bezier2Rect.set(3.75f, 3f, 11.25f, 12f);
- Path bezier2Path = CacheForBuffIconDark.bezier2Path;
- bezier2Path.reset();
- bezier2Path.moveTo(7.5f, 3f);
- bezier2Path.lineTo(11.25f, 7.5f);
- bezier2Path.lineTo(9f, 7.5f);
- bezier2Path.lineTo(9f, 9f);
- bezier2Path.lineTo(6f, 9f);
- bezier2Path.lineTo(6f, 7.5f);
- bezier2Path.lineTo(3.75f, 7.5f);
- bezier2Path.lineTo(7.5f, 3f);
- bezier2Path.close();
- bezier2Path.moveTo(6f, 9.75f);
- bezier2Path.lineTo(9f, 9.75f);
- bezier2Path.lineTo(9f, 10.5f);
- bezier2Path.lineTo(6f, 10.5f);
- bezier2Path.lineTo(6f, 9.75f);
- bezier2Path.close();
- bezier2Path.moveTo(6f, 11.25f);
- bezier2Path.lineTo(9f, 11.25f);
- bezier2Path.lineTo(9f, 12f);
- bezier2Path.lineTo(6f, 12f);
- bezier2Path.lineTo(6f, 11.25f);
- bezier2Path.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- bezier2Path.setFillType(Path.FillType.EVEN_ODD);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(fillColor39);
- canvas.drawPath(bezier2Path, paint);
-
- canvas.restore();
- }
-
+
private static class CacheForStats {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 30f, 22f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF group = new RectF();
- private static Path clipPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF rectangleRect = new RectF();
- private static Path rectanglePath = new Path();
- private static RectF rectangle2Rect = new RectF();
- private static Path rectangle2Path = new Path();
- private static RectF rectangle3Rect = new RectF();
- private static Path rectangle3Path = new Path();
- private static RectF rectangle4Rect = new RectF();
- private static Path rectangle4Path = new Path();
- private static RectF rectangle5Rect = new RectF();
- private static Path rectangle5Path = new Path();
- private static RectF rectangle6Rect = new RectF();
- private static Path rectangle6Path = new Path();
- private static RectF rectangle7Rect = new RectF();
- private static Path rectangle7Path = new Path();
- private static RectF rectangle8Rect = new RectF();
- private static Path rectangle8Path = new Path();
- private static RectF rectangle9Rect = new RectF();
- private static Path rectangle9Path = new Path();
- private static RectF rectangle10Rect = new RectF();
- private static Path rectangle10Path = new Path();
- private static RectF rectangle11Rect = new RectF();
- private static Path rectangle11Path = new Path();
+ private static final Paint paint = new Paint();
+ private static final RectF originalFrame = new RectF(0f, 0f, 30f, 22f);
+ private static final RectF resizedFrame = new RectF();
+ private static final RectF bezierRect = new RectF();
+ private static final Path bezierPath = new Path();
+ private static final RectF group = new RectF();
+ private static final Path clipPath = new Path();
+ private static final RectF bezier2Rect = new RectF();
+ private static final Path bezier2Path = new Path();
+ private static final RectF rectangleRect = new RectF();
+ private static final Path rectanglePath = new Path();
+ private static final RectF rectangle2Rect = new RectF();
+ private static final Path rectangle2Path = new Path();
+ private static final RectF rectangle3Rect = new RectF();
+ private static final Path rectangle3Path = new Path();
+ private static final RectF rectangle4Rect = new RectF();
+ private static final Path rectangle4Path = new Path();
+ private static final RectF rectangle5Rect = new RectF();
+ private static final Path rectangle5Path = new Path();
+ private static final RectF rectangle6Rect = new RectF();
+ private static final Path rectangle6Path = new Path();
+ private static final RectF rectangle7Rect = new RectF();
+ private static final Path rectangle7Path = new Path();
+ private static final RectF rectangle8Rect = new RectF();
+ private static final Path rectangle8Path = new Path();
+ private static final RectF rectangle9Rect = new RectF();
+ private static final Path rectangle9Path = new Path();
+ private static final RectF rectangle10Rect = new RectF();
+ private static final Path rectangle10Path = new Path();
+ private static final RectF rectangle11Rect = new RectF();
+ private static final Path rectangle11Path = new Path();
}
public static void drawStats(Canvas canvas) {
@@ -12928,1781 +10743,7 @@ public class HabiticaIcons {
canvas.restore();
}
-
- private static class CacheForDashBorder {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 113f, 116f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
- private static RectF bezier4Rect = new RectF();
- private static Path bezier4Path = new Path();
- private static RectF bezier5Rect = new RectF();
- private static Path bezier5Path = new Path();
- private static PaintCodeDashPathEffect bezier5PathDashEffect = new PaintCodeDashPathEffect();
- private static RectF bezier6Rect = new RectF();
- private static Path bezier6Path = new Path();
- private static PaintCodeDashPathEffect bezier6PathDashEffect = new PaintCodeDashPathEffect();
- private static RectF bezier7Rect = new RectF();
- private static Path bezier7Path = new Path();
- private static PaintCodeDashPathEffect bezier7PathDashEffect = new PaintCodeDashPathEffect();
- private static RectF bezier8Rect = new RectF();
- private static Path bezier8Path = new Path();
- private static PaintCodeDashPathEffect bezier8PathDashEffect = new PaintCodeDashPathEffect();
- }
-
- public static void drawDashBorder(Canvas canvas) {
- HabiticaIcons.drawDashBorder(canvas, new RectF(0f, 0f, 113f, 116f), ResizingBehavior.AspectFit);
- }
-
- public static void drawDashBorder(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
- // General Declarations
- Paint paint = CacheForDashBorder.paint;
-
- // Local Colors
- int strokeColor23 = Color.argb(255, 213, 200, 255);
- int strokeColor22 = Color.argb(255, 97, 51, 180);
-
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForDashBorder.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForDashBorder.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 113f, resizedFrame.height() / 116f);
-
- // Bezier
- RectF bezierRect = CacheForDashBorder.bezierRect;
- bezierRect.set(2f, 2f, 18f, 18f);
- Path bezierPath = CacheForDashBorder.bezierPath;
- bezierPath.reset();
- bezierPath.moveTo(18f, 2f);
- bezierPath.lineTo(2f, 2f);
- bezierPath.lineTo(2f, 18f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(3f);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor22);
- canvas.drawPath(bezierPath, paint);
- canvas.restore();
-
- // Bezier 2
- RectF bezier2Rect = CacheForDashBorder.bezier2Rect;
- bezier2Rect.set(2f, 98f, 18f, 114f);
- Path bezier2Path = CacheForDashBorder.bezier2Path;
- bezier2Path.reset();
- bezier2Path.moveTo(18f, 114f);
- bezier2Path.lineTo(2f, 114f);
- bezier2Path.lineTo(2f, 98f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(3f);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor22);
- canvas.drawPath(bezier2Path, paint);
- canvas.restore();
-
- // Bezier 3
- RectF bezier3Rect = CacheForDashBorder.bezier3Rect;
- bezier3Rect.set(95f, 2f, 111f, 18f);
- Path bezier3Path = CacheForDashBorder.bezier3Path;
- bezier3Path.reset();
- bezier3Path.moveTo(95f, 2f);
- bezier3Path.lineTo(111f, 2f);
- bezier3Path.lineTo(111f, 18f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(3f);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor22);
- canvas.drawPath(bezier3Path, paint);
- canvas.restore();
-
- // Bezier 4
- RectF bezier4Rect = CacheForDashBorder.bezier4Rect;
- bezier4Rect.set(95f, 98f, 111f, 114f);
- Path bezier4Path = CacheForDashBorder.bezier4Path;
- bezier4Path.reset();
- bezier4Path.moveTo(95f, 114f);
- bezier4Path.lineTo(111f, 114f);
- bezier4Path.lineTo(111f, 98f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(3f);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor22);
- canvas.drawPath(bezier4Path, paint);
- canvas.restore();
-
- // Bezier 5
- RectF bezier5Rect = CacheForDashBorder.bezier5Rect;
- bezier5Rect.set(2f, 22f, 2f, 94f);
- Path bezier5Path = CacheForDashBorder.bezier5Path;
- bezier5Path.reset();
- bezier5Path.moveTo(2f, 22f);
- bezier5Path.lineTo(2f, 94f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(3f);
- paint.setStrokeMiter(10f);
- paint.setPathEffect(CacheForDashBorder.bezier5PathDashEffect.get(8f, 8f, 0f));
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor23);
- canvas.drawPath(bezier5Path, paint);
- canvas.restore();
-
- // Bezier 6
- RectF bezier6Rect = CacheForDashBorder.bezier6Rect;
- bezier6Rect.set(111f, 22f, 111f, 94f);
- Path bezier6Path = CacheForDashBorder.bezier6Path;
- bezier6Path.reset();
- bezier6Path.moveTo(111f, 22f);
- bezier6Path.lineTo(111f, 94f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(3f);
- paint.setStrokeMiter(10f);
- paint.setPathEffect(CacheForDashBorder.bezier6PathDashEffect.get(8f, 8f, 0f));
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor23);
- canvas.drawPath(bezier6Path, paint);
- canvas.restore();
-
- // Bezier 7
- RectF bezier7Rect = CacheForDashBorder.bezier7Rect;
- bezier7Rect.set(22f, 114f, 94f, 114f);
- Path bezier7Path = CacheForDashBorder.bezier7Path;
- bezier7Path.reset();
- bezier7Path.moveTo(22f, 114f);
- bezier7Path.lineTo(94f, 114f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(3f);
- paint.setStrokeMiter(10f);
- paint.setPathEffect(CacheForDashBorder.bezier7PathDashEffect.get(8f, 7f, 0f));
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor23);
- canvas.drawPath(bezier7Path, paint);
- canvas.restore();
-
- // Bezier 8
- RectF bezier8Rect = CacheForDashBorder.bezier8Rect;
- bezier8Rect.set(22f, 2f, 94f, 2f);
- Path bezier8Path = CacheForDashBorder.bezier8Path;
- bezier8Path.reset();
- bezier8Path.moveTo(22f, 2f);
- bezier8Path.lineTo(94f, 2f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(3f);
- paint.setStrokeMiter(10f);
- paint.setPathEffect(CacheForDashBorder.bezier8PathDashEffect.get(8f, 7f, 0f));
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor23);
- canvas.drawPath(bezier8Path, paint);
- canvas.restore();
-
- canvas.restore();
- }
-
- private static class CacheForTaskFilterIcon {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 30f, 28f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
- private static RectF ovalRect = new RectF();
- private static Path ovalPath = new Path();
- }
-
- public static void drawTaskFilterIcon(Canvas canvas, boolean filter_active) {
- HabiticaIcons.drawTaskFilterIcon(canvas, new RectF(0f, 0f, 30f, 28f), ResizingBehavior.AspectFit, filter_active);
- }
-
- public static void drawTaskFilterIcon(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, boolean filter_active) {
- // General Declarations
- Paint paint = CacheForTaskFilterIcon.paint;
-
- // Local Colors
- int strokeColor18 = Color.argb(255, 78, 74, 87);
- int fillColor108 = Color.argb(255, 78, 74, 87);
-
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForTaskFilterIcon.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForTaskFilterIcon.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 30f, resizedFrame.height() / 28f);
-
- // Group
- {
- // Group 2
- {
- // Bezier
- RectF bezierRect = CacheForTaskFilterIcon.bezierRect;
- bezierRect.set(4.5f, 7.5f, 24.5f, 7.5f);
- Path bezierPath = CacheForTaskFilterIcon.bezierPath;
- bezierPath.reset();
- bezierPath.moveTo(4.5f, 7.5f);
- bezierPath.lineTo(24.5f, 7.5f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(2f);
- paint.setStrokeCap(Paint.Cap.ROUND);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor18);
- canvas.drawPath(bezierPath, paint);
- canvas.restore();
-
- // Bezier 2
- RectF bezier2Rect = CacheForTaskFilterIcon.bezier2Rect;
- bezier2Rect.set(7.5f, 14.5f, 21.5f, 14.5f);
- Path bezier2Path = CacheForTaskFilterIcon.bezier2Path;
- bezier2Path.reset();
- bezier2Path.moveTo(7.5f, 14.5f);
- bezier2Path.lineTo(21.5f, 14.5f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(2f);
- paint.setStrokeCap(Paint.Cap.ROUND);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor18);
- canvas.drawPath(bezier2Path, paint);
- canvas.restore();
-
- // Bezier 3
- RectF bezier3Rect = CacheForTaskFilterIcon.bezier3Rect;
- bezier3Rect.set(10.5f, 21.5f, 18.5f, 21.5f);
- Path bezier3Path = CacheForTaskFilterIcon.bezier3Path;
- bezier3Path.reset();
- bezier3Path.moveTo(10.5f, 21.5f);
- bezier3Path.lineTo(18.5f, 21.5f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(2f);
- paint.setStrokeCap(Paint.Cap.ROUND);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor18);
- canvas.drawPath(bezier3Path, paint);
- canvas.restore();
- }
-
- // Oval
- if (filter_active) {
- RectF ovalRect = CacheForTaskFilterIcon.ovalRect;
- ovalRect.set(19.5f, 1f, 29.5f, 11f);
- Path ovalPath = CacheForTaskFilterIcon.ovalPath;
- ovalPath.reset();
- ovalPath.addOval(ovalRect, Path.Direction.CW);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(fillColor108);
- canvas.drawPath(ovalPath, paint);
- }
- }
-
- canvas.restore();
- }
-
- private static class CacheForFallGemPromoBG {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 132f, 35f);
- private static RectF resizedFrame = new RectF();
- private static RectF group = new RectF();
- private static Path clip2Path = new Path();
- private static RectF group2 = new RectF();
- private static Path clipPath = new Path();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF group3 = new RectF();
- private static Path clip4Path = new Path();
- private static RectF group4 = new RectF();
- private static Path clip3Path = new Path();
- private static RectF bezier3Rect = new RectF();
- private static Path bezier3Path = new Path();
- private static RectF bezier5Rect = new RectF();
- private static Path bezier5Path = new Path();
- private static RectF bezier6Rect = new RectF();
- private static Path bezier6Path = new Path();
- private static RectF group5 = new RectF();
- private static Path clip6Path = new Path();
- private static RectF group6 = new RectF();
- private static Path clip5Path = new Path();
- private static RectF bezier7Rect = new RectF();
- private static Path bezier7Path = new Path();
- private static RectF group7 = new RectF();
- private static Path clip8Path = new Path();
- private static RectF group8 = new RectF();
- private static Path clip7Path = new Path();
- private static RectF bezier9Rect = new RectF();
- private static Path bezier9Path = new Path();
- private static RectF bezier11Rect = new RectF();
- private static Path bezier11Path = new Path();
- private static RectF bezier12Rect = new RectF();
- private static Path bezier12Path = new Path();
- }
-
- public static void drawFallGemPromoBG(Canvas canvas, int redGemColor, int greenGemColor, int blueGemColor, int purpleGemColor) {
- HabiticaIcons.drawFallGemPromoBG(canvas, new RectF(0f, 0f, 132f, 35f), ResizingBehavior.AspectFit, redGemColor, greenGemColor, blueGemColor, purpleGemColor);
- }
-
- public static void drawFallGemPromoBG(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, int redGemColor, int greenGemColor, int blueGemColor, int purpleGemColor) {
- // General Declarations
- Paint paint = CacheForFallGemPromoBG.paint;
-
- // Local Colors
- int strokeColor26 = Color.argb(255, 255, 255, 255);
-
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForFallGemPromoBG.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForFallGemPromoBG.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 132f, resizedFrame.height() / 35f);
-
- // Group
- {
- RectF group = CacheForFallGemPromoBG.group;
- group.set(110.05f, 3.28f, 119.46f, 13.06f);
- canvas.save();
-
- // Clip 2
- Path clip2Path = CacheForFallGemPromoBG.clip2Path;
- clip2Path.reset();
- clip2Path.moveTo(110.54f, 4.1f);
- clip2Path.lineTo(110.05f, 8.37f);
- clip2Path.lineTo(115.26f, 13.06f);
- clip2Path.lineTo(119.46f, 12.13f);
- clip2Path.lineTo(119.35f, 3.28f);
- clip2Path.lineTo(110.54f, 4.1f);
- clip2Path.close();
- canvas.clipPath(clip2Path);
-
- // Group 2
- {
- RectF group2 = CacheForFallGemPromoBG.group2;
- group2.set(110f, 3f, 120f, 14f);
- canvas.save();
-
- // Clip
- Path clipPath = CacheForFallGemPromoBG.clipPath;
- clipPath.reset();
- clipPath.addRect(group2, Path.Direction.CW);
- canvas.clipPath(clipPath);
-
- // Bezier
- RectF bezierRect = CacheForFallGemPromoBG.bezierRect;
- bezierRect.set(110.05f, 3.28f, 119.46f, 13.06f);
- Path bezierPath = CacheForFallGemPromoBG.bezierPath;
- bezierPath.reset();
- bezierPath.moveTo(110.54f, 4.1f);
- bezierPath.lineTo(110.05f, 8.37f);
- bezierPath.lineTo(115.26f, 13.06f);
- bezierPath.lineTo(119.46f, 12.13f);
- bezierPath.lineTo(119.35f, 3.28f);
- bezierPath.lineTo(110.54f, 4.1f);
- bezierPath.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(2f);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(blueGemColor);
- canvas.drawPath(bezierPath, paint);
- canvas.restore();
-
- canvas.restore();
- }
-
- canvas.restore();
- }
-
- // Group 3
- {
- RectF group3 = CacheForFallGemPromoBG.group3;
- group3.set(114.54f, 23.3f, 126.18f, 33.85f);
- canvas.save();
-
- // Clip 4
- Path clip4Path = CacheForFallGemPromoBG.clip4Path;
- clip4Path.reset();
- clip4Path.moveTo(126.18f, 29f);
- clip4Path.lineTo(124.61f, 25f);
- clip4Path.lineTo(117.81f, 23.3f);
- clip4Path.lineTo(114.54f, 26.09f);
- clip4Path.lineTo(118.79f, 33.85f);
- clip4Path.lineTo(126.18f, 29f);
- clip4Path.close();
- canvas.clipPath(clip4Path);
-
- // Group 4
- {
- RectF group4 = CacheForFallGemPromoBG.group4;
- group4.set(114f, 23f, 127f, 34f);
- canvas.save();
-
- // Clip 3
- Path clip3Path = CacheForFallGemPromoBG.clip3Path;
- clip3Path.reset();
- clip3Path.addRect(group4, Path.Direction.CW);
- canvas.clipPath(clip3Path);
-
- // Bezier 3
- RectF bezier3Rect = CacheForFallGemPromoBG.bezier3Rect;
- bezier3Rect.set(114.54f, 23.3f, 126.18f, 33.85f);
- Path bezier3Path = CacheForFallGemPromoBG.bezier3Path;
- bezier3Path.reset();
- bezier3Path.moveTo(126.18f, 29f);
- bezier3Path.lineTo(124.61f, 25f);
- bezier3Path.lineTo(117.81f, 23.3f);
- bezier3Path.lineTo(114.54f, 26.09f);
- bezier3Path.lineTo(118.79f, 33.85f);
- bezier3Path.lineTo(126.18f, 29f);
- bezier3Path.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(2f);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(purpleGemColor);
- canvas.drawPath(bezier3Path, paint);
- canvas.restore();
-
- canvas.restore();
- }
-
- canvas.restore();
- }
-
- // Bezier 5
- RectF bezier5Rect = CacheForFallGemPromoBG.bezier5Rect;
- bezier5Rect.set(104.86f, 16.84f, 109.14f, 21.16f);
- Path bezier5Path = CacheForFallGemPromoBG.bezier5Path;
- bezier5Path.reset();
- bezier5Path.moveTo(109.08f, 21.16f);
- bezier5Path.cubicTo(109.35f, 19.51f, 108.65f, 18.79f, 107f, 19f);
- bezier5Path.cubicTo(105.35f, 19.21f, 104.65f, 18.49f, 104.92f, 16.84f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(1f);
- paint.setStrokeJoin(Paint.Join.ROUND);
- paint.setStrokeCap(Paint.Cap.ROUND);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor26);
- canvas.drawPath(bezier5Path, paint);
- canvas.restore();
-
- // Bezier 6
- RectF bezier6Rect = CacheForFallGemPromoBG.bezier6Rect;
- bezier6Rect.set(129.02f, 7.16f, 130.98f, 12.84f);
- Path bezier6Path = CacheForFallGemPromoBG.bezier6Path;
- bezier6Path.reset();
- bezier6Path.moveTo(129.02f, 12.84f);
- bezier6Path.cubicTo(130.61f, 12.33f, 130.94f, 11.38f, 130f, 10f);
- bezier6Path.cubicTo(129.06f, 8.62f, 129.39f, 7.67f, 130.98f, 7.16f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(1f);
- paint.setStrokeJoin(Paint.Join.ROUND);
- paint.setStrokeCap(Paint.Cap.ROUND);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor26);
- canvas.drawPath(bezier6Path, paint);
- canvas.restore();
-
- // Group 5
- {
- RectF group5 = CacheForFallGemPromoBG.group5;
- group5.set(12.78f, -0.1f, 22.85f, 10.19f);
- canvas.save();
-
- // Clip 6
- Path clip6Path = CacheForFallGemPromoBG.clip6Path;
- clip6Path.reset();
- clip6Path.moveTo(12.78f, 1.47f);
- clip6Path.lineTo(16.79f, -0.1f);
- clip6Path.lineTo(22.66f, 3.71f);
- clip6Path.lineTo(22.85f, 8.01f);
- clip6Path.lineTo(14.28f, 10.19f);
- clip6Path.lineTo(12.78f, 1.47f);
- clip6Path.close();
- canvas.clipPath(clip6Path);
-
- // Group 6
- {
- RectF group6 = CacheForFallGemPromoBG.group6;
- group6.set(12f, -1f, 23f, 11f);
- canvas.save();
-
- // Clip 5
- Path clip5Path = CacheForFallGemPromoBG.clip5Path;
- clip5Path.reset();
- clip5Path.addRect(group6, Path.Direction.CW);
- canvas.clipPath(clip5Path);
-
- // Bezier 7
- RectF bezier7Rect = CacheForFallGemPromoBG.bezier7Rect;
- bezier7Rect.set(12.78f, -0.1f, 22.85f, 10.19f);
- Path bezier7Path = CacheForFallGemPromoBG.bezier7Path;
- bezier7Path.reset();
- bezier7Path.moveTo(12.78f, 1.47f);
- bezier7Path.lineTo(16.79f, -0.1f);
- bezier7Path.lineTo(22.66f, 3.71f);
- bezier7Path.lineTo(22.85f, 8.01f);
- bezier7Path.lineTo(14.28f, 10.19f);
- bezier7Path.lineTo(12.78f, 1.47f);
- bezier7Path.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(2f);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(redGemColor);
- canvas.drawPath(bezier7Path, paint);
- canvas.restore();
-
- canvas.restore();
- }
-
- canvas.restore();
- }
-
- // Group 7
- {
- RectF group7 = CacheForFallGemPromoBG.group7;
- group7.set(6.82f, 22.23f, 18.35f, 32.81f);
- canvas.save();
-
- // Clip 8
- Path clip8Path = CacheForFallGemPromoBG.clip8Path;
- clip8Path.reset();
- clip8Path.moveTo(6.82f, 28.21f);
- clip8Path.lineTo(8.26f, 24.16f);
- clip8Path.lineTo(14.99f, 22.23f);
- clip8Path.lineTo(18.35f, 24.9f);
- clip8Path.lineTo(14.38f, 32.81f);
- clip8Path.lineTo(6.82f, 28.21f);
- clip8Path.close();
- canvas.clipPath(clip8Path);
-
- // Group 8
- {
- RectF group8 = CacheForFallGemPromoBG.group8;
- group8.set(6f, 22f, 19f, 33f);
- canvas.save();
-
- // Clip 7
- Path clip7Path = CacheForFallGemPromoBG.clip7Path;
- clip7Path.reset();
- clip7Path.addRect(group8, Path.Direction.CW);
- canvas.clipPath(clip7Path);
-
- // Bezier 9
- RectF bezier9Rect = CacheForFallGemPromoBG.bezier9Rect;
- bezier9Rect.set(6.82f, 22.23f, 18.35f, 32.81f);
- Path bezier9Path = CacheForFallGemPromoBG.bezier9Path;
- bezier9Path.reset();
- bezier9Path.moveTo(6.82f, 28.21f);
- bezier9Path.lineTo(8.26f, 24.16f);
- bezier9Path.lineTo(14.99f, 22.23f);
- bezier9Path.lineTo(18.35f, 24.9f);
- bezier9Path.lineTo(14.38f, 32.81f);
- bezier9Path.lineTo(6.82f, 28.21f);
- bezier9Path.close();
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(2f);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(greenGemColor);
- canvas.drawPath(bezier9Path, paint);
- canvas.restore();
-
- canvas.restore();
- }
-
- canvas.restore();
- }
-
- // Bezier 11
- RectF bezier11Rect = CacheForFallGemPromoBG.bezier11Rect;
- bezier11Rect.set(24.7f, 16.97f, 29.3f, 21.03f);
- Path bezier11Path = CacheForFallGemPromoBG.bezier11Path;
- bezier11Path.reset();
- bezier11Path.moveTo(29.3f, 20.93f);
- bezier11Path.cubicTo(27.68f, 21.31f, 26.91f, 20.66f, 27f, 19f);
- bezier11Path.cubicTo(27.09f, 17.34f, 26.32f, 16.69f, 24.7f, 17.07f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(1f);
- paint.setStrokeJoin(Paint.Join.ROUND);
- paint.setStrokeCap(Paint.Cap.ROUND);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor26);
- canvas.drawPath(bezier11Path, paint);
- canvas.restore();
-
- // Bezier 12
- RectF bezier12Rect = CacheForFallGemPromoBG.bezier12Rect;
- bezier12Rect.set(0.84f, 11.02f, 3.16f, 16.98f);
- Path bezier12Path = CacheForFallGemPromoBG.bezier12Path;
- bezier12Path.reset();
- bezier12Path.moveTo(1.69f, 16.98f);
- bezier12Path.cubicTo(0.46f, 15.85f, 0.57f, 14.86f, 2f, 14f);
- bezier12Path.cubicTo(3.43f, 13.14f, 3.54f, 12.15f, 2.31f, 11.02f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(1f);
- paint.setStrokeJoin(Paint.Join.ROUND);
- paint.setStrokeCap(Paint.Cap.ROUND);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor26);
- canvas.drawPath(bezier12Path, paint);
- canvas.restore();
-
- canvas.restore();
- }
-
- private static class CacheForSpookyGemPromoBG {
- private static Paint paint = new Paint();
- private static RectF originalFrame = new RectF(0f, 0f, 132f, 35f);
- private static RectF resizedFrame = new RectF();
- private static RectF bezierRect = new RectF();
- private static Path bezierPath = new Path();
- private static RectF bezier2Rect = new RectF();
- private static Path bezier2Path = new Path();
- private static RectF group = new RectF();
- private static Path clipPath = new Path();
- private static RectF rectangle2Rect = new RectF();
- private static Path rectangle2Path = new Path();
- private static RectF group2 = new RectF();
- private static Path clip2Path = new Path();
- private static RectF rectangle3Rect = new RectF();
- private static Path rectangle3Path = new Path();
- private static RectF bezier5Rect = new RectF();
- private static Path bezier5Path = new Path();
- private static RectF bezier6Rect = new RectF();
- private static Path bezier6Path = new Path();
- private static RectF group3 = new RectF();
- private static Path clip3Path = new Path();
- private static RectF rectangle4Rect = new RectF();
- private static Path rectangle4Path = new Path();
- private static RectF group4 = new RectF();
- private static Path clip4Path = new Path();
- private static RectF rectangle5Rect = new RectF();
- private static Path rectangle5Path = new Path();
- }
-
- public static void drawSpookyGemPromoBG(Canvas canvas) {
- HabiticaIcons.drawSpookyGemPromoBG(canvas, new RectF(0f, 0f, 132f, 35f), ResizingBehavior.AspectFit);
- }
-
- public static void drawSpookyGemPromoBG(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
- // General Declarations
- Stack currentTransformation = new Stack();
- currentTransformation.push(new Matrix());
- Paint paint = CacheForSpookyGemPromoBG.paint;
-
- // Local Colors
- int fillColor109 = Color.argb(255, 250, 133, 55);
- int strokeColor24 = Color.argb(255, 146, 92, 243);
- int fillColor73 = Color.argb(255, 255, 180, 69);
-
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForSpookyGemPromoBG.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForSpookyGemPromoBG.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 132f, resizedFrame.height() / 35f);
-
- // Bezier
- RectF bezierRect = CacheForSpookyGemPromoBG.bezierRect;
- bezierRect.set(22.7f, 18.97f, 27.3f, 23.03f);
- Path bezierPath = CacheForSpookyGemPromoBG.bezierPath;
- bezierPath.reset();
- bezierPath.moveTo(27.3f, 22.93f);
- bezierPath.cubicTo(25.68f, 23.31f, 24.91f, 22.66f, 25f, 21f);
- bezierPath.cubicTo(25.09f, 19.34f, 24.32f, 18.69f, 22.7f, 19.07f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(1f);
- paint.setStrokeJoin(Paint.Join.ROUND);
- paint.setStrokeCap(Paint.Cap.ROUND);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor24);
- canvas.drawPath(bezierPath, paint);
- canvas.restore();
-
- // Bezier 2
- RectF bezier2Rect = CacheForSpookyGemPromoBG.bezier2Rect;
- bezier2Rect.set(1.84f, 8.02f, 4.16f, 13.98f);
- Path bezier2Path = CacheForSpookyGemPromoBG.bezier2Path;
- bezier2Path.reset();
- bezier2Path.moveTo(2.69f, 13.98f);
- bezier2Path.cubicTo(1.46f, 12.85f, 1.57f, 11.86f, 3f, 11f);
- bezier2Path.cubicTo(4.43f, 10.14f, 4.54f, 9.15f, 3.31f, 8.02f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(1f);
- paint.setStrokeJoin(Paint.Join.ROUND);
- paint.setStrokeCap(Paint.Cap.ROUND);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor24);
- canvas.drawPath(bezier2Path, paint);
- canvas.restore();
-
- // Group
- {
- RectF group = CacheForSpookyGemPromoBG.group;
- group.set(0.44f, 22.63f, 13.33f, 31.12f);
- canvas.save();
-
- // Clip
- Path clipPath = CacheForSpookyGemPromoBG.clipPath;
- clipPath.reset();
- clipPath.moveTo(9.58f, 25.14f);
- clipPath.cubicTo(9.58f, 25.14f, 10.18f, 27.22f, 8.95f, 28.1f);
- clipPath.lineTo(8.57f, 27.2f);
- clipPath.cubicTo(8.57f, 27.2f, 8.51f, 27.72f, 7.98f, 27.94f);
- clipPath.cubicTo(7.44f, 28.17f, 7.03f, 27.85f, 7.03f, 27.85f);
- clipPath.lineTo(7.41f, 28.75f);
- clipPath.cubicTo(5.92f, 29.03f, 4.85f, 27.15f, 4.85f, 27.15f);
- clipPath.cubicTo(2.67f, 26.45f, 0.44f, 28.1f, 0.44f, 28.1f);
- clipPath.cubicTo(2.46f, 28.59f, 2.8f, 30.21f, 2.8f, 30.21f);
- clipPath.cubicTo(4.9f, 29.25f, 5.83f, 31.12f, 5.83f, 31.12f);
- clipPath.cubicTo(7.34f, 28.92f, 9.17f, 30.76f, 9.17f, 30.76f);
- clipPath.cubicTo(9.17f, 30.76f, 9.12f, 28.17f, 11.75f, 28.61f);
- clipPath.cubicTo(11.75f, 28.61f, 11.05f, 26.64f, 13.2f, 25.8f);
- clipPath.cubicTo(13.2f, 25.8f, 12.27f, 24.42f, 13.33f, 22.63f);
- clipPath.cubicTo(13.33f, 22.63f, 10.59f, 23.09f, 9.58f, 25.14f);
- clipPath.close();
- canvas.clipPath(clipPath);
-
- // Rectangle 2
- canvas.save();
- canvas.translate(8f, 28f);
- currentTransformation.peek().postTranslate(8f, 28f);
- canvas.rotate(-23f);
- currentTransformation.peek().postRotate(-23f);
- RectF rectangle2Rect = CacheForSpookyGemPromoBG.rectangle2Rect;
- rectangle2Rect.set(-12f, -8f, 12f, 8f);
- Path rectangle2Path = CacheForSpookyGemPromoBG.rectangle2Path;
- rectangle2Path.reset();
- rectangle2Path.addRect(rectangle2Rect, Path.Direction.CW);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(fillColor109);
- canvas.drawPath(rectangle2Path, paint);
- canvas.restore();
-
- canvas.restore();
- }
-
- // Group 2
- {
- RectF group2 = CacheForSpookyGemPromoBG.group2;
- group2.set(14.31f, 1.02f, 27.55f, 8.96f);
- canvas.save();
-
- // Clip 2
- Path clip2Path = CacheForSpookyGemPromoBG.clip2Path;
- clip2Path.reset();
- clip2Path.moveTo(27.55f, 5.58f);
- clip2Path.cubicTo(27.55f, 5.58f, 25.21f, 4.08f, 23.08f, 4.93f);
- clip2Path.cubicTo(23.08f, 4.93f, 22.14f, 6.88f, 20.64f, 6.71f);
- clip2Path.lineTo(20.96f, 5.78f);
- clip2Path.cubicTo(20.96f, 5.78f, 20.57f, 6.13f, 20.02f, 5.94f);
- clip2Path.cubicTo(19.47f, 5.76f, 19.38f, 5.24f, 19.38f, 5.24f);
- clip2Path.lineTo(19.06f, 6.16f);
- clip2Path.cubicTo(17.77f, 5.38f, 18.23f, 3.26f, 18.23f, 3.26f);
- clip2Path.cubicTo(17.07f, 1.28f, 14.31f, 1.02f, 14.31f, 1.02f);
- clip2Path.cubicTo(15.49f, 2.73f, 14.65f, 4.17f, 14.65f, 4.17f);
- clip2Path.cubicTo(16.86f, 4.86f, 16.31f, 6.87f, 16.31f, 6.87f);
- clip2Path.cubicTo(18.9f, 6.25f, 19.02f, 8.84f, 19.02f, 8.84f);
- clip2Path.cubicTo(19.02f, 8.84f, 20.72f, 6.87f, 22.38f, 8.96f);
- clip2Path.cubicTo(22.38f, 8.96f, 23.18f, 7.03f, 25.34f, 7.84f);
- clip2Path.cubicTo(25.34f, 7.84f, 25.57f, 6.2f, 27.55f, 5.58f);
- clip2Path.close();
- canvas.clipPath(clip2Path);
-
- // Rectangle 3
- canvas.save();
- canvas.translate(20f, 6f);
- currentTransformation.peek().postTranslate(20f, 6f);
- canvas.rotate(19f);
- currentTransformation.peek().postRotate(19f);
- RectF rectangle3Rect = CacheForSpookyGemPromoBG.rectangle3Rect;
- rectangle3Rect.set(-12f, -8f, 12f, 8f);
- Path rectangle3Path = CacheForSpookyGemPromoBG.rectangle3Path;
- rectangle3Path.reset();
- rectangle3Path.addRect(rectangle3Rect, Path.Direction.CW);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(fillColor73);
- canvas.drawPath(rectangle3Path, paint);
- canvas.restore();
-
- canvas.restore();
- }
-
- // Bezier 5
- RectF bezier5Rect = CacheForSpookyGemPromoBG.bezier5Rect;
- bezier5Rect.set(103.86f, 14.84f, 108.14f, 19.16f);
- Path bezier5Path = CacheForSpookyGemPromoBG.bezier5Path;
- bezier5Path.reset();
- bezier5Path.moveTo(108.08f, 19.16f);
- bezier5Path.cubicTo(108.35f, 17.51f, 107.65f, 16.79f, 106f, 17f);
- bezier5Path.cubicTo(104.35f, 17.21f, 103.65f, 16.49f, 103.92f, 14.84f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(1f);
- paint.setStrokeJoin(Paint.Join.ROUND);
- paint.setStrokeCap(Paint.Cap.ROUND);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor24);
- canvas.drawPath(bezier5Path, paint);
- canvas.restore();
-
- // Bezier 6
- RectF bezier6Rect = CacheForSpookyGemPromoBG.bezier6Rect;
- bezier6Rect.set(128.02f, 8.16f, 129.98f, 13.84f);
- Path bezier6Path = CacheForSpookyGemPromoBG.bezier6Path;
- bezier6Path.reset();
- bezier6Path.moveTo(128.02f, 13.84f);
- bezier6Path.cubicTo(129.61f, 13.33f, 129.94f, 12.38f, 129f, 11f);
- bezier6Path.cubicTo(128.06f, 9.62f, 128.39f, 8.67f, 129.98f, 8.16f);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStrokeWidth(1f);
- paint.setStrokeJoin(Paint.Join.ROUND);
- paint.setStrokeCap(Paint.Cap.ROUND);
- paint.setStrokeMiter(10f);
- canvas.save();
- paint.setStyle(Paint.Style.STROKE);
- paint.setColor(strokeColor24);
- canvas.drawPath(bezier6Path, paint);
- canvas.restore();
-
- // Group 3
- {
- RectF group3 = CacheForSpookyGemPromoBG.group3;
- group3.set(107.98f, 1.43f, 121.5f, 8.9f);
- canvas.save();
-
- // Clip 3
- Path clip3Path = CacheForSpookyGemPromoBG.clip3Path;
- clip3Path.reset();
- clip3Path.moveTo(117f, 4.72f);
- clip3Path.cubicTo(117f, 4.72f, 116.2f, 6.73f, 114.69f, 6.66f);
- clip3Path.lineTo(114.94f, 5.72f);
- clip3Path.cubicTo(114.94f, 5.72f, 114.57f, 6.09f, 114.02f, 5.94f);
- clip3Path.cubicTo(113.46f, 5.79f, 113.33f, 5.29f, 113.33f, 5.29f);
- clip3Path.lineTo(113.07f, 6.23f);
- clip3Path.cubicTo(111.73f, 5.53f, 112.04f, 3.39f, 112.04f, 3.39f);
- clip3Path.cubicTo(110.75f, 1.5f, 107.98f, 1.43f, 107.98f, 1.43f);
- clip3Path.cubicTo(109.27f, 3.05f, 108.54f, 4.54f, 108.54f, 4.54f);
- clip3Path.cubicTo(110.79f, 5.08f, 110.37f, 7.12f, 110.37f, 7.12f);
- clip3Path.cubicTo(112.92f, 6.32f, 113.22f, 8.9f, 113.22f, 8.9f);
- clip3Path.cubicTo(113.22f, 8.9f, 114.78f, 6.82f, 116.58f, 8.79f);
- clip3Path.cubicTo(116.58f, 8.79f, 117.24f, 6.81f, 119.46f, 7.47f);
- clip3Path.cubicTo(119.46f, 7.47f, 119.57f, 5.81f, 121.5f, 5.05f);
- clip3Path.cubicTo(121.5f, 5.05f, 119.06f, 3.72f, 117f, 4.72f);
- clip3Path.close();
- canvas.clipPath(clip3Path);
-
- // Rectangle 4
- canvas.save();
- canvas.translate(114f, 6f);
- currentTransformation.peek().postTranslate(114f, 6f);
- canvas.rotate(15f);
- currentTransformation.peek().postRotate(15f);
- RectF rectangle4Rect = CacheForSpookyGemPromoBG.rectangle4Rect;
- rectangle4Rect.set(-12f, -8f, 12f, 8f);
- Path rectangle4Path = CacheForSpookyGemPromoBG.rectangle4Path;
- rectangle4Path.reset();
- rectangle4Path.addRect(rectangle4Rect, Path.Direction.CW);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(fillColor109);
- canvas.drawPath(rectangle4Path, paint);
- canvas.restore();
-
- canvas.restore();
- }
-
- // Group 4
- {
- RectF group4 = CacheForSpookyGemPromoBG.group4;
- group4.set(110.51f, 22.02f, 122.9f, 31.36f);
- canvas.save();
-
- // Clip 4
- Path clip4Path = CacheForSpookyGemPromoBG.clip4Path;
- clip4Path.reset();
- clip4Path.moveTo(122.63f, 22.02f);
- clip4Path.cubicTo(122.63f, 22.02f, 119.97f, 22.81f, 119.22f, 24.97f);
- clip4Path.cubicTo(119.22f, 24.97f, 120.07f, 26.96f, 118.95f, 27.98f);
- clip4Path.lineTo(118.47f, 27.14f);
- clip4Path.cubicTo(118.47f, 27.14f, 118.47f, 27.66f, 117.97f, 27.95f);
- clip4Path.cubicTo(117.47f, 28.24f, 117.02f, 27.97f, 117.02f, 27.97f);
- clip4Path.lineTo(117.51f, 28.82f);
- clip4Path.cubicTo(116.07f, 29.27f, 114.77f, 27.54f, 114.77f, 27.54f);
- clip4Path.cubicTo(112.52f, 27.11f, 110.51f, 29.02f, 110.51f, 29.02f);
- clip4Path.cubicTo(112.57f, 29.26f, 113.11f, 30.83f, 113.11f, 30.83f);
- clip4Path.cubicTo(115.08f, 29.62f, 116.23f, 31.36f, 116.23f, 31.36f);
- clip4Path.cubicTo(117.46f, 28.99f, 119.5f, 30.6f, 119.5f, 30.6f);
- clip4Path.cubicTo(119.5f, 30.6f, 119.13f, 28.03f, 121.79f, 28.15f);
- clip4Path.cubicTo(121.79f, 28.15f, 120.86f, 26.28f, 122.9f, 25.18f);
- clip4Path.cubicTo(122.9f, 25.18f, 121.8f, 23.93f, 122.63f, 22.02f);
- clip4Path.close();
- canvas.clipPath(clip4Path);
-
- // Rectangle 5
- canvas.save();
- canvas.translate(118f, 28f);
- currentTransformation.peek().postTranslate(118f, 28f);
- canvas.rotate(-30f);
- currentTransformation.peek().postRotate(-30f);
- RectF rectangle5Rect = CacheForSpookyGemPromoBG.rectangle5Rect;
- rectangle5Rect.set(-12f, -8f, 12f, 8f);
- Path rectangle5Path = CacheForSpookyGemPromoBG.rectangle5Path;
- rectangle5Path.reset();
- rectangle5Path.addRect(rectangle5Rect, Path.Direction.CW);
-
- paint.reset();
- paint.setFlags(Paint.ANTI_ALIAS_FLAG);
- paint.setStyle(Paint.Style.FILL);
- paint.setColor(fillColor73);
- canvas.drawPath(rectangle5Path, paint);
- canvas.restore();
-
- canvas.restore();
- }
-
- canvas.restore();
- }
-
- private static class CacheForItemIndicatorNumberDark {
- private static RectF originalFrame = new RectF(0f, 0f, 28f, 28f);
- private static RectF resizedFrame = new RectF();
- private static RectF symbolRect = new RectF();
- private static RectF symbolTargetRect = new RectF();
- }
-
- private static void drawItemIndicatorNumberDark(Canvas canvas, int indicatorLocked, int lockColor, int indicatorLockedDark, int itemIndicatorColorBackground) {
- HabiticaIcons.drawItemIndicatorNumberDark(canvas, new RectF(0f, 0f, 28f, 28f), ResizingBehavior.AspectFit, indicatorLocked, lockColor, indicatorLockedDark, itemIndicatorColorBackground);
- }
-
- private static void drawItemIndicatorNumberDark(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, int indicatorLocked, int lockColor, int indicatorLockedDark, int itemIndicatorColorBackground) {
- // Resize to Target Frame
- canvas.save();
- RectF resizedFrame = CacheForItemIndicatorNumberDark.resizedFrame;
- HabiticaIcons.resizingBehaviorApply(resizing, CacheForItemIndicatorNumberDark.originalFrame, targetFrame, resizedFrame);
- canvas.translate(resizedFrame.left, resizedFrame.top);
- canvas.scale(resizedFrame.width() / 28f, resizedFrame.height() / 28f);
-
- // Symbol
- RectF symbolRect = CacheForItemIndicatorNumberDark.symbolRect;
- symbolRect.set(0f, 0f, 28f, 28f);
- canvas.save();
- canvas.clipRect(symbolRect);
- canvas.translate(symbolRect.left, symbolRect.top);
- RectF symbolTargetRect = CacheForItemIndicatorNumberDark.symbolTargetRect;
- symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
- HabiticaIcons.drawItemIndicator(canvas, symbolTargetRect, ResizingBehavior.Stretch, indicatorLocked, lockColor, indicatorLockedDark, itemIndicatorColorBackground, false, false, true);
- canvas.restore();
-
- canvas.restore();
- }
-
-
- // Canvas Images
- // Tab
-
- private static Bitmap imageOfExperience = null;
- public static Bitmap imageOfExperience() {
- if (imageOfExperience != null)
- return imageOfExperience;
-
- imageOfExperience = Bitmap.createBitmap(18, 18, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfExperience);
- HabiticaIcons.drawExperience(canvas);
-
- return imageOfExperience;
- }
-
- private static Bitmap imageOfMagic = null;
- public static Bitmap imageOfMagic() {
- if (imageOfMagic != null)
- return imageOfMagic;
-
- imageOfMagic = Bitmap.createBitmap(18, 18, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfMagic);
- HabiticaIcons.drawMagic(canvas);
-
- return imageOfMagic;
- }
-
- private static Bitmap imageOfGold = null;
- public static Bitmap imageOfGold() {
- if (imageOfGold != null)
- return imageOfGold;
-
- imageOfGold = Bitmap.createBitmap(18, 18, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfGold);
- HabiticaIcons.drawGold(canvas);
-
- return imageOfGold;
- }
-
- private static Bitmap imageOfGem = null;
- public static Bitmap imageOfGem() {
- if (imageOfGem != null)
- return imageOfGem;
-
- imageOfGem = Bitmap.createBitmap(18, 18, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfGem);
- HabiticaIcons.drawGem(canvas);
-
- return imageOfGem;
- }
-
- private static Bitmap imageOfHourglass = null;
- public static Bitmap imageOfHourglass() {
- if (imageOfHourglass != null)
- return imageOfHourglass;
-
- imageOfHourglass = Bitmap.createBitmap(18, 18, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfHourglass);
- HabiticaIcons.drawHourglass(canvas);
-
- return imageOfHourglass;
- }
-
- private static Bitmap imageOfExperienceReward = null;
- public static Bitmap imageOfExperienceReward() {
- if (imageOfExperienceReward != null)
- return imageOfExperienceReward;
-
- imageOfExperienceReward = Bitmap.createBitmap(40, 40, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfExperienceReward);
- HabiticaIcons.drawExperienceReward(canvas);
-
- return imageOfExperienceReward;
- }
-
- private static Bitmap imageOfGoldReward = null;
- public static Bitmap imageOfGoldReward() {
- if (imageOfGoldReward != null)
- return imageOfGoldReward;
-
- imageOfGoldReward = Bitmap.createBitmap(40, 40, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfGoldReward);
- HabiticaIcons.drawGoldReward(canvas);
-
- return imageOfGoldReward;
- }
-
- private static Bitmap imageOfHeartDarkBg = null;
- public static Bitmap imageOfHeartDarkBg() {
- if (imageOfHeartDarkBg != null)
- return imageOfHeartDarkBg;
-
- imageOfHeartDarkBg = Bitmap.createBitmap(18, 18, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfHeartDarkBg);
- HabiticaIcons.drawHeartDarkBg(canvas);
-
- return imageOfHeartDarkBg;
- }
-
- private static Bitmap imageOfHeartLightBg = null;
- public static Bitmap imageOfHeartLightBg() {
- if (imageOfHeartLightBg != null)
- return imageOfHeartLightBg;
-
- imageOfHeartLightBg = Bitmap.createBitmap(18, 18, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfHeartLightBg);
- HabiticaIcons.drawHeartLightBg(canvas);
-
- return imageOfHeartLightBg;
- }
-
- private static Bitmap imageOfHeartLarge = null;
- public static Bitmap imageOfHeartLarge() {
- if (imageOfHeartLarge != null)
- return imageOfHeartLarge;
-
- imageOfHeartLarge = Bitmap.createBitmap(36, 36, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfHeartLarge);
- HabiticaIcons.drawHeartLarge(canvas);
-
- return imageOfHeartLarge;
- }
-
- public static Bitmap imageOfDifficultyStars(float difficulty) {
- Bitmap imageOfDifficultyStars = Bitmap.createBitmap(48, 12, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfDifficultyStars);
- HabiticaIcons.drawDifficultyStars(canvas, difficulty);
-
- return imageOfDifficultyStars;
- }
-
- private static Bitmap imageOfStarSmall = null;
- public static Bitmap imageOfStarSmall() {
- if (imageOfStarSmall != null)
- return imageOfStarSmall;
-
- imageOfStarSmall = Bitmap.createBitmap(9, 9, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfStarSmall);
- HabiticaIcons.drawStarSmall(canvas);
-
- return imageOfStarSmall;
- }
-
- private static Bitmap imageOfStarLarge = null;
- public static Bitmap imageOfStarLarge() {
- if (imageOfStarLarge != null)
- return imageOfStarLarge;
-
- imageOfStarLarge = Bitmap.createBitmap(27, 27, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfStarLarge);
- HabiticaIcons.drawStarLarge(canvas);
-
- return imageOfStarLarge;
- }
-
- private static Bitmap imageOfStarMedium = null;
- public static Bitmap imageOfStarMedium() {
- if (imageOfStarMedium != null)
- return imageOfStarMedium;
-
- imageOfStarMedium = Bitmap.createBitmap(21, 21, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfStarMedium);
- HabiticaIcons.drawStarMedium(canvas);
-
- return imageOfStarMedium;
- }
-
- private static Bitmap imageOfPinnedItem = null;
- public static Bitmap imageOfPinnedItem() {
- if (imageOfPinnedItem != null)
- return imageOfPinnedItem;
-
- imageOfPinnedItem = Bitmap.createBitmap(16, 16, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfPinnedItem);
- HabiticaIcons.drawPinnedItem(canvas);
-
- return imageOfPinnedItem;
- }
-
- private static Bitmap imageOfPinItem = null;
- public static Bitmap imageOfPinItem() {
- if (imageOfPinItem != null)
- return imageOfPinItem;
-
- imageOfPinItem = Bitmap.createBitmap(24, 24, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfPinItem);
- HabiticaIcons.drawPinItem(canvas);
-
- return imageOfPinItem;
- }
-
- private static Bitmap imageOfUnpinItem = null;
- public static Bitmap imageOfUnpinItem() {
- if (imageOfUnpinItem != null)
- return imageOfUnpinItem;
-
- imageOfUnpinItem = Bitmap.createBitmap(24, 24, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfUnpinItem);
- HabiticaIcons.drawUnpinItem(canvas);
-
- return imageOfUnpinItem;
- }
-
- public static Bitmap imageOfItemIndicatorNumber(int indicatorLocked, int lockColor, int indicatorLockedDark, int itemIndicatorColorBackground) {
- Bitmap imageOfItemIndicatorNumber = Bitmap.createBitmap(28, 28, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfItemIndicatorNumber);
- HabiticaIcons.drawItemIndicatorNumber(canvas, indicatorLocked, lockColor, indicatorLockedDark, itemIndicatorColorBackground);
-
- return imageOfItemIndicatorNumber;
- }
-
- public static Bitmap imageOfItemIndicatorLocked(int indicatorLocked, int lockColor, int indicatorLockedDark, int itemIndicatorColorBackground) {
- Bitmap imageOfItemIndicatorLocked = Bitmap.createBitmap(28, 28, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfItemIndicatorLocked);
- HabiticaIcons.drawItemIndicatorLocked(canvas, indicatorLocked, lockColor, indicatorLockedDark, itemIndicatorColorBackground);
-
- return imageOfItemIndicatorLocked;
- }
-
- public static Bitmap imageOfItemIndicatorLimited(int indicatorLocked, int lockColor, int indicatorLockedDark, int itemIndicatorColorBackground) {
- Bitmap imageOfItemIndicatorLimited = Bitmap.createBitmap(28, 28, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfItemIndicatorLimited);
- HabiticaIcons.drawItemIndicatorLimited(canvas, indicatorLocked, lockColor, indicatorLockedDark, itemIndicatorColorBackground);
-
- return imageOfItemIndicatorLimited;
- }
-
- private static Bitmap imageOfGem_36 = null;
- public static Bitmap imageOfGem_36() {
- if (imageOfGem_36 != null)
- return imageOfGem_36;
-
- imageOfGem_36 = Bitmap.createBitmap(36, 36, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfGem_36);
- HabiticaIcons.drawGem_36(canvas);
-
- return imageOfGem_36;
- }
-
- private static Bitmap imageOfWarriorLightBg = null;
- public static Bitmap imageOfWarriorLightBg() {
- if (imageOfWarriorLightBg != null)
- return imageOfWarriorLightBg;
-
- imageOfWarriorLightBg = Bitmap.createBitmap(32, 32, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfWarriorLightBg);
- HabiticaIcons.drawWarriorLightBg(canvas);
-
- return imageOfWarriorLightBg;
- }
-
- private static Bitmap imageOfWarriorDarkBg = null;
- public static Bitmap imageOfWarriorDarkBg() {
- if (imageOfWarriorDarkBg != null)
- return imageOfWarriorDarkBg;
-
- imageOfWarriorDarkBg = Bitmap.createBitmap(32, 32, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfWarriorDarkBg);
- HabiticaIcons.drawWarriorDarkBg(canvas);
-
- return imageOfWarriorDarkBg;
- }
-
- private static Bitmap imageOfRogueLightBg = null;
- public static Bitmap imageOfRogueLightBg() {
- if (imageOfRogueLightBg != null)
- return imageOfRogueLightBg;
-
- imageOfRogueLightBg = Bitmap.createBitmap(32, 32, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfRogueLightBg);
- HabiticaIcons.drawRogueLightBg(canvas);
-
- return imageOfRogueLightBg;
- }
-
- private static Bitmap imageOfRogueDarkBg = null;
- public static Bitmap imageOfRogueDarkBg() {
- if (imageOfRogueDarkBg != null)
- return imageOfRogueDarkBg;
-
- imageOfRogueDarkBg = Bitmap.createBitmap(32, 32, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfRogueDarkBg);
- HabiticaIcons.drawRogueDarkBg(canvas);
-
- return imageOfRogueDarkBg;
- }
-
- private static Bitmap imageOfHealerLightBg = null;
- public static Bitmap imageOfHealerLightBg() {
- if (imageOfHealerLightBg != null)
- return imageOfHealerLightBg;
-
- imageOfHealerLightBg = Bitmap.createBitmap(32, 32, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfHealerLightBg);
- HabiticaIcons.drawHealerLightBg(canvas);
-
- return imageOfHealerLightBg;
- }
-
- private static Bitmap imageOfHealerDarkBg = null;
- public static Bitmap imageOfHealerDarkBg() {
- if (imageOfHealerDarkBg != null)
- return imageOfHealerDarkBg;
-
- imageOfHealerDarkBg = Bitmap.createBitmap(32, 32, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfHealerDarkBg);
- HabiticaIcons.drawHealerDarkBg(canvas);
-
- return imageOfHealerDarkBg;
- }
-
- private static Bitmap imageOfMageDarkBg = null;
- public static Bitmap imageOfMageDarkBg() {
- if (imageOfMageDarkBg != null)
- return imageOfMageDarkBg;
-
- imageOfMageDarkBg = Bitmap.createBitmap(32, 32, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfMageDarkBg);
- HabiticaIcons.drawMageDarkBg(canvas);
-
- return imageOfMageDarkBg;
- }
-
- private static Bitmap imageOfMageLightBg = null;
- public static Bitmap imageOfMageLightBg() {
- if (imageOfMageLightBg != null)
- return imageOfMageLightBg;
-
- imageOfMageLightBg = Bitmap.createBitmap(32, 32, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfMageLightBg);
- HabiticaIcons.drawMageLightBg(canvas);
-
- return imageOfMageLightBg;
- }
-
- public static Bitmap imageOfCheckmark(int checkmarkColor, float percentage) {
- Bitmap imageOfCheckmark = Bitmap.createBitmap(16, 12, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfCheckmark);
- HabiticaIcons.drawCheckmark(canvas, checkmarkColor, percentage);
-
- return imageOfCheckmark;
- }
-
- private static Bitmap imageOfHourglassShop = null;
- public static Bitmap imageOfHourglassShop() {
- if (imageOfHourglassShop != null)
- return imageOfHourglassShop;
-
- imageOfHourglassShop = Bitmap.createBitmap(42, 53, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfHourglassShop);
- HabiticaIcons.drawHourglassShop(canvas);
-
- return imageOfHourglassShop;
- }
-
- private static Bitmap imageOfAttributeSparklesLeft = null;
- public static Bitmap imageOfAttributeSparklesLeft() {
- if (imageOfAttributeSparklesLeft != null)
- return imageOfAttributeSparklesLeft;
-
- imageOfAttributeSparklesLeft = Bitmap.createBitmap(77, 24, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfAttributeSparklesLeft);
- HabiticaIcons.drawAttributeSparklesLeft(canvas);
-
- return imageOfAttributeSparklesLeft;
- }
-
- private static Bitmap imageOfAttributeSparklesRight = null;
- public static Bitmap imageOfAttributeSparklesRight() {
- if (imageOfAttributeSparklesRight != null)
- return imageOfAttributeSparklesRight;
-
- imageOfAttributeSparklesRight = Bitmap.createBitmap(77, 24, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfAttributeSparklesRight);
- HabiticaIcons.drawAttributeSparklesRight(canvas);
-
- return imageOfAttributeSparklesRight;
- }
-
- private static Bitmap imageOfAttributeAllocateButton = null;
- public static Bitmap imageOfAttributeAllocateButton() {
- if (imageOfAttributeAllocateButton != null)
- return imageOfAttributeAllocateButton;
-
- imageOfAttributeAllocateButton = Bitmap.createBitmap(24, 15, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfAttributeAllocateButton);
- HabiticaIcons.drawAttributeAllocateButton(canvas);
-
- return imageOfAttributeAllocateButton;
- }
-
- public static Bitmap imageOfInfoIcon(int infoIconColor) {
- Bitmap imageOfInfoIcon = Bitmap.createBitmap(20, 20, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfInfoIcon);
- HabiticaIcons.drawInfoIcon(canvas, infoIconColor);
-
- return imageOfInfoIcon;
- }
-
- public static Bitmap imageOfContributorBadge(float _1, boolean isNPC) {
- Bitmap imageOfContributorBadge = Bitmap.createBitmap(16, 16, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfContributorBadge);
- HabiticaIcons.drawContributorBadge(canvas, _1, isNPC);
-
- return imageOfContributorBadge;
- }
-
- public static Bitmap imageOfChatLikeIcon(boolean wasLiked) {
- Bitmap imageOfChatLikeIcon = Bitmap.createBitmap(12, 12, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfChatLikeIcon);
- HabiticaIcons.drawChatLikeIcon(canvas, wasLiked);
-
- return imageOfChatLikeIcon;
- }
-
- public static Bitmap imageOfQuestBackground(PointF imageSize, int bossColorDark, int bossColorMedium, int bossColorLight) {
- Bitmap imageOfQuestBackground = Bitmap.createBitmap((int) imageSize.x, (int) imageSize.y, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfQuestBackground);
- HabiticaIcons.drawQuestBackground(canvas, new RectF(0f, 0f, imageSize.x, imageSize.y), bossColorDark, bossColorMedium, bossColorLight);
-
- return imageOfQuestBackground;
- }
-
- private static Bitmap imageOfDamage = null;
- public static Bitmap imageOfDamage() {
- if (imageOfDamage != null)
- return imageOfDamage;
-
- imageOfDamage = Bitmap.createBitmap(18, 18, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfDamage);
- HabiticaIcons.drawDamage(canvas);
-
- return imageOfDamage;
- }
-
- public static Bitmap imageOfCaret(int caretColor, boolean pointsUp) {
- Bitmap imageOfCaret = Bitmap.createBitmap(16, 16, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfCaret);
- HabiticaIcons.drawCaret(canvas, caretColor, pointsUp);
-
- return imageOfCaret;
- }
-
- private static Bitmap imageOfRageStrikeInactive = null;
- public static Bitmap imageOfRageStrikeInactive() {
- if (imageOfRageStrikeInactive != null)
- return imageOfRageStrikeInactive;
-
- imageOfRageStrikeInactive = Bitmap.createBitmap(63, 82, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfRageStrikeInactive);
- HabiticaIcons.drawRageStrikeInactive(canvas);
-
- return imageOfRageStrikeInactive;
- }
-
- public static Bitmap imageOfRageStrikeActive(Context context, Bitmap rageStrikeNPC) {
- Bitmap imageOfRageStrikeActive = Bitmap.createBitmap(63, 82, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfRageStrikeActive);
- HabiticaIcons.drawRageStrikeActive(canvas, context, rageStrikeNPC);
-
- return imageOfRageStrikeActive;
- }
-
- private static Bitmap imageOfRage = null;
- public static Bitmap imageOfRage() {
- if (imageOfRage != null)
- return imageOfRage;
-
- imageOfRage = Bitmap.createBitmap(18, 18, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfRage);
- HabiticaIcons.drawRage(canvas);
-
- return imageOfRage;
- }
-
- public static Bitmap imageOfTaskDifficultyStars(int taskTintColor, float difficulty, boolean isActive) {
- Bitmap imageOfTaskDifficultyStars = Bitmap.createBitmap(36, 36, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfTaskDifficultyStars);
- HabiticaIcons.drawTaskDifficultyStars(canvas, taskTintColor, difficulty, isActive);
-
- return imageOfTaskDifficultyStars;
- }
-
- public static Bitmap imageOfHabitControlPlus(int taskTintColor, boolean isActive) {
- Bitmap imageOfHabitControlPlus = Bitmap.createBitmap(34, 34, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfHabitControlPlus);
- HabiticaIcons.drawHabitControlPlus(canvas, taskTintColor, isActive);
-
- return imageOfHabitControlPlus;
- }
-
- public static Bitmap imageOfHabitControlMinus(int taskTintColor, boolean isActive) {
- Bitmap imageOfHabitControlMinus = Bitmap.createBitmap(34, 34, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfHabitControlMinus);
- HabiticaIcons.drawHabitControlMinus(canvas, taskTintColor, isActive);
-
- return imageOfHabitControlMinus;
- }
-
- public static Bitmap imageOfLocked(int lockColor) {
- Bitmap imageOfLocked = Bitmap.createBitmap(15, 17, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfLocked);
- HabiticaIcons.drawLocked(canvas, lockColor);
-
- return imageOfLocked;
- }
-
- public static Bitmap imageOfGuildCrest(Context context, boolean isOwner, boolean isPublic, float memberCount, String memberCountLabel) {
- Bitmap imageOfGuildCrest = Bitmap.createBitmap(40, 38, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfGuildCrest);
- HabiticaIcons.drawGuildCrest(canvas, context, isOwner, isPublic, memberCount, memberCountLabel);
-
- return imageOfGuildCrest;
- }
-
- public static Bitmap imageOfGuildCrestMedium(float memberCount) {
- Bitmap imageOfGuildCrestMedium = Bitmap.createBitmap(30, 34, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfGuildCrestMedium);
- HabiticaIcons.drawGuildCrestMedium(canvas, memberCount);
-
- return imageOfGuildCrestMedium;
- }
-
- public static Bitmap imageOfGuildCrestSmall(float memberCount) {
- Bitmap imageOfGuildCrestSmall = Bitmap.createBitmap(16, 16, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfGuildCrestSmall);
- HabiticaIcons.drawGuildCrestSmall(canvas, memberCount);
-
- return imageOfGuildCrestSmall;
- }
-
- public static Bitmap imageOfGuildHeaderCrest(int guildHeader) {
- Bitmap imageOfGuildHeaderCrest = Bitmap.createBitmap(116, 58, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfGuildHeaderCrest);
- HabiticaIcons.drawGuildHeaderCrest(canvas, guildHeader);
-
- return imageOfGuildHeaderCrest;
- }
-
- private static Bitmap imageOfTwoHandedIcon = null;
- public static Bitmap imageOfTwoHandedIcon() {
- if (imageOfTwoHandedIcon != null)
- return imageOfTwoHandedIcon;
-
- imageOfTwoHandedIcon = Bitmap.createBitmap(15, 15, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfTwoHandedIcon);
- HabiticaIcons.drawTwoHandedIcon(canvas);
-
- return imageOfTwoHandedIcon;
- }
-
- private static Bitmap imageOfBlankAvatarIcon = null;
- public static Bitmap imageOfBlankAvatarIcon() {
- if (imageOfBlankAvatarIcon != null)
- return imageOfBlankAvatarIcon;
-
- imageOfBlankAvatarIcon = Bitmap.createBitmap(36, 34, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfBlankAvatarIcon);
- HabiticaIcons.drawBlankAvatarIcon(canvas);
-
- return imageOfBlankAvatarIcon;
- }
-
- private static Bitmap imageOfDisclosureArrow = null;
- public static Bitmap imageOfDisclosureArrow() {
- if (imageOfDisclosureArrow != null)
- return imageOfDisclosureArrow;
-
- imageOfDisclosureArrow = Bitmap.createBitmap(8, 13, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfDisclosureArrow);
- HabiticaIcons.drawDisclosureArrow(canvas);
-
- return imageOfDisclosureArrow;
- }
-
- public static Bitmap imageOfFilterIcon(float percentage) {
- Bitmap imageOfFilterIcon = Bitmap.createBitmap(22, 22, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfFilterIcon);
- HabiticaIcons.drawFilterIcon(canvas, percentage);
-
- return imageOfFilterIcon;
- }
-
- private static Bitmap imageOfDeclineIcon = null;
- public static Bitmap imageOfDeclineIcon() {
- if (imageOfDeclineIcon != null)
- return imageOfDeclineIcon;
-
- imageOfDeclineIcon = Bitmap.createBitmap(13, 13, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfDeclineIcon);
- HabiticaIcons.drawDeclineIcon(canvas);
-
- return imageOfDeclineIcon;
- }
-
- private static Bitmap imageOfAcceptIcon = null;
- public static Bitmap imageOfAcceptIcon() {
- if (imageOfAcceptIcon != null)
- return imageOfAcceptIcon;
-
- imageOfAcceptIcon = Bitmap.createBitmap(13, 13, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfAcceptIcon);
- HabiticaIcons.drawAcceptIcon(canvas);
-
- return imageOfAcceptIcon;
- }
-
- private static Bitmap imageOfBuffIcon = null;
- public static Bitmap imageOfBuffIcon() {
- if (imageOfBuffIcon != null)
- return imageOfBuffIcon;
-
- imageOfBuffIcon = Bitmap.createBitmap(15, 15, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfBuffIcon);
- HabiticaIcons.drawBuffIcon(canvas);
-
- return imageOfBuffIcon;
- }
-
- private static Bitmap imageOfAlertIcon = null;
- public static Bitmap imageOfAlertIcon() {
- if (imageOfAlertIcon != null)
- return imageOfAlertIcon;
-
- imageOfAlertIcon = Bitmap.createBitmap(16, 16, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfAlertIcon);
- HabiticaIcons.drawAlertIcon(canvas);
-
- return imageOfAlertIcon;
- }
-
- public static Bitmap imageOfItemIndicatorLockedDark(int indicatorLocked, int lockColor, int indicatorLockedDark, int itemIndicatorColorBackground) {
- Bitmap imageOfItemIndicatorLockedDark = Bitmap.createBitmap(28, 28, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfItemIndicatorLockedDark);
- HabiticaIcons.drawItemIndicatorLockedDark(canvas, indicatorLocked, lockColor, indicatorLockedDark, itemIndicatorColorBackground);
-
- return imageOfItemIndicatorLockedDark;
- }
-
- private static Bitmap imageOfBuffIconDark = null;
- public static Bitmap imageOfBuffIconDark() {
- if (imageOfBuffIconDark != null)
- return imageOfBuffIconDark;
-
- imageOfBuffIconDark = Bitmap.createBitmap(15, 15, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfBuffIconDark);
- HabiticaIcons.drawBuffIconDark(canvas);
-
- return imageOfBuffIconDark;
- }
-
- private static Bitmap imageOfStats = null;
- public static Bitmap imageOfStats() {
- if (imageOfStats != null)
- return imageOfStats;
-
- imageOfStats = Bitmap.createBitmap(30, 22, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfStats);
- HabiticaIcons.drawStats(canvas);
-
- return imageOfStats;
- }
-
- private static Bitmap imageOfDashBorder = null;
- public static Bitmap imageOfDashBorder() {
- if (imageOfDashBorder != null)
- return imageOfDashBorder;
-
- imageOfDashBorder = Bitmap.createBitmap(113, 116, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfDashBorder);
- HabiticaIcons.drawDashBorder(canvas);
-
- return imageOfDashBorder;
- }
-
- public static Bitmap imageOfTaskFilterIcon(boolean filter_active) {
- Bitmap imageOfTaskFilterIcon = Bitmap.createBitmap(30, 28, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfTaskFilterIcon);
- HabiticaIcons.drawTaskFilterIcon(canvas, filter_active);
-
- return imageOfTaskFilterIcon;
- }
-
- public static Bitmap imageOfFallGemPromoBG(int redGemColor, int greenGemColor, int blueGemColor, int purpleGemColor) {
- Bitmap imageOfFallGemPromoBG = Bitmap.createBitmap(132, 35, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfFallGemPromoBG);
- HabiticaIcons.drawFallGemPromoBG(canvas, redGemColor, greenGemColor, blueGemColor, purpleGemColor);
-
- return imageOfFallGemPromoBG;
- }
-
- private static Bitmap imageOfSpookyGemPromoBG = null;
- public static Bitmap imageOfSpookyGemPromoBG() {
- if (imageOfSpookyGemPromoBG != null)
- return imageOfSpookyGemPromoBG;
-
- imageOfSpookyGemPromoBG = Bitmap.createBitmap(132, 35, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfSpookyGemPromoBG);
- HabiticaIcons.drawSpookyGemPromoBG(canvas);
-
- return imageOfSpookyGemPromoBG;
- }
-
- public static Bitmap imageOfItemIndicatorNumberDark(int indicatorLocked, int lockColor, int indicatorLockedDark, int itemIndicatorColorBackground) {
- Bitmap imageOfItemIndicatorNumberDark = Bitmap.createBitmap(28, 28, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfItemIndicatorNumberDark);
- HabiticaIcons.drawItemIndicatorNumberDark(canvas, indicatorLocked, lockColor, indicatorLockedDark, itemIndicatorColorBackground);
-
- return imageOfItemIndicatorNumberDark;
- }
-
-
+
// Resizing Behavior
public static void resizingBehaviorApply(ResizingBehavior behavior, RectF rect, RectF target, RectF result) {
if (rect.equals(target) || target == null) {
@@ -14747,37 +10788,16 @@ public class HabiticaIcons {
class PaintCodeColor extends Color {
private static float[] ColorToHSV(int originalColor) {
- float hsv[] = new float[3];
+ float[] hsv = new float[3];
RGBToHSV(red(originalColor), green(originalColor), blue(originalColor), hsv);
return hsv;
}
-
- public static int colorByChangingHue(int originalColor, float newHue) {
- float hsv[] = ColorToHSV(originalColor);
- hsv[0] = newHue;
- return HSVToColor(alpha(originalColor), hsv);
- }
-
- public static int colorByChangingSaturation(int originalColor, float newSaturation) {
- float hsv[] = ColorToHSV(originalColor);
- hsv[1] = newSaturation;
- return HSVToColor(alpha(originalColor), hsv);
- }
-
- public static int colorByChangingValue(int originalColor, float newValue) {
- float hsv[] = ColorToHSV(originalColor);
- hsv[2] = newValue;
- return HSVToColor(alpha(originalColor), hsv);
- }
-
+
public static float hue(int color) {
return ColorToHSV(color)[0];
}
- public static float saturation(int color) {
- return ColorToHSV(color)[1];
- }
-
+
public static float brightness(int color) {
return ColorToHSV(color)[2];
}
@@ -14785,21 +10805,6 @@ class PaintCodeColor extends Color {
public static int colorByChangingAlpha(int color, int newAlpha) {
return argb(newAlpha, red(color), green(color), blue(color));
}
-
- public static int colorByBlendingColors(int c1, float ratio, int c2) {
- return argb((int) ((1f - ratio) * alpha(c1) + ratio * alpha(c2)),
- (int) ((1f - ratio) * red(c1) + ratio * red(c2)),
- (int) ((1f - ratio) * green(c1) + ratio * green(c2)),
- (int) ((1f - ratio) * blue(c1) + ratio * blue(c2)));
- }
-
- public static int colorByApplyingHighlight(int color, float ratio) {
- return colorByBlendingColors(color, ratio, colorByChangingAlpha(WHITE, alpha(color)));
- }
-
- public static int colorByApplyingShadow(int color, float ratio) {
- return colorByBlendingColors(color, ratio, colorByChangingAlpha(BLACK, alpha(color)));
- }
}
class PaintCodeShadow {
int color;
@@ -14811,18 +10816,14 @@ class PaintCodeShadow {
}
- PaintCodeShadow(int color, float dx, float dy, float radius) {
- this.get(color, dx, dy, radius);
- }
-
- PaintCodeShadow get(int color, float dx, float dy, float radius) {
+ PaintCodeShadow get(int color) {
this.color = color;
- this.dx = dx;
- this.dy = dy;
+ this.dx = (float) 0.0;
+ this.dy = (float) 1.0;
- if (this.radius != radius) {
+ if (this.radius != (float) 1.0) {
this.blurMaskFilter = null;
- this.radius = radius;
+ this.radius = (float) 1.0;
}
return this;
@@ -14844,24 +10845,9 @@ class PaintCodeBitmap {
private BitmapShader shader;
private Bitmap bitmap;
private RectF bounds;
- private int resource;
- private WeakReference context;
-
- PaintCodeBitmap get(Context context, int resource) {
- if (this.context == null || this.context.get() != context || this.resource != resource) {
- this.context = new WeakReference<>(context);
- this.resource = resource;
- this.bitmap = BitmapFactory.decodeResource(context.getResources(), resource);
- this.bounds = new RectF(0, 0, bitmap.getWidth(), bitmap.getHeight());
- this.shader = new BitmapShader(bitmap, Shader.TileMode.REPEAT, Shader.TileMode.REPEAT);
- }
- return this;
- }
-
+
PaintCodeBitmap get(Bitmap bitmap) {
if (this.bitmap != bitmap) {
- this.context = null;
- this.resource = 0;
this.bitmap = bitmap;
this.bounds = new RectF(0, 0, bitmap.getWidth(), bitmap.getHeight());
this.shader = new BitmapShader(bitmap, Shader.TileMode.REPEAT, Shader.TileMode.REPEAT);
@@ -14883,12 +10869,12 @@ class PaintCodeDashPathEffect {
private DashPathEffect effect;
private float dash, gap, phase;
- DashPathEffect get(float dash, float gap, float phase) {
- if (this.dash != dash || this.gap != gap || this.phase != phase) {
+ DashPathEffect get(float dash) {
+ if (this.dash != dash || this.gap != (float) 20.0 || this.phase != (float) 0.0) {
this.dash = dash;
- this.gap = gap;
- this.phase = phase;
- this.effect = new DashPathEffect(new float[]{dash, gap}, phase);
+ this.gap = (float) 20.0;
+ this.phase = (float) 0.0;
+ this.effect = new DashPathEffect(new float[]{dash, (float) 20.0}, (float) 0.0);
}
return this.effect;
}
@@ -14902,13 +10888,13 @@ class PaintCodeStaticLayout {
private CharSequence source;
private TextPaint paint;
- StaticLayout get(int width, Layout.Alignment alignment, CharSequence source, TextPaint paint) {
- if (this.layout == null || this.width != width || this.alignment != alignment || !this.source.equals(source) || !this.paint.equals(paint)) {
+ StaticLayout get(int width, CharSequence source, TextPaint paint) {
+ if (this.layout == null || this.width != width || this.alignment != Layout.Alignment.ALIGN_CENTER || !this.source.equals(source) || !this.paint.equals(paint)) {
this.width = width;
- this.alignment = alignment;
+ this.alignment = Layout.Alignment.ALIGN_CENTER;
this.source = source;
this.paint = paint;
- this.layout = new StaticLayout(source, paint, width, alignment, 1, 0, false);
+ this.layout = new StaticLayout(source, paint, width, Layout.Alignment.ALIGN_CENTER, 1, 0, false);
}
return this.layout;
}
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/HabiticaIconsHelper.java b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/HabiticaIconsHelper.java
index 950b891b9..c912f7d4f 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/HabiticaIconsHelper.java
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/HabiticaIconsHelper.java
@@ -187,15 +187,6 @@ public class HabiticaIconsHelper {
return imageOfHeartLarge;
}
- public static Bitmap imageOfDifficultyStars(float difficulty) {
- Bitmap imageOfDifficultyStars = Bitmap.createBitmap(scaleSize(48), scaleSize(12), Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfDifficultyStars);
- canvas.scale(displayDensity, displayDensity);
- HabiticaIcons.drawDifficultyStars(canvas, difficulty);
-
- return imageOfDifficultyStars;
- }
-
private static Bitmap imageOfStarSmall = null;
public static Bitmap imageOfStarSmall() {
if (imageOfStarSmall != null)
@@ -327,7 +318,6 @@ public class HabiticaIconsHelper {
return imageOfItemIndicatorLocked;
}
- private static Bitmap imageOfItemIndicatorLockedDark = null;
public static Bitmap imageOfItemIndicatorLockedDark(boolean isLimited) {
int size = scaleSize(28);
Bitmap imageOfItemIndicatorLockedDark = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
@@ -385,20 +375,6 @@ public class HabiticaIconsHelper {
return imageOfWarriorLightBg;
}
- private static Bitmap imageOfWarriorDarkBg = null;
- public static Bitmap imageOfWarriorDarkBg() {
- if (imageOfWarriorDarkBg != null)
- return imageOfWarriorDarkBg;
-
- int size = scaleSize(32);
- imageOfWarriorDarkBg = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfWarriorDarkBg);
- canvas.scale(displayDensity, displayDensity);
- HabiticaIcons.drawWarriorDarkBg(canvas);
-
- return imageOfWarriorDarkBg;
- }
-
private static Bitmap imageOfRogueLightBg = null;
public static Bitmap imageOfRogueLightBg() {
if (imageOfRogueLightBg != null)
@@ -413,20 +389,6 @@ public class HabiticaIconsHelper {
return imageOfRogueLightBg;
}
- private static Bitmap imageOfRogueDarkBg = null;
- public static Bitmap imageOfRogueDarkBg() {
- if (imageOfRogueDarkBg != null)
- return imageOfRogueDarkBg;
-
- int size = scaleSize(32);
- imageOfRogueDarkBg = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfRogueDarkBg);
- canvas.scale(displayDensity, displayDensity);
- HabiticaIcons.drawRogueDarkBg(canvas);
-
- return imageOfRogueDarkBg;
- }
-
private static Bitmap imageOfHealerLightBg = null;
public static Bitmap imageOfHealerLightBg() {
if (imageOfHealerLightBg != null)
@@ -441,34 +403,6 @@ public class HabiticaIconsHelper {
return imageOfHealerLightBg;
}
- private static Bitmap imageOfHealerDarkBg = null;
- public static Bitmap imageOfHealerDarkBg() {
- if (imageOfHealerDarkBg != null)
- return imageOfHealerDarkBg;
-
- int size = scaleSize(32);
- imageOfHealerDarkBg = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfHealerDarkBg);
- canvas.scale(displayDensity, displayDensity);
- HabiticaIcons.drawHealerDarkBg(canvas);
-
- return imageOfHealerDarkBg;
- }
-
- private static Bitmap imageOfMageDarkBg = null;
- public static Bitmap imageOfMageDarkBg() {
- if (imageOfMageDarkBg != null)
- return imageOfMageDarkBg;
-
- int size = scaleSize(32);
- imageOfMageDarkBg = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfMageDarkBg);
- canvas.scale(displayDensity, displayDensity);
- HabiticaIcons.drawMageDarkBg(canvas);
-
- return imageOfMageDarkBg;
- }
-
private static Bitmap imageOfMageLightBg = null;
public static Bitmap imageOfMageLightBg() {
if (imageOfMageLightBg != null)
@@ -559,16 +493,6 @@ public class HabiticaIconsHelper {
return imageOfContributorBadge;
}
- public static Bitmap imageOfChatLikeIcon(boolean wasLiked) {
- int size = scaleSize(12);
- Bitmap imageOfChatLikeIcon = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfChatLikeIcon);
- canvas.scale(displayDensity, displayDensity);
- HabiticaIcons.drawChatLikeIcon(canvas, wasLiked);
-
- return imageOfChatLikeIcon;
- }
-
private static Bitmap imageOfDamage = null;
public static Bitmap imageOfDamage() {
if (imageOfDamage != null)
@@ -593,16 +517,6 @@ public class HabiticaIconsHelper {
return imageOfCaret;
}
- public static Bitmap imageOfQuestBackground(int bossColorDark, int bossColorMedium, int bossColorLight) {
- int size = scaleSize(21);
- Bitmap imageOfQuestBackground = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfQuestBackground);
- canvas.scale(displayDensity, displayDensity);
- HabiticaIcons.drawQuestBackground(canvas, new RectF(0f, 0f, size, size), bossColorDark, bossColorMedium, bossColorLight);
-
- return imageOfQuestBackground;
- }
-
private static Bitmap imageOfRageStrikeInactive = null;
public static Bitmap imageOfRageStrikeInactive() {
if (imageOfRageStrikeInactive != null)
@@ -772,20 +686,6 @@ public class HabiticaIconsHelper {
return imageOfBuffIcon;
}
- private static Bitmap imageOfBuffIconDark = null;
- public static Bitmap imageOfBuffIconDark() {
- if (imageOfBuffIconDark != null)
- return imageOfBuffIconDark;
-
- int size = scaleSize(15);
- imageOfBuffIconDark = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfBuffIconDark);
- canvas.scale(displayDensity, displayDensity);
- HabiticaIcons.drawBuffIcon(canvas);
-
- return imageOfBuffIconDark;
- }
-
public static Bitmap imageOfTaskDifficultyStars(int taskTintColor, float difficulty, boolean isActive) {
int size = scaleSize(36);
Bitmap imageOfTaskDifficultyStars = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
@@ -796,26 +696,6 @@ public class HabiticaIconsHelper {
return imageOfTaskDifficultyStars;
}
- public static Bitmap imageOfHabitControlPlus(int taskTintColor, boolean isActive) {
- int size = scaleSize(34);
- Bitmap imageOfHabitControlPlus = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfHabitControlPlus);
- canvas.scale(displayDensity, displayDensity);
- HabiticaIcons.drawHabitControlPlus(canvas, taskTintColor, isActive);
-
- return imageOfHabitControlPlus;
- }
-
- public static Bitmap imageOfHabitControlMinus(int taskTintColor, boolean isActive) {
- int size = scaleSize(34);
- Bitmap imageOfHabitControlMinus = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfHabitControlMinus);
- canvas.scale(displayDensity, displayDensity);
- HabiticaIcons.drawHabitControlMinus(canvas, taskTintColor, isActive);
-
- return imageOfHabitControlMinus;
- }
-
public static Bitmap imageOfStats() {
int width = scaleSize(30);
int height = scaleSize(30);
@@ -827,29 +707,11 @@ public class HabiticaIconsHelper {
return imageOfHabitControlMinus;
}
- public static Bitmap imageOfFallGemPromoBG(int redGemColor, int greenGemColor, int blueGemColor, int purpleGemColor) {
- Bitmap imageOfFallGemPromoBG = Bitmap.createBitmap(scaleSize(132), scaleSize(35), Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfFallGemPromoBG);
- canvas.scale(displayDensity, displayDensity);
- HabiticaIcons.drawFallGemPromoBG(canvas, redGemColor, greenGemColor, blueGemColor, purpleGemColor);
-
- return imageOfFallGemPromoBG;
- }
-
- public static Bitmap imageOfSpookyGemPromoBG() {
- Bitmap imageOfSpookyGemPromoBG = Bitmap.createBitmap(scaleSize(132), scaleSize(35), Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(imageOfSpookyGemPromoBG);
- canvas.scale(displayDensity, displayDensity);
- HabiticaIcons.drawSpookyGemPromoBG(canvas);
-
- return imageOfSpookyGemPromoBG;
- }
-
- public static Bitmap imageOfGuildCrest(Context context, boolean isOwner, boolean isPublic, float memberCount, String memberCountLabel) {
+ public static Bitmap imageOfGuildCrest(boolean isOwner, boolean isPublic, float memberCount, String memberCountLabel) {
Bitmap imageOfGuildCrest = Bitmap.createBitmap(scaleSize(40), scaleSize(38), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(imageOfGuildCrest);
canvas.scale(displayDensity, displayDensity);
- HabiticaIcons.drawGuildCrest(canvas, context, isOwner, isPublic, memberCount, memberCountLabel);
+ HabiticaIcons.drawGuildCrest(canvas, isOwner, isPublic, memberCount, memberCountLabel);
return imageOfGuildCrest;
}