package com.habitrpg.android.habitica.ui.views;

import android.content.Context;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.Matrix;
import android.graphics.PointF;
import android.graphics.RectF;
import android.graphics.Shader;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.BitmapShader;
import android.graphics.BlurMaskFilter;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Path;
import android.graphics.DashPathEffect;
import android.graphics.Typeface;
import android.text.Layout;
import android.text.StaticLayout;
import android.text.TextPaint;
import java.util.Stack;
import java.lang.ref.WeakReference;



/**
 * Created by Phillip Thelen on 12. Oct 2018.
 * Copyright © 2018 HabitRPG Inc.. All rights reserved.
 *
 * Generated by PaintCode
 * http://www.paintcodeapp.com
 *
 * @author Phillip Thelen
 */
public class HabiticaIcons {
    private static class GlobalCache {
        static PaintCodeBitmap rageStrikeNPC = new PaintCodeBitmap();
        static PorterDuffXfermode blendModeSourceIn = new PorterDuffXfermode(PorterDuff.Mode.SRC_IN);
    }
    
    // Resizing Behavior
    public enum ResizingBehavior {
        AspectFit, //!< The content is proportionally resized to fit into the target rectangle.
        AspectFill, //!< The content is proportionally resized to completely fill the target rectangle.
        Stretch, //!< The content is stretched to match the entire target rectangle.
        Center, //!< The content is centered in the target rectangle, but it is NOT resized.
    }
    
    // Canvas Drawings
    // 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();
    }
    
    public static void drawHeart(Canvas canvas, boolean darkBackground) {
        HabiticaIcons.drawHeart(canvas, new RectF(0f, 0f, 18f, 18f), ResizingBehavior.AspectFit, darkBackground);
    }
    
    public static void drawHeart(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, boolean darkBackground) {
        // General Declarations
        Paint paint = CacheForHeart.paint;
        
        // Local Colors
        int fillColor6 = Color.argb(128, 181, 36, 40);
        int heartDarkBackground = Color.argb(178, 255, 255, 255);
        int fillColor3 = Color.argb(128, 255, 255, 255);
        int fillColor5 = Color.argb(64, 255, 255, 255);
        int heartLightBackground = Color.argb(255, 247, 78, 82);
        int fillColor4 = Color.argb(89, 181, 36, 40);
        int fillColor2 = Color.argb(255, 255, 97, 101);
        
        // Local Variables
        int expression = darkBackground ? heartDarkBackground : heartLightBackground;
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForHeart.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForHeart.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 18f, resizedFrame.height() / 18f);
        
        // Group 2
        {
            // Bezier
            RectF bezierRect = CacheForHeart.bezierRect;
            bezierRect.set(2f, 2f, 16f, 16f);
            Path bezierPath = CacheForHeart.bezierPath;
            bezierPath.reset();
            bezierPath.moveTo(2f, 3.75f);
            bezierPath.lineTo(4.92f, 2f);
            bezierPath.lineTo(9f, 4.22f);
            bezierPath.lineTo(13.08f, 2f);
            bezierPath.lineTo(16f, 3.75f);
            bezierPath.lineTo(16f, 9f);
            bezierPath.lineTo(13.08f, 13.08f);
            bezierPath.lineTo(9f, 16f);
            bezierPath.lineTo(4.92f, 13.08f);
            bezierPath.lineTo(2f, 9f);
            bezierPath.lineTo(2f, 3.75f);
            bezierPath.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezierPath.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(expression);
            canvas.drawPath(bezierPath, paint);
            
            // Bezier 2
            RectF bezier2Rect = CacheForHeart.bezier2Rect;
            bezier2Rect.set(3.17f, 3.34f, 14.83f, 14.54f);
            Path bezier2Path = CacheForHeart.bezier2Path;
            bezier2Path.reset();
            bezier2Path.moveTo(5.73f, 12.27f);
            bezier2Path.lineTo(3.17f, 8.65f);
            bezier2Path.lineTo(3.17f, 4.39f);
            bezier2Path.lineTo(4.92f, 3.34f);
            bezier2Path.lineTo(9f, 5.56f);
            bezier2Path.lineTo(13.08f, 3.34f);
            bezier2Path.lineTo(14.83f, 4.39f);
            bezier2Path.lineTo(14.83f, 8.65f);
            bezier2Path.lineTo(12.27f, 12.27f);
            bezier2Path.lineTo(9f, 14.54f);
            bezier2Path.lineTo(5.73f, 12.27f);
            bezier2Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier2Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor2);
            canvas.drawPath(bezier2Path, paint);
            
            // Bezier 3
            RectF bezier3Rect = CacheForHeart.bezier3Rect;
            bezier3Rect.set(9f, 10.46f, 12.27f, 14.54f);
            Path bezier3Path = CacheForHeart.bezier3Path;
            bezier3Path.reset();
            bezier3Path.moveTo(9f, 10.46f);
            bezier3Path.lineTo(12.27f, 12.27f);
            bezier3Path.lineTo(9f, 14.54f);
            bezier3Path.lineTo(9f, 10.46f);
            bezier3Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier3Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor3);
            canvas.drawPath(bezier3Path, paint);
            
            // Bezier 4
            RectF bezier4Rect = CacheForHeart.bezier4Rect;
            bezier4Rect.set(5.73f, 10.46f, 9f, 14.54f);
            Path bezier4Path = CacheForHeart.bezier4Path;
            bezier4Path.reset();
            bezier4Path.moveTo(9f, 10.46f);
            bezier4Path.lineTo(5.73f, 12.27f);
            bezier4Path.lineTo(9f, 14.54f);
            bezier4Path.lineTo(9f, 10.46f);
            bezier4Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier4Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor4);
            canvas.drawPath(bezier4Path, paint);
            
            // Bezier 5
            RectF bezier5Rect = CacheForHeart.bezier5Rect;
            bezier5Rect.set(3.17f, 8.65f, 9f, 12.27f);
            Path bezier5Path = CacheForHeart.bezier5Path;
            bezier5Path.reset();
            bezier5Path.moveTo(5.73f, 12.27f);
            bezier5Path.lineTo(3.17f, 8.65f);
            bezier5Path.lineTo(9f, 10.46f);
            bezier5Path.lineTo(5.73f, 12.27f);
            bezier5Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier5Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor5);
            canvas.drawPath(bezier5Path, paint);
            
            // Bezier 6
            RectF bezier6Rect = CacheForHeart.bezier6Rect;
            bezier6Rect.set(9f, 8.65f, 14.83f, 12.27f);
            Path bezier6Path = CacheForHeart.bezier6Path;
            bezier6Path.reset();
            bezier6Path.moveTo(12.27f, 12.27f);
            bezier6Path.lineTo(14.83f, 8.65f);
            bezier6Path.lineTo(9f, 10.46f);
            bezier6Path.lineTo(12.27f, 12.27f);
            bezier6Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier6Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor6);
            canvas.drawPath(bezier6Path, paint);
            
            // Bezier 7
            RectF bezier7Rect = CacheForHeart.bezier7Rect;
            bezier7Rect.set(9f, 3.34f, 14.83f, 10.46f);
            Path bezier7Path = CacheForHeart.bezier7Path;
            bezier7Path.reset();
            bezier7Path.moveTo(9f, 10.46f);
            bezier7Path.lineTo(13.08f, 3.34f);
            bezier7Path.lineTo(14.83f, 4.39f);
            bezier7Path.lineTo(14.83f, 8.65f);
            bezier7Path.lineTo(9f, 10.46f);
            bezier7Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier7Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor4);
            canvas.drawPath(bezier7Path, paint);
            
            // Bezier 8
            RectF bezier8Rect = CacheForHeart.bezier8Rect;
            bezier8Rect.set(3.17f, 3.34f, 9f, 10.46f);
            Path bezier8Path = CacheForHeart.bezier8Path;
            bezier8Path.reset();
            bezier8Path.moveTo(9f, 10.46f);
            bezier8Path.lineTo(4.92f, 3.34f);
            bezier8Path.lineTo(3.17f, 4.39f);
            bezier8Path.lineTo(3.17f, 8.65f);
            bezier8Path.lineTo(9f, 10.46f);
            bezier8Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier8Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor6);
            canvas.drawPath(bezier8Path, paint);
            
            // Bezier 9
            RectF bezier9Rect = CacheForHeart.bezier9Rect;
            bezier9Rect.set(4.92f, 3.34f, 9f, 10.46f);
            Path bezier9Path = CacheForHeart.bezier9Path;
            bezier9Path.reset();
            bezier9Path.moveTo(9f, 10.46f);
            bezier9Path.lineTo(4.92f, 3.34f);
            bezier9Path.lineTo(9f, 5.56f);
            bezier9Path.lineTo(9f, 10.46f);
            bezier9Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier9Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor3);
            canvas.drawPath(bezier9Path, paint);
            
            // Bezier 10
            RectF bezier10Rect = CacheForHeart.bezier10Rect;
            bezier10Rect.set(9f, 3.34f, 13.08f, 10.46f);
            Path bezier10Path = CacheForHeart.bezier10Path;
            bezier10Path.reset();
            bezier10Path.moveTo(9f, 10.46f);
            bezier10Path.lineTo(13.08f, 3.34f);
            bezier10Path.lineTo(9f, 5.56f);
            bezier10Path.lineTo(9f, 10.46f);
            bezier10Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier10Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor5);
            canvas.drawPath(bezier10Path, paint);
            
            // Bezier 11
            RectF bezier11Rect = CacheForHeart.bezier11Rect;
            bezier11Rect.set(4.92f, 5.38f, 13.08f, 12.44f);
            Path bezier11Path = CacheForHeart.bezier11Path;
            bezier11Path.reset();
            bezier11Path.moveTo(7.02f, 10.98f);
            bezier11Path.lineTo(4.92f, 8.07f);
            bezier11Path.lineTo(4.92f, 5.38f);
            bezier11Path.lineTo(4.97f, 5.38f);
            bezier11Path.lineTo(9f, 7.54f);
            bezier11Path.lineTo(13.03f, 5.38f);
            bezier11Path.lineTo(13.08f, 5.38f);
            bezier11Path.lineTo(13.08f, 8.07f);
            bezier11Path.lineTo(10.98f, 10.98f);
            bezier11Path.lineTo(9f, 12.44f);
            bezier11Path.lineTo(7.02f, 10.98f);
            bezier11Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier11Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor3);
            canvas.drawPath(bezier11Path, paint);
        }
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawExperience(Canvas canvas) {
        HabiticaIcons.drawExperience(canvas, new RectF(0f, 0f, 18f, 18f), ResizingBehavior.AspectFit);
    }
    
    public static void drawExperience(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForExperience.paint;
        
        // Local Colors
        int fillColor3 = Color.argb(128, 255, 255, 255);
        int fillColor12 = Color.argb(128, 191, 125, 26);
        int fillColor11 = Color.argb(64, 191, 125, 26);
        int fillColor5 = Color.argb(64, 255, 255, 255);
        int fillColor10 = Color.argb(255, 255, 166, 35);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForExperience.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForExperience.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 18f, resizedFrame.height() / 18f);
        
        // Star
        RectF starRect = CacheForExperience.starRect;
        starRect.set(0f, 0f, 18f, 18f);
        Path starPath = CacheForExperience.starPath;
        starPath.reset();
        starPath.moveTo(9f, 0f);
        starPath.lineTo(12.01f, 5.99f);
        starPath.lineTo(18f, 9f);
        starPath.lineTo(12.01f, 12.01f);
        starPath.lineTo(9f, 18f);
        starPath.lineTo(5.99f, 12.01f);
        starPath.lineTo(0f, 9f);
        starPath.lineTo(5.99f, 5.99f);
        starPath.lineTo(9f, 0f);
        starPath.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor10);
        canvas.drawPath(starPath, paint);
        
        // Bezier
        RectF bezierRect = CacheForExperience.bezierRect;
        bezierRect.set(3.38f, 7.13f, 9f, 9f);
        Path bezierPath = CacheForExperience.bezierPath;
        bezierPath.reset();
        bezierPath.moveTo(3.38f, 9f);
        bezierPath.lineTo(7.13f, 7.13f);
        bezierPath.lineTo(9f, 9f);
        bezierPath.lineTo(3.38f, 9f);
        bezierPath.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezierPath.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor5);
        canvas.drawPath(bezierPath, paint);
        
        // Bezier 2
        RectF bezier2Rect = CacheForExperience.bezier2Rect;
        bezier2Rect.set(7.13f, 9f, 9f, 14.63f);
        Path bezier2Path = CacheForExperience.bezier2Path;
        bezier2Path.reset();
        bezier2Path.moveTo(9f, 14.63f);
        bezier2Path.lineTo(7.13f, 10.88f);
        bezier2Path.lineTo(9f, 9f);
        bezier2Path.lineTo(9f, 14.63f);
        bezier2Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier2Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor5);
        canvas.drawPath(bezier2Path, paint);
        
        // Bezier 3
        RectF bezier3Rect = CacheForExperience.bezier3Rect;
        bezier3Rect.set(9f, 9f, 14.63f, 10.88f);
        Path bezier3Path = CacheForExperience.bezier3Path;
        bezier3Path.reset();
        bezier3Path.moveTo(14.63f, 9f);
        bezier3Path.lineTo(10.88f, 10.88f);
        bezier3Path.lineTo(9f, 9f);
        bezier3Path.lineTo(14.63f, 9f);
        bezier3Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier3Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor5);
        canvas.drawPath(bezier3Path, paint);
        
        // Bezier 4
        RectF bezier4Rect = CacheForExperience.bezier4Rect;
        bezier4Rect.set(9f, 3.38f, 10.88f, 9f);
        Path bezier4Path = CacheForExperience.bezier4Path;
        bezier4Path.reset();
        bezier4Path.moveTo(9f, 3.38f);
        bezier4Path.lineTo(10.88f, 7.13f);
        bezier4Path.lineTo(9f, 9f);
        bezier4Path.lineTo(9f, 3.38f);
        bezier4Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier4Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor5);
        canvas.drawPath(bezier4Path, paint);
        
        // Bezier 5
        RectF bezier5Rect = CacheForExperience.bezier5Rect;
        bezier5Rect.set(9f, 7.13f, 14.63f, 9f);
        Path bezier5Path = CacheForExperience.bezier5Path;
        bezier5Path.reset();
        bezier5Path.moveTo(14.63f, 9f);
        bezier5Path.lineTo(10.88f, 7.13f);
        bezier5Path.lineTo(9f, 9f);
        bezier5Path.lineTo(14.63f, 9f);
        bezier5Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier5Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor11);
        canvas.drawPath(bezier5Path, paint);
        
        // Bezier 6
        RectF bezier6Rect = CacheForExperience.bezier6Rect;
        bezier6Rect.set(9f, 9f, 10.88f, 14.63f);
        Path bezier6Path = CacheForExperience.bezier6Path;
        bezier6Path.reset();
        bezier6Path.moveTo(9f, 14.63f);
        bezier6Path.lineTo(10.88f, 10.88f);
        bezier6Path.lineTo(9f, 9f);
        bezier6Path.lineTo(9f, 14.63f);
        bezier6Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier6Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor12);
        canvas.drawPath(bezier6Path, paint);
        
        // Bezier 7
        RectF bezier7Rect = CacheForExperience.bezier7Rect;
        bezier7Rect.set(3.38f, 9f, 9f, 10.88f);
        Path bezier7Path = CacheForExperience.bezier7Path;
        bezier7Path.reset();
        bezier7Path.moveTo(3.38f, 9f);
        bezier7Path.lineTo(7.13f, 10.88f);
        bezier7Path.lineTo(9f, 9f);
        bezier7Path.lineTo(3.38f, 9f);
        bezier7Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier7Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor3);
        canvas.drawPath(bezier7Path, paint);
        
        // Bezier 8
        RectF bezier8Rect = CacheForExperience.bezier8Rect;
        bezier8Rect.set(7.13f, 3.38f, 9f, 9f);
        Path bezier8Path = CacheForExperience.bezier8Path;
        bezier8Path.reset();
        bezier8Path.moveTo(9f, 3.38f);
        bezier8Path.lineTo(7.13f, 7.13f);
        bezier8Path.lineTo(9f, 9f);
        bezier8Path.lineTo(9f, 3.38f);
        bezier8Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier8Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor3);
        canvas.drawPath(bezier8Path, paint);
        
        // Star 2
        RectF star2Rect = CacheForExperience.star2Rect;
        star2Rect.set(6.35f, 6.35f, 11.65f, 11.65f);
        Path star2Path = CacheForExperience.star2Path;
        star2Path.reset();
        star2Path.moveTo(9f, 6.35f);
        star2Path.lineTo(9.88f, 8.12f);
        star2Path.lineTo(11.65f, 9f);
        star2Path.lineTo(9.88f, 9.88f);
        star2Path.lineTo(9f, 11.65f);
        star2Path.lineTo(8.12f, 9.88f);
        star2Path.lineTo(6.35f, 9f);
        star2Path.lineTo(8.12f, 8.12f);
        star2Path.lineTo(9f, 6.35f);
        star2Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor3);
        canvas.drawPath(star2Path, paint);
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawMagic(Canvas canvas) {
        HabiticaIcons.drawMagic(canvas, new RectF(0f, 0f, 18f, 18f), ResizingBehavior.AspectFit);
    }
    
    public static void drawMagic(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForMagic.paint;
        
        // Local Colors
        int fillColor3 = Color.argb(128, 255, 255, 255);
        int fillColor5 = Color.argb(64, 255, 255, 255);
        int fillColor9 = Color.argb(64, 31, 112, 154);
        int fillColor8 = Color.argb(255, 80, 181, 233);
        int fillColor7 = Color.argb(255, 41, 149, 205);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForMagic.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForMagic.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 18f, resizedFrame.height() / 18f);
        
        // Bezier
        RectF bezierRect = CacheForMagic.bezierRect;
        bezierRect.set(2f, 1f, 16f, 18f);
        Path bezierPath = CacheForMagic.bezierPath;
        bezierPath.reset();
        bezierPath.moveTo(16f, 11.63f);
        bezierPath.lineTo(9f, 18f);
        bezierPath.lineTo(2f, 11.63f);
        bezierPath.lineTo(9f, 1f);
        bezierPath.lineTo(16f, 11.63f);
        bezierPath.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezierPath.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor7);
        canvas.drawPath(bezierPath, paint);
        
        // Bezier 2
        RectF bezier2Rect = CacheForMagic.bezier2Rect;
        bezier2Rect.set(3.82f, 9.29f, 9f, 16.09f);
        Path bezier2Path = CacheForMagic.bezier2Path;
        bezier2Path.reset();
        bezier2Path.moveTo(3.82f, 11.41f);
        bezier2Path.lineTo(9f, 9.29f);
        bezier2Path.lineTo(9f, 16.09f);
        bezier2Path.lineTo(3.82f, 11.41f);
        bezier2Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier2Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor8);
        canvas.drawPath(bezier2Path, paint);
        
        // Bezier 3
        RectF bezier3Rect = CacheForMagic.bezier3Rect;
        bezier3Rect.set(9f, 9.29f, 14.18f, 16.09f);
        Path bezier3Path = CacheForMagic.bezier3Path;
        bezier3Path.reset();
        bezier3Path.moveTo(9f, 9.29f);
        bezier3Path.lineTo(14.18f, 11.41f);
        bezier3Path.lineTo(9f, 16.09f);
        bezier3Path.lineTo(9f, 9.29f);
        bezier3Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier3Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor9);
        canvas.drawPath(bezier3Path, paint);
        
        // Bezier 4
        RectF bezier4Rect = CacheForMagic.bezier4Rect;
        bezier4Rect.set(9f, 3.55f, 14.18f, 11.41f);
        Path bezier4Path = CacheForMagic.bezier4Path;
        bezier4Path.reset();
        bezier4Path.moveTo(9f, 9.29f);
        bezier4Path.lineTo(9f, 3.55f);
        bezier4Path.lineTo(14.18f, 11.41f);
        bezier4Path.lineTo(9f, 9.29f);
        bezier4Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier4Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor5);
        canvas.drawPath(bezier4Path, paint);
        
        // Bezier 5
        RectF bezier5Rect = CacheForMagic.bezier5Rect;
        bezier5Rect.set(3.82f, 3.55f, 9f, 11.41f);
        Path bezier5Path = CacheForMagic.bezier5Path;
        bezier5Path.reset();
        bezier5Path.moveTo(3.82f, 11.41f);
        bezier5Path.lineTo(9f, 3.55f);
        bezier5Path.lineTo(9f, 9.29f);
        bezier5Path.lineTo(3.82f, 11.41f);
        bezier5Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier5Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor3);
        canvas.drawPath(bezier5Path, paint);
        
        // Bezier 6
        RectF bezier6Rect = CacheForMagic.bezier6Rect;
        bezier6Rect.set(5.64f, 6.1f, 12.36f, 14.17f);
        Path bezier6Path = CacheForMagic.bezier6Path;
        bezier6Path.reset();
        bezier6Path.moveTo(5.64f, 11.13f);
        bezier6Path.lineTo(9f, 6.1f);
        bezier6Path.lineTo(12.36f, 11.13f);
        bezier6Path.lineTo(9f, 14.17f);
        bezier6Path.lineTo(5.64f, 11.13f);
        bezier6Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier6Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor3);
        canvas.drawPath(bezier6Path, paint);
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawGold(Canvas canvas) {
        HabiticaIcons.drawGold(canvas, new RectF(0f, 0f, 18f, 18f), ResizingBehavior.AspectFit);
    }
    
    public static void drawGold(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForGold.paint;
        
        // Local Colors
        int fillColor13 = Color.argb(191, 191, 125, 26);
        int fillColor12 = Color.argb(128, 191, 125, 26);
        int fillColor5 = Color.argb(64, 255, 255, 255);
        int fillColor3 = Color.argb(128, 255, 255, 255);
        int fillColor10 = Color.argb(255, 255, 166, 35);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForGold.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForGold.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 18f, resizedFrame.height() / 18f);
        
        // Bezier
        RectF bezierRect = CacheForGold.bezierRect;
        bezierRect.set(0f, 0f, 18f, 18f);
        Path bezierPath = CacheForGold.bezierPath;
        bezierPath.reset();
        bezierPath.moveTo(9f, 18f);
        bezierPath.cubicTo(13.97f, 18f, 18f, 13.97f, 18f, 9f);
        bezierPath.cubicTo(18f, 4.03f, 13.97f, 0f, 9f, 0f);
        bezierPath.cubicTo(4.03f, 0f, 0f, 4.03f, 0f, 9f);
        bezierPath.cubicTo(0f, 13.97f, 4.03f, 18f, 9f, 18f);
        bezierPath.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezierPath.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor10);
        canvas.drawPath(bezierPath, paint);
        
        // Bezier 2
        RectF bezier2Rect = CacheForGold.bezier2Rect;
        bezier2Rect.set(2.98f, 3.06f, 13.2f, 13.28f);
        Path bezier2Path = CacheForGold.bezier2Path;
        bezier2Path.reset();
        bezier2Path.moveTo(4.72f, 13.28f);
        bezier2Path.cubicTo(2.4f, 10.95f, 2.4f, 7.13f, 4.72f, 4.8f);
        bezier2Path.cubicTo(7.05f, 2.48f, 10.88f, 2.48f, 13.2f, 4.8f);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier2Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor3);
        canvas.drawPath(bezier2Path, paint);
        
        // Bezier 3
        RectF bezier3Rect = CacheForGold.bezier3Rect;
        bezier3Rect.set(4.8f, 4.72f, 15.02f, 14.94f);
        Path bezier3Path = CacheForGold.bezier3Path;
        bezier3Path.reset();
        bezier3Path.moveTo(13.28f, 4.72f);
        bezier3Path.cubicTo(15.6f, 7.05f, 15.6f, 10.88f, 13.28f, 13.2f);
        bezier3Path.cubicTo(10.95f, 15.53f, 7.13f, 15.53f, 4.8f, 13.2f);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier3Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor5);
        canvas.drawPath(bezier3Path, paint);
        
        // Bezier 4
        RectF bezier4Rect = CacheForGold.bezier4Rect;
        bezier4Rect.set(1.5f, 1.5f, 16.5f, 16.5f);
        Path bezier4Path = CacheForGold.bezier4Path;
        bezier4Path.reset();
        bezier4Path.moveTo(9f, 1.5f);
        bezier4Path.cubicTo(4.88f, 1.5f, 1.5f, 4.88f, 1.5f, 9f);
        bezier4Path.cubicTo(1.5f, 13.13f, 4.88f, 16.5f, 9f, 16.5f);
        bezier4Path.cubicTo(13.13f, 16.5f, 16.5f, 13.13f, 16.5f, 9f);
        bezier4Path.cubicTo(16.5f, 4.88f, 13.13f, 1.5f, 9f, 1.5f);
        bezier4Path.lineTo(9f, 1.5f);
        bezier4Path.close();
        bezier4Path.moveTo(9f, 15f);
        bezier4Path.cubicTo(5.7f, 15f, 3f, 12.3f, 3f, 9f);
        bezier4Path.cubicTo(3f, 5.7f, 5.7f, 3f, 9f, 3f);
        bezier4Path.cubicTo(12.3f, 3f, 15f, 5.7f, 15f, 9f);
        bezier4Path.cubicTo(15f, 12.3f, 12.3f, 15f, 9f, 15f);
        bezier4Path.lineTo(9f, 15f);
        bezier4Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier4Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor12);
        canvas.drawPath(bezier4Path, paint);
        
        // Bezier 5
        RectF bezier5Rect = CacheForGold.bezier5Rect;
        bezier5Rect.set(6.75f, 6.75f, 11.25f, 11.25f);
        Path bezier5Path = CacheForGold.bezier5Path;
        bezier5Path.reset();
        bezier5Path.moveTo(9.75f, 6.75f);
        bezier5Path.lineTo(9.75f, 8.25f);
        bezier5Path.lineTo(8.25f, 8.25f);
        bezier5Path.lineTo(8.25f, 6.75f);
        bezier5Path.lineTo(6.75f, 6.75f);
        bezier5Path.lineTo(6.75f, 11.25f);
        bezier5Path.lineTo(8.25f, 11.25f);
        bezier5Path.lineTo(8.25f, 9.75f);
        bezier5Path.lineTo(9.75f, 9.75f);
        bezier5Path.lineTo(9.75f, 11.25f);
        bezier5Path.lineTo(11.25f, 11.25f);
        bezier5Path.lineTo(11.25f, 6.75f);
        bezier5Path.lineTo(9.75f, 6.75f);
        bezier5Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier5Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor13);
        canvas.drawPath(bezier5Path, paint);
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawGem(Canvas canvas) {
        HabiticaIcons.drawGem(canvas, new RectF(0f, 0f, 18f, 18f), ResizingBehavior.AspectFit);
    }
    
    public static void drawGem(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForGem.paint;
        
        // Local Colors
        int fillColor3 = Color.argb(128, 255, 255, 255);
        int fillColor5 = Color.argb(64, 255, 255, 255);
        int fillColor15 = Color.argb(89, 27, 153, 107);
        int fillColor14 = Color.argb(255, 36, 204, 143);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForGem.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForGem.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 18f, resizedFrame.height() / 18f);
        
        // Group
        {
            // Bezier
            RectF bezierRect = CacheForGem.bezierRect;
            bezierRect.set(0f, 1.5f, 18f, 16.5f);
            Path bezierPath = CacheForGem.bezierPath;
            bezierPath.reset();
            bezierPath.moveTo(0f, 6.75f);
            bezierPath.lineTo(3.75f, 1.5f);
            bezierPath.lineTo(14.25f, 1.5f);
            bezierPath.lineTo(18f, 6.75f);
            bezierPath.lineTo(9f, 16.5f);
            bezierPath.lineTo(0f, 6.75f);
            bezierPath.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezierPath.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor14);
            canvas.drawPath(bezierPath, paint);
            
            // Bezier 2
            RectF bezier2Rect = CacheForGem.bezier2Rect;
            bezier2Rect.set(4.5f, 3f, 9f, 6.6f);
            Path bezier2Path = CacheForGem.bezier2Path;
            bezier2Path.reset();
            bezier2Path.moveTo(5.25f, 6.6f);
            bezier2Path.lineTo(4.5f, 3f);
            bezier2Path.lineTo(9f, 3f);
            bezier2Path.lineTo(5.25f, 6.6f);
            bezier2Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier2Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor5);
            canvas.drawPath(bezier2Path, paint);
            
            // Bezier 3
            RectF bezier3Rect = CacheForGem.bezier3Rect;
            bezier3Rect.set(9f, 3f, 13.5f, 6.6f);
            Path bezier3Path = CacheForGem.bezier3Path;
            bezier3Path.reset();
            bezier3Path.moveTo(12.75f, 6.6f);
            bezier3Path.lineTo(13.5f, 3f);
            bezier3Path.lineTo(9f, 3f);
            bezier3Path.lineTo(12.75f, 6.6f);
            bezier3Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier3Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor5);
            canvas.drawPath(bezier3Path, paint);
            
            // Bezier 4
            RectF bezier4Rect = CacheForGem.bezier4Rect;
            bezier4Rect.set(5.25f, 3f, 12.75f, 6.6f);
            Path bezier4Path = CacheForGem.bezier4Path;
            bezier4Path.reset();
            bezier4Path.moveTo(5.25f, 6.6f);
            bezier4Path.lineTo(9f, 3f);
            bezier4Path.lineTo(12.75f, 6.6f);
            bezier4Path.lineTo(5.25f, 6.6f);
            bezier4Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier4Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor3);
            canvas.drawPath(bezier4Path, paint);
            
            // Bezier 5
            RectF bezier5Rect = CacheForGem.bezier5Rect;
            bezier5Rect.set(1.95f, 3f, 5.25f, 6.6f);
            Path bezier5Path = CacheForGem.bezier5Path;
            bezier5Path.reset();
            bezier5Path.moveTo(1.95f, 6.6f);
            bezier5Path.lineTo(4.5f, 3f);
            bezier5Path.lineTo(5.25f, 6.6f);
            bezier5Path.lineTo(1.95f, 6.6f);
            bezier5Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier5Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor3);
            canvas.drawPath(bezier5Path, paint);
            
            // Bezier 6
            RectF bezier6Rect = CacheForGem.bezier6Rect;
            bezier6Rect.set(12.75f, 3f, 16.05f, 6.6f);
            Path bezier6Path = CacheForGem.bezier6Path;
            bezier6Path.reset();
            bezier6Path.moveTo(16.05f, 6.6f);
            bezier6Path.lineTo(13.5f, 3f);
            bezier6Path.lineTo(12.75f, 6.6f);
            bezier6Path.lineTo(16.05f, 6.6f);
            bezier6Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier6Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor15);
            canvas.drawPath(bezier6Path, paint);
            
            // Bezier 7
            RectF bezier7Rect = CacheForGem.bezier7Rect;
            bezier7Rect.set(1.95f, 6.6f, 9f, 14.33f);
            Path bezier7Path = CacheForGem.bezier7Path;
            bezier7Path.reset();
            bezier7Path.moveTo(1.95f, 6.6f);
            bezier7Path.lineTo(5.25f, 6.6f);
            bezier7Path.lineTo(9f, 14.33f);
            bezier7Path.lineTo(1.95f, 6.6f);
            bezier7Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier7Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor15);
            canvas.drawPath(bezier7Path, paint);
            
            // Bezier 8
            RectF bezier8Rect = CacheForGem.bezier8Rect;
            bezier8Rect.set(9f, 6.6f, 16.05f, 14.33f);
            Path bezier8Path = CacheForGem.bezier8Path;
            bezier8Path.reset();
            bezier8Path.moveTo(16.05f, 6.6f);
            bezier8Path.lineTo(12.75f, 6.6f);
            bezier8Path.lineTo(9f, 14.33f);
            bezier8Path.lineTo(16.05f, 6.6f);
            bezier8Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier8Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor3);
            canvas.drawPath(bezier8Path, paint);
            
            // Bezier 9
            RectF bezier9Rect = CacheForGem.bezier9Rect;
            bezier9Rect.set(5.25f, 6.6f, 12.75f, 14.33f);
            Path bezier9Path = CacheForGem.bezier9Path;
            bezier9Path.reset();
            bezier9Path.moveTo(5.25f, 6.6f);
            bezier9Path.lineTo(12.75f, 6.6f);
            bezier9Path.lineTo(9f, 14.33f);
            bezier9Path.lineTo(5.25f, 6.6f);
            bezier9Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier9Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor5);
            canvas.drawPath(bezier9Path, paint);
        }
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawHourglass(Canvas canvas) {
        HabiticaIcons.drawHourglass(canvas, new RectF(0f, 0f, 18f, 18f), ResizingBehavior.AspectFit);
    }
    
    public static void drawHourglass(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForHourglass.paint;
        
        // Local Colors
        int fillColor19 = Color.argb(255, 79, 42, 147);
        int fillColor18 = Color.argb(255, 154, 98, 255);
        int fillColor17 = Color.argb(230, 255, 255, 255);
        int fillColor16 = Color.argb(204, 169, 220, 246);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForHourglass.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForHourglass.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 18f, resizedFrame.height() / 18f);
        
        // Group
        {
            // Bezier
            RectF bezierRect = CacheForHourglass.bezierRect;
            bezierRect.set(3f, 0f, 13.57f, 18.12f);
            Path bezierPath = CacheForHourglass.bezierPath;
            bezierPath.reset();
            bezierPath.moveTo(3f, 14.35f);
            bezierPath.lineTo(3f, 16.37f);
            bezierPath.cubicTo(3f, 16.61f, 3.11f, 16.83f, 3.3f, 16.97f);
            bezierPath.cubicTo(5.39f, 18.51f, 11.18f, 18.51f, 13.27f, 16.97f);
            bezierPath.cubicTo(13.47f, 16.83f, 13.57f, 16.61f, 13.57f, 16.37f);
            bezierPath.lineTo(13.57f, 14.35f);
            bezierPath.cubicTo(13.57f, 12.5f, 12.62f, 10.73f, 11.19f, 9.68f);
            bezierPath.cubicTo(10.77f, 9.37f, 10.77f, 8.75f, 11.19f, 8.45f);
            bezierPath.cubicTo(12.62f, 7.39f, 13.57f, 5.62f, 13.57f, 3.78f);
            bezierPath.lineTo(13.57f, 1.75f);
            bezierPath.cubicTo(13.57f, 1.52f, 13.47f, 1.29f, 13.27f, 1.15f);
            bezierPath.cubicTo(11.18f, -0.38f, 5.39f, -0.38f, 3.3f, 1.15f);
            bezierPath.cubicTo(3.11f, 1.29f, 3f, 1.52f, 3f, 1.75f);
            bezierPath.lineTo(3f, 3.78f);
            bezierPath.cubicTo(3f, 5.62f, 3.95f, 7.39f, 5.38f, 8.45f);
            bezierPath.cubicTo(5.8f, 8.75f, 5.8f, 9.37f, 5.38f, 9.68f);
            bezierPath.cubicTo(3.95f, 10.73f, 3f, 12.5f, 3f, 14.35f);
            bezierPath.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezierPath.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor16);
            canvas.drawPath(bezierPath, paint);
            
            // Bezier 2
            RectF bezier2Rect = CacheForHourglass.bezier2Rect;
            bezier2Rect.set(4.51f, 1.51f, 12.06f, 16.61f);
            Path bezier2Path = CacheForHourglass.bezier2Path;
            bezier2Path.reset();
            bezier2Path.moveTo(8.29f, 1.51f);
            bezier2Path.cubicTo(10f, 1.51f, 11.34f, 1.82f, 12.06f, 2.18f);
            bezier2Path.lineTo(12.06f, 3.77f);
            bezier2Path.cubicTo(12.06f, 5.1f, 11.38f, 6.43f, 10.3f, 7.23f);
            bezier2Path.cubicTo(9.71f, 7.66f, 9.37f, 8.34f, 9.37f, 9.06f);
            bezier2Path.cubicTo(9.37f, 9.78f, 9.71f, 10.46f, 10.29f, 10.89f);
            bezier2Path.cubicTo(11.38f, 11.69f, 12.06f, 13.02f, 12.06f, 14.35f);
            bezier2Path.lineTo(12.06f, 15.94f);
            bezier2Path.cubicTo(11.34f, 16.3f, 10f, 16.61f, 8.29f, 16.61f);
            bezier2Path.cubicTo(6.57f, 16.61f, 5.23f, 16.3f, 4.51f, 15.94f);
            bezier2Path.lineTo(4.51f, 14.35f);
            bezier2Path.cubicTo(4.51f, 13.02f, 5.19f, 11.69f, 6.28f, 10.89f);
            bezier2Path.cubicTo(6.86f, 10.46f, 7.21f, 9.78f, 7.21f, 9.06f);
            bezier2Path.cubicTo(7.21f, 8.34f, 6.86f, 7.66f, 6.28f, 7.23f);
            bezier2Path.cubicTo(5.19f, 6.43f, 4.51f, 5.1f, 4.51f, 3.77f);
            bezier2Path.lineTo(4.51f, 2.18f);
            bezier2Path.cubicTo(5.23f, 1.82f, 6.57f, 1.51f, 8.29f, 1.51f);
            bezier2Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier2Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor17);
            canvas.drawPath(bezier2Path, paint);
            
            // Bezier 3
            RectF bezier3Rect = CacheForHourglass.bezier3Rect;
            bezier3Rect.set(5.79f, 2.64f, 10.98f, 5.83f);
            Path bezier3Path = CacheForHourglass.bezier3Path;
            bezier3Path.reset();
            bezier3Path.moveTo(8.46f, 2.64f);
            bezier3Path.cubicTo(7.17f, 2.64f, 5.81f, 2.76f, 5.79f, 3.08f);
            bezier3Path.cubicTo(5.78f, 3.34f, 5.79f, 3.84f, 6.83f, 4.37f);
            bezier3Path.cubicTo(7.85f, 4.88f, 8.04f, 5.83f, 8.59f, 5.83f);
            bezier3Path.cubicTo(9.23f, 5.83f, 9.27f, 5.28f, 10.05f, 4.75f);
            bezier3Path.cubicTo(10.86f, 4.19f, 10.99f, 3.44f, 10.98f, 3.14f);
            bezier3Path.cubicTo(10.97f, 2.73f, 9.75f, 2.64f, 8.46f, 2.64f);
            bezier3Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier3Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor18);
            canvas.drawPath(bezier3Path, paint);
            
            // Bezier 4
            RectF bezier4Rect = CacheForHourglass.bezier4Rect;
            bezier4Rect.set(8.88f, 2.66f, 10.98f, 5.7f);
            Path bezier4Path = CacheForHourglass.bezier4Path;
            bezier4Path.reset();
            bezier4Path.moveTo(10.05f, 4.75f);
            bezier4Path.cubicTo(10.86f, 4.19f, 10.99f, 3.44f, 10.98f, 3.14f);
            bezier4Path.cubicTo(10.97f, 2.82f, 10.2f, 2.7f, 9.24f, 2.66f);
            bezier4Path.cubicTo(9.51f, 2.8f, 9.86f, 3.09f, 9.78f, 3.66f);
            bezier4Path.cubicTo(9.69f, 4.26f, 8.75f, 4.92f, 8.9f, 5.44f);
            bezier4Path.cubicTo(8.93f, 5.55f, 8.98f, 5.63f, 9.04f, 5.7f);
            bezier4Path.cubicTo(9.32f, 5.5f, 9.5f, 5.12f, 10.05f, 4.75f);
            bezier4Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier4Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor19);
            canvas.drawPath(bezier4Path, paint);
            
            // Bezier 5
            RectF bezier5Rect = CacheForHourglass.bezier5Rect;
            bezier5Rect.set(5.62f, 10.44f, 10.81f, 14.86f);
            Path bezier5Path = CacheForHourglass.bezier5Path;
            bezier5Path.reset();
            bezier5Path.moveTo(8.29f, 10.44f);
            bezier5Path.cubicTo(7.89f, 10.44f, 7.79f, 11.15f, 7.22f, 11.59f);
            bezier5Path.cubicTo(6.53f, 12.14f, 5.86f, 12.81f, 5.68f, 13.77f);
            bezier5Path.cubicTo(5.53f, 14.57f, 5.67f, 14.67f, 5.85f, 14.72f);
            bezier5Path.cubicTo(6.03f, 14.78f, 7.43f, 15.01f, 8.79f, 14.72f);
            bezier5Path.cubicTo(10.16f, 14.43f, 10.92f, 13.88f, 10.79f, 13.33f);
            bezier5Path.cubicTo(10.66f, 12.79f, 10.28f, 12.34f, 9.58f, 11.82f);
            bezier5Path.cubicTo(8.9f, 11.32f, 8.68f, 10.44f, 8.29f, 10.44f);
            bezier5Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier5Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor18);
            canvas.drawPath(bezier5Path, paint);
            
            // Bezier 6
            RectF bezier6Rect = CacheForHourglass.bezier6Rect;
            bezier6Rect.set(5.66f, 13.3f, 10.76f, 14.86f);
            Path bezier6Path = CacheForHourglass.bezier6Path;
            bezier6Path.reset();
            bezier6Path.moveTo(5.85f, 14.72f);
            bezier6Path.cubicTo(6.03f, 14.78f, 7.43f, 15.01f, 8.79f, 14.72f);
            bezier6Path.cubicTo(9.88f, 14.49f, 10.59f, 14.1f, 10.76f, 13.66f);
            bezier6Path.cubicTo(10.76f, 13.66f, 10.76f, 13.65f, 10.76f, 13.64f);
            bezier6Path.cubicTo(10.68f, 13.35f, 9.53f, 13.17f, 8.11f, 13.4f);
            bezier6Path.cubicTo(6.75f, 13.62f, 5.65f, 14.07f, 5.66f, 14.57f);
            bezier6Path.cubicTo(5.7f, 14.67f, 5.77f, 14.7f, 5.85f, 14.72f);
            bezier6Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier6Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor19);
            canvas.drawPath(bezier6Path, paint);
        }
        
        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);
    }
    
    public static void drawWarrior(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, boolean darkBackground) {
        // General Declarations
        Stack<Matrix> currentTransformation = new Stack<Matrix>();
        currentTransformation.push(new Matrix());
        Paint paint = CacheForWarrior.paint;
        
        // Local Colors
        int fillColor41 = Color.argb(255, 255, 149, 152);
        int fillColor43 = Color.argb(255, 200, 43, 43);
        int fillColor22 = Color.argb(255, 242, 123, 134);
        int fillColor20 = Color.argb(255, 255, 181, 183);
        int fillColor21 = Color.argb(255, 255, 182, 184);
        int fillColor42 = Color.argb(255, 255, 149, 152);
        int fillColor23 = Color.argb(255, 229, 65, 77);
        int fillColor = Color.argb(255, 240, 97, 102);
        
        // Local Variables
        boolean lightBackground = !darkBackground;
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForWarrior.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForWarrior.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 32f, resizedFrame.height() / 32f);
        
        // Group 2
        if (darkBackground) {
            // Bezier
            RectF bezierRect = CacheForWarrior.bezierRect;
            bezierRect.set(7.65f, 15.19f, 16.89f, 24.43f);
            Path bezierPath = CacheForWarrior.bezierPath;
            bezierPath.reset();
            bezierPath.moveTo(12.58f, 19.5f);
            bezierPath.lineTo(15.88f, 21.02f);
            bezierPath.cubicTo(16.15f, 21.15f, 16.33f, 21.4f, 16.4f, 21.7f);
            bezierPath.cubicTo(16.51f, 22.19f, 16.86f, 23.34f, 16.89f, 23.95f);
            bezierPath.cubicTo(16.9f, 24.29f, 16.55f, 24.53f, 16.24f, 24.39f);
            bezierPath.lineTo(10.73f, 21.75f);
            bezierPath.cubicTo(10.56f, 21.66f, 10.42f, 21.52f, 10.33f, 21.35f);
            bezierPath.lineTo(7.69f, 15.84f);
            bezierPath.cubicTo(7.55f, 15.53f, 7.79f, 15.18f, 8.13f, 15.19f);
            bezierPath.cubicTo(8.74f, 15.22f, 9.86f, 15.55f, 10.38f, 15.68f);
            bezierPath.cubicTo(10.67f, 15.76f, 10.93f, 15.93f, 11.06f, 16.2f);
            bezierPath.lineTo(12.58f, 19.5f);
            bezierPath.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezierPath.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor);
            canvas.drawPath(bezierPath, paint);
            
            // Bezier 2
            RectF bezier2Rect = CacheForWarrior.bezier2Rect;
            bezier2Rect.set(3.18f, 4.9f, 27.18f, 28.91f);
            Path bezier2Path = CacheForWarrior.bezier2Path;
            bezier2Path.reset();
            bezier2Path.moveTo(4.6f, 27.48f);
            bezier2Path.lineTo(6.02f, 28.91f);
            bezier2Path.lineTo(9.71f, 28.62f);
            bezier2Path.lineTo(9.9f, 26.19f);
            bezier2Path.lineTo(12.02f, 24.07f);
            bezier2Path.lineTo(15.88f, 25.91f);
            bezier2Path.lineTo(18.76f, 25.13f);
            bezier2Path.lineTo(17.55f, 19.93f);
            bezier2Path.lineTo(25.63f, 12.39f);
            bezier2Path.lineTo(27.18f, 4.91f);
            bezier2Path.lineTo(27.17f, 4.91f);
            bezier2Path.lineTo(27.18f, 4.91f);
            bezier2Path.lineTo(27.18f, 4.9f);
            bezier2Path.lineTo(19.7f, 6.45f);
            bezier2Path.lineTo(12.16f, 14.53f);
            bezier2Path.lineTo(6.95f, 13.32f);
            bezier2Path.lineTo(6.18f, 16.2f);
            bezier2Path.lineTo(8.01f, 20.06f);
            bezier2Path.lineTo(5.89f, 22.18f);
            bezier2Path.lineTo(3.47f, 22.37f);
            bezier2Path.lineTo(3.18f, 26.06f);
            bezier2Path.lineTo(4.6f, 27.48f);
            bezier2Path.lineTo(4.6f, 27.48f);
            bezier2Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier2Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor20);
            canvas.drawPath(bezier2Path, paint);
            
            // Rectangle
            canvas.save();
            canvas.translate(9f, 23.05f);
            currentTransformation.peek().postTranslate(9f, 23.05f);
            canvas.rotate(45f);
            currentTransformation.peek().postRotate(45f);
            RectF rectangleRect = CacheForWarrior.rectangleRect;
            rectangleRect.set(-1.3f, -3.23f, 1.3f, 3.23f);
            Path rectanglePath = CacheForWarrior.rectanglePath;
            rectanglePath.reset();
            rectanglePath.moveTo(rectangleRect.left, rectangleRect.top);
            rectanglePath.lineTo(rectangleRect.right, rectangleRect.top);
            rectanglePath.lineTo(rectangleRect.right, rectangleRect.bottom);
            rectanglePath.lineTo(rectangleRect.left, rectangleRect.bottom);
            rectanglePath.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor);
            canvas.drawPath(rectanglePath, paint);
            canvas.restore();
            
            // Bezier 3
            RectF bezier3Rect = CacheForWarrior.bezier3Rect;
            bezier3Rect.set(4.76f, 23.66f, 8.42f, 27.32f);
            Path bezier3Path = CacheForWarrior.bezier3Path;
            bezier3Path.reset();
            bezier3Path.moveTo(4.76f, 25.47f);
            bezier3Path.lineTo(4.89f, 23.79f);
            bezier3Path.lineTo(6.58f, 23.66f);
            bezier3Path.lineTo(8.42f, 25.5f);
            bezier3Path.lineTo(8.29f, 27.19f);
            bezier3Path.lineTo(6.61f, 27.32f);
            bezier3Path.lineTo(4.76f, 25.47f);
            bezier3Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier3Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor);
            canvas.drawPath(bezier3Path, paint);
            
            // Bezier 4
            RectF bezier4Rect = CacheForWarrior.bezier4Rect;
            bezier4Rect.set(20.67f, 7.02f, 25.05f, 11.25f);
            Path bezier4Path = CacheForWarrior.bezier4Path;
            bezier4Path.reset();
            bezier4Path.moveTo(20.67f, 7.92f);
            bezier4Path.lineTo(20.83f, 11.25f);
            bezier4Path.lineTo(25.05f, 7.03f);
            bezier4Path.cubicTo(24.98f, 6.95f, 21.79f, 7.32f, 20.67f, 7.92f);
            bezier4Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier4Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor41);
            canvas.drawPath(bezier4Path, paint);
            
            // Bezier 5
            RectF bezier5Rect = CacheForWarrior.bezier5Rect;
            bezier5Rect.set(11.68f, 7.92f, 20.83f, 18.12f);
            Path bezier5Path = CacheForWarrior.bezier5Path;
            bezier5Path.reset();
            bezier5Path.moveTo(20.6f, 7.96f);
            bezier5Path.lineTo(11.68f, 17.32f);
            bezier5Path.lineTo(13.96f, 18.12f);
            bezier5Path.lineTo(20.83f, 11.25f);
            bezier5Path.lineTo(20.67f, 7.92f);
            bezier5Path.cubicTo(20.65f, 7.93f, 20.6f, 7.96f, 20.6f, 7.96f);
            bezier5Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier5Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor22);
            canvas.drawPath(bezier5Path, paint);
            
            // Bezier 6
            RectF bezier6Rect = CacheForWarrior.bezier6Rect;
            bezier6Rect.set(11.6f, 17.32f, 13.96f, 19.51f);
            Path bezier6Path = CacheForWarrior.bezier6Path;
            bezier6Path.reset();
            bezier6Path.moveTo(11.68f, 17.32f);
            bezier6Path.cubicTo(11.65f, 17.34f, 11.62f, 17.37f, 11.6f, 17.4f);
            bezier6Path.lineTo(12.57f, 19.51f);
            bezier6Path.lineTo(13.96f, 18.12f);
            bezier6Path.lineTo(11.68f, 17.32f);
            bezier6Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier6Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor22);
            canvas.drawPath(bezier6Path, paint);
            
            // Bezier 7
            RectF bezier7Rect = CacheForWarrior.bezier7Rect;
            bezier7Rect.set(20.83f, 7.03f, 25.06f, 11.41f);
            Path bezier7Path = CacheForWarrior.bezier7Path;
            bezier7Path.reset();
            bezier7Path.moveTo(24.16f, 11.41f);
            bezier7Path.lineTo(20.83f, 11.25f);
            bezier7Path.lineTo(25.05f, 7.03f);
            bezier7Path.cubicTo(25.13f, 7.1f, 24.76f, 10.29f, 24.16f, 11.41f);
            bezier7Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier7Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor22);
            canvas.drawPath(bezier7Path, paint);
            
            // Bezier 8
            RectF bezier8Rect = CacheForWarrior.bezier8Rect;
            bezier8Rect.set(13.96f, 11.25f, 24.16f, 20.4f);
            Path bezier8Path = CacheForWarrior.bezier8Path;
            bezier8Path.reset();
            bezier8Path.moveTo(24.12f, 11.48f);
            bezier8Path.lineTo(14.76f, 20.4f);
            bezier8Path.lineTo(13.96f, 18.12f);
            bezier8Path.lineTo(20.83f, 11.25f);
            bezier8Path.lineTo(24.16f, 11.41f);
            bezier8Path.cubicTo(24.14f, 11.43f, 24.12f, 11.48f, 24.12f, 11.48f);
            bezier8Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier8Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor23);
            canvas.drawPath(bezier8Path, paint);
            
            // Bezier 9
            RectF bezier9Rect = CacheForWarrior.bezier9Rect;
            bezier9Rect.set(12.57f, 18.12f, 14.76f, 20.48f);
            Path bezier9Path = CacheForWarrior.bezier9Path;
            bezier9Path.reset();
            bezier9Path.moveTo(14.76f, 20.4f);
            bezier9Path.cubicTo(14.73f, 20.43f, 14.7f, 20.46f, 14.68f, 20.48f);
            bezier9Path.lineTo(12.57f, 19.51f);
            bezier9Path.lineTo(13.96f, 18.12f);
            bezier9Path.lineTo(14.76f, 20.4f);
            bezier9Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier9Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor23);
            canvas.drawPath(bezier9Path, paint);
            
            // Bezier 10
            RectF bezier10Rect = CacheForWarrior.bezier10Rect;
            bezier10Rect.set(4.89f, 23.66f, 6.58f, 25.09f);
            Path bezier10Path = CacheForWarrior.bezier10Path;
            bezier10Path.reset();
            bezier10Path.moveTo(6.58f, 23.66f);
            bezier10Path.lineTo(6.19f, 25.09f);
            bezier10Path.lineTo(4.89f, 23.79f);
            bezier10Path.lineTo(6.58f, 23.66f);
            bezier10Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier10Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor42);
            canvas.drawPath(bezier10Path, paint);
            
            // Bezier 11
            RectF bezier11Rect = CacheForWarrior.bezier11Rect;
            bezier11Rect.set(6.99f, 25.5f, 8.42f, 27.19f);
            Path bezier11Path = CacheForWarrior.bezier11Path;
            bezier11Path.reset();
            bezier11Path.moveTo(8.42f, 25.5f);
            bezier11Path.lineTo(6.99f, 25.89f);
            bezier11Path.lineTo(8.29f, 27.19f);
            bezier11Path.lineTo(8.42f, 25.5f);
            bezier11Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier11Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor42);
            canvas.drawPath(bezier11Path, paint);
            
            // Bezier 12
            RectF bezier12Rect = CacheForWarrior.bezier12Rect;
            bezier12Rect.set(6.19f, 23.66f, 8.42f, 25.89f);
            Path bezier12Path = CacheForWarrior.bezier12Path;
            bezier12Path.reset();
            bezier12Path.moveTo(6.58f, 23.66f);
            bezier12Path.lineTo(8.42f, 25.5f);
            bezier12Path.lineTo(6.99f, 25.89f);
            bezier12Path.lineTo(6.19f, 25.09f);
            bezier12Path.lineTo(6.58f, 23.66f);
            bezier12Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier12Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor42);
            canvas.drawPath(bezier12Path, paint);
            
            // Bezier 13
            RectF bezier13Rect = CacheForWarrior.bezier13Rect;
            bezier13Rect.set(4.76f, 23.79f, 6.19f, 25.48f);
            Path bezier13Path = CacheForWarrior.bezier13Path;
            bezier13Path.reset();
            bezier13Path.moveTo(4.76f, 25.48f);
            bezier13Path.lineTo(6.19f, 25.09f);
            bezier13Path.lineTo(4.89f, 23.79f);
            bezier13Path.lineTo(4.76f, 25.48f);
            bezier13Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier13Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor22);
            canvas.drawPath(bezier13Path, paint);
            
            // Bezier 14
            RectF bezier14Rect = CacheForWarrior.bezier14Rect;
            bezier14Rect.set(6.6f, 25.89f, 8.29f, 27.32f);
            Path bezier14Path = CacheForWarrior.bezier14Path;
            bezier14Path.reset();
            bezier14Path.moveTo(6.6f, 27.32f);
            bezier14Path.lineTo(6.99f, 25.89f);
            bezier14Path.lineTo(8.29f, 27.19f);
            bezier14Path.lineTo(6.6f, 27.32f);
            bezier14Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier14Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor22);
            canvas.drawPath(bezier14Path, paint);
            
            // Bezier 15
            RectF bezier15Rect = CacheForWarrior.bezier15Rect;
            bezier15Rect.set(4.76f, 25.09f, 6.99f, 27.32f);
            Path bezier15Path = CacheForWarrior.bezier15Path;
            bezier15Path.reset();
            bezier15Path.moveTo(4.76f, 25.48f);
            bezier15Path.lineTo(6.61f, 27.32f);
            bezier15Path.lineTo(6.99f, 25.89f);
            bezier15Path.lineTo(6.19f, 25.09f);
            bezier15Path.lineTo(4.76f, 25.48f);
            bezier15Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier15Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor22);
            canvas.drawPath(bezier15Path, paint);
            
            // Rectangle 2
            canvas.save();
            canvas.translate(10.3f, 21.8f);
            currentTransformation.peek().postTranslate(10.3f, 21.8f);
            canvas.rotate(45f);
            currentTransformation.peek().postRotate(45f);
            RectF rectangle2Rect = CacheForWarrior.rectangle2Rect;
            rectangle2Rect.set(-1.3f, -0.8f, 1.3f, 0.8f);
            Path rectangle2Path = CacheForWarrior.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(fillColor23);
            canvas.drawPath(rectangle2Path, paint);
            canvas.restore();
            
            // Rectangle 3
            canvas.save();
            canvas.translate(9.15f, 22.9f);
            currentTransformation.peek().postTranslate(9.15f, 22.9f);
            canvas.rotate(45f);
            currentTransformation.peek().postRotate(45f);
            RectF rectangle3Rect = CacheForWarrior.rectangle3Rect;
            rectangle3Rect.set(-1.3f, -0.8f, 1.3f, 0.8f);
            Path rectangle3Path = CacheForWarrior.rectangle3Path;
            rectangle3Path.reset();
            rectangle3Path.moveTo(rectangle3Rect.left, rectangle3Rect.top);
            rectangle3Path.lineTo(rectangle3Rect.right, rectangle3Rect.top);
            rectangle3Path.lineTo(rectangle3Rect.right, rectangle3Rect.bottom);
            rectangle3Path.lineTo(rectangle3Rect.left, rectangle3Rect.bottom);
            rectangle3Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor);
            canvas.drawPath(rectangle3Path, paint);
            canvas.restore();
            
            // Rectangle 4
            canvas.save();
            canvas.translate(8.05f, 24f);
            currentTransformation.peek().postTranslate(8.05f, 24f);
            canvas.rotate(45f);
            currentTransformation.peek().postRotate(45f);
            RectF rectangle4Rect = CacheForWarrior.rectangle4Rect;
            rectangle4Rect.set(-1.3f, -0.8f, 1.3f, 0.8f);
            Path rectangle4Path = CacheForWarrior.rectangle4Path;
            rectangle4Path.reset();
            rectangle4Path.moveTo(rectangle4Rect.left, rectangle4Rect.top);
            rectangle4Path.lineTo(rectangle4Rect.right, rectangle4Rect.top);
            rectangle4Path.lineTo(rectangle4Rect.right, rectangle4Rect.bottom);
            rectangle4Path.lineTo(rectangle4Rect.left, rectangle4Rect.bottom);
            rectangle4Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor23);
            canvas.drawPath(rectangle4Path, paint);
            canvas.restore();
            
            // Bezier 16
            RectF bezier16Rect = CacheForWarrior.bezier16Rect;
            bezier16Rect.set(7.75f, 15.19f, 12.58f, 20.49f);
            Path bezier16Path = CacheForWarrior.bezier16Path;
            bezier16Path.reset();
            bezier16Path.moveTo(12.58f, 19.5f);
            bezier16Path.lineTo(11.06f, 16.2f);
            bezier16Path.cubicTo(11f, 16.08f, 10.92f, 15.98f, 10.82f, 15.9f);
            bezier16Path.cubicTo(10.7f, 15.8f, 10.55f, 15.72f, 10.38f, 15.68f);
            bezier16Path.cubicTo(9.87f, 15.55f, 8.74f, 15.22f, 8.13f, 15.2f);
            bezier16Path.cubicTo(7.97f, 15.19f, 7.84f, 15.26f, 7.75f, 15.37f);
            bezier16Path.lineTo(9.97f, 17.26f);
            bezier16Path.lineTo(11.6f, 20.49f);
            bezier16Path.lineTo(12.58f, 19.5f);
            bezier16Path.lineTo(12.58f, 19.5f);
            bezier16Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier16Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor42);
            canvas.drawPath(bezier16Path, paint);
            
            // Bezier 17
            RectF bezier17Rect = CacheForWarrior.bezier17Rect;
            bezier17Rect.set(7.65f, 15.37f, 11.6f, 21.59f);
            Path bezier17Path = CacheForWarrior.bezier17Path;
            bezier17Path.reset();
            bezier17Path.moveTo(9.97f, 17.26f);
            bezier17Path.lineTo(7.75f, 15.37f);
            bezier17Path.cubicTo(7.65f, 15.5f, 7.61f, 15.67f, 7.69f, 15.84f);
            bezier17Path.lineTo(10.33f, 21.36f);
            bezier17Path.cubicTo(10.37f, 21.44f, 10.43f, 21.52f, 10.5f, 21.59f);
            bezier17Path.lineTo(11.6f, 20.49f);
            bezier17Path.lineTo(9.97f, 17.26f);
            bezier17Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier17Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor);
            canvas.drawPath(bezier17Path, paint);
            
            // Bezier 18
            RectF bezier18Rect = CacheForWarrior.bezier18Rect;
            bezier18Rect.set(11.6f, 19.5f, 16.89f, 24.33f);
            Path bezier18Path = CacheForWarrior.bezier18Path;
            bezier18Path.reset();
            bezier18Path.moveTo(16.89f, 23.95f);
            bezier18Path.cubicTo(16.86f, 23.34f, 16.54f, 22.22f, 16.4f, 21.7f);
            bezier18Path.cubicTo(16.36f, 21.54f, 16.29f, 21.39f, 16.18f, 21.26f);
            bezier18Path.cubicTo(16.1f, 21.16f, 16.01f, 21.08f, 15.88f, 21.02f);
            bezier18Path.lineTo(12.59f, 19.5f);
            bezier18Path.lineTo(12.58f, 19.5f);
            bezier18Path.lineTo(11.6f, 20.49f);
            bezier18Path.lineTo(14.82f, 22.12f);
            bezier18Path.lineTo(16.72f, 24.33f);
            bezier18Path.cubicTo(16.83f, 24.25f, 16.9f, 24.11f, 16.89f, 23.95f);
            bezier18Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier18Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor22);
            canvas.drawPath(bezier18Path, paint);
            
            // Bezier 19
            RectF bezier19Rect = CacheForWarrior.bezier19Rect;
            bezier19Rect.set(10.5f, 20.49f, 16.72f, 24.43f);
            Path bezier19Path = CacheForWarrior.bezier19Path;
            bezier19Path.reset();
            bezier19Path.moveTo(14.82f, 22.12f);
            bezier19Path.lineTo(16.72f, 24.33f);
            bezier19Path.cubicTo(16.59f, 24.43f, 16.41f, 24.47f, 16.25f, 24.39f);
            bezier19Path.lineTo(10.73f, 21.75f);
            bezier19Path.cubicTo(10.65f, 21.71f, 10.57f, 21.65f, 10.5f, 21.58f);
            bezier19Path.lineTo(11.6f, 20.49f);
            bezier19Path.lineTo(14.82f, 22.12f);
            bezier19Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier19Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor23);
            canvas.drawPath(bezier19Path, paint);
            
            // Group 3
            {
                RectF group3 = CacheForWarrior.group3;
                group3.set(15.81f, 9.27f, 19.35f, 16.27f);
                canvas.save();
                
                // Clip
                Path clipPath = CacheForWarrior.clipPath;
                clipPath.reset();
                clipPath.moveTo(19.35f, 9.27f);
                clipPath.lineTo(15.81f, 12.98f);
                clipPath.lineTo(15.81f, 16.27f);
                clipPath.lineTo(19.35f, 12.73f);
                clipPath.lineTo(19.35f, 9.27f);
                clipPath.lineTo(19.35f, 9.27f);
                clipPath.close();
                canvas.clipPath(clipPath);
                
                // Bezier 20
                RectF bezier20Rect = CacheForWarrior.bezier20Rect;
                bezier20Rect.set(18.35f, 9f, 18.86f, 16.65f);
                Path bezier20Path = CacheForWarrior.bezier20Path;
                bezier20Path.reset();
                bezier20Path.moveTo(18.86f, 16.61f);
                bezier20Path.lineTo(18.35f, 16.65f);
                bezier20Path.cubicTo(18.35f, 16.65f, 18.35f, 11.56f, 18.35f, 9f);
                bezier20Path.lineTo(18.86f, 9f);
                bezier20Path.cubicTo(18.86f, 11.56f, 18.86f, 16.65f, 18.86f, 16.65f);
                bezier20Path.lineTo(18.86f, 16.61f);
                bezier20Path.close();
                
                paint.reset();
                paint.setFlags(Paint.ANTI_ALIAS_FLAG);
                paint.setStyle(Paint.Style.FILL);
                paint.setColor(fillColor42);
                canvas.drawPath(bezier20Path, paint);
                
                // Rectangle 5
                RectF rectangle5Rect = CacheForWarrior.rectangle5Rect;
                rectangle5Rect.set(15.8f, 9.88f, 17.3f, 17.02f);
                Path rectangle5Path = CacheForWarrior.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(fillColor42);
                canvas.drawPath(rectangle5Path, paint);
                
                canvas.restore();
            }
        }
        
        // Group 4
        if (lightBackground) {
            // Bezier 21
            RectF bezier21Rect = CacheForWarrior.bezier21Rect;
            bezier21Rect.set(7.65f, 15.19f, 16.89f, 24.43f);
            Path bezier21Path = CacheForWarrior.bezier21Path;
            bezier21Path.reset();
            bezier21Path.moveTo(12.58f, 19.5f);
            bezier21Path.lineTo(15.88f, 21.02f);
            bezier21Path.cubicTo(16.15f, 21.15f, 16.33f, 21.4f, 16.4f, 21.7f);
            bezier21Path.cubicTo(16.51f, 22.19f, 16.86f, 23.34f, 16.89f, 23.95f);
            bezier21Path.cubicTo(16.9f, 24.29f, 16.55f, 24.53f, 16.24f, 24.39f);
            bezier21Path.lineTo(10.73f, 21.75f);
            bezier21Path.cubicTo(10.56f, 21.66f, 10.42f, 21.52f, 10.33f, 21.35f);
            bezier21Path.lineTo(7.69f, 15.84f);
            bezier21Path.cubicTo(7.55f, 15.53f, 7.79f, 15.18f, 8.13f, 15.19f);
            bezier21Path.cubicTo(8.74f, 15.22f, 9.86f, 15.55f, 10.38f, 15.68f);
            bezier21Path.cubicTo(10.67f, 15.76f, 10.93f, 15.93f, 11.06f, 16.2f);
            bezier21Path.lineTo(12.58f, 19.5f);
            bezier21Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier21Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor);
            canvas.drawPath(bezier21Path, paint);
            
            // Bezier 22
            RectF bezier22Rect = CacheForWarrior.bezier22Rect;
            bezier22Rect.set(3.18f, 4.9f, 27.18f, 28.91f);
            Path bezier22Path = CacheForWarrior.bezier22Path;
            bezier22Path.reset();
            bezier22Path.moveTo(4.6f, 27.48f);
            bezier22Path.lineTo(6.02f, 28.91f);
            bezier22Path.lineTo(9.71f, 28.62f);
            bezier22Path.lineTo(9.9f, 26.19f);
            bezier22Path.lineTo(12.02f, 24.07f);
            bezier22Path.lineTo(15.88f, 25.91f);
            bezier22Path.lineTo(18.76f, 25.13f);
            bezier22Path.lineTo(17.55f, 19.93f);
            bezier22Path.lineTo(25.63f, 12.39f);
            bezier22Path.lineTo(27.18f, 4.91f);
            bezier22Path.lineTo(27.17f, 4.91f);
            bezier22Path.lineTo(27.18f, 4.91f);
            bezier22Path.lineTo(27.18f, 4.9f);
            bezier22Path.lineTo(19.7f, 6.45f);
            bezier22Path.lineTo(12.16f, 14.53f);
            bezier22Path.lineTo(6.95f, 13.32f);
            bezier22Path.lineTo(6.18f, 16.2f);
            bezier22Path.lineTo(8.01f, 20.06f);
            bezier22Path.lineTo(5.89f, 22.18f);
            bezier22Path.lineTo(3.47f, 22.37f);
            bezier22Path.lineTo(3.18f, 26.06f);
            bezier22Path.lineTo(4.6f, 27.48f);
            bezier22Path.lineTo(4.6f, 27.48f);
            bezier22Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier22Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor43);
            canvas.drawPath(bezier22Path, paint);
            
            // Rectangle 6
            canvas.save();
            canvas.translate(9f, 23.05f);
            currentTransformation.peek().postTranslate(9f, 23.05f);
            canvas.rotate(45f);
            currentTransformation.peek().postRotate(45f);
            RectF rectangle6Rect = CacheForWarrior.rectangle6Rect;
            rectangle6Rect.set(-1.3f, -3.23f, 1.3f, 3.23f);
            Path rectangle6Path = CacheForWarrior.rectangle6Path;
            rectangle6Path.reset();
            rectangle6Path.moveTo(rectangle6Rect.left, rectangle6Rect.top);
            rectangle6Path.lineTo(rectangle6Rect.right, rectangle6Rect.top);
            rectangle6Path.lineTo(rectangle6Rect.right, rectangle6Rect.bottom);
            rectangle6Path.lineTo(rectangle6Rect.left, rectangle6Rect.bottom);
            rectangle6Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor);
            canvas.drawPath(rectangle6Path, paint);
            canvas.restore();
            
            // Bezier 23
            RectF bezier23Rect = CacheForWarrior.bezier23Rect;
            bezier23Rect.set(4.76f, 23.66f, 8.42f, 27.32f);
            Path bezier23Path = CacheForWarrior.bezier23Path;
            bezier23Path.reset();
            bezier23Path.moveTo(4.76f, 25.47f);
            bezier23Path.lineTo(4.89f, 23.79f);
            bezier23Path.lineTo(6.58f, 23.66f);
            bezier23Path.lineTo(8.42f, 25.5f);
            bezier23Path.lineTo(8.29f, 27.19f);
            bezier23Path.lineTo(6.61f, 27.32f);
            bezier23Path.lineTo(4.76f, 25.47f);
            bezier23Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier23Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor);
            canvas.drawPath(bezier23Path, paint);
            
            // Bezier 24
            RectF bezier24Rect = CacheForWarrior.bezier24Rect;
            bezier24Rect.set(20.67f, 7.02f, 25.05f, 11.25f);
            Path bezier24Path = CacheForWarrior.bezier24Path;
            bezier24Path.reset();
            bezier24Path.moveTo(20.67f, 7.92f);
            bezier24Path.lineTo(20.83f, 11.25f);
            bezier24Path.lineTo(25.05f, 7.03f);
            bezier24Path.cubicTo(24.98f, 6.95f, 21.79f, 7.32f, 20.67f, 7.92f);
            bezier24Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier24Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor21);
            canvas.drawPath(bezier24Path, paint);
            
            // Bezier 25
            RectF bezier25Rect = CacheForWarrior.bezier25Rect;
            bezier25Rect.set(11.68f, 7.92f, 20.83f, 18.12f);
            Path bezier25Path = CacheForWarrior.bezier25Path;
            bezier25Path.reset();
            bezier25Path.moveTo(20.6f, 7.96f);
            bezier25Path.lineTo(11.68f, 17.32f);
            bezier25Path.lineTo(13.96f, 18.12f);
            bezier25Path.lineTo(20.83f, 11.25f);
            bezier25Path.lineTo(20.67f, 7.92f);
            bezier25Path.cubicTo(20.65f, 7.93f, 20.6f, 7.96f, 20.6f, 7.96f);
            bezier25Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier25Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor22);
            canvas.drawPath(bezier25Path, paint);
            
            // Bezier 26
            RectF bezier26Rect = CacheForWarrior.bezier26Rect;
            bezier26Rect.set(11.6f, 17.32f, 13.96f, 19.51f);
            Path bezier26Path = CacheForWarrior.bezier26Path;
            bezier26Path.reset();
            bezier26Path.moveTo(11.68f, 17.32f);
            bezier26Path.cubicTo(11.65f, 17.34f, 11.62f, 17.37f, 11.6f, 17.4f);
            bezier26Path.lineTo(12.57f, 19.51f);
            bezier26Path.lineTo(13.96f, 18.12f);
            bezier26Path.lineTo(11.68f, 17.32f);
            bezier26Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier26Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor22);
            canvas.drawPath(bezier26Path, paint);
            
            // Bezier 27
            RectF bezier27Rect = CacheForWarrior.bezier27Rect;
            bezier27Rect.set(20.83f, 7.03f, 25.06f, 11.41f);
            Path bezier27Path = CacheForWarrior.bezier27Path;
            bezier27Path.reset();
            bezier27Path.moveTo(24.16f, 11.41f);
            bezier27Path.lineTo(20.83f, 11.25f);
            bezier27Path.lineTo(25.05f, 7.03f);
            bezier27Path.cubicTo(25.13f, 7.1f, 24.76f, 10.29f, 24.16f, 11.41f);
            bezier27Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier27Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor22);
            canvas.drawPath(bezier27Path, paint);
            
            // Bezier 28
            RectF bezier28Rect = CacheForWarrior.bezier28Rect;
            bezier28Rect.set(13.96f, 11.25f, 24.16f, 20.4f);
            Path bezier28Path = CacheForWarrior.bezier28Path;
            bezier28Path.reset();
            bezier28Path.moveTo(24.12f, 11.48f);
            bezier28Path.lineTo(14.76f, 20.4f);
            bezier28Path.lineTo(13.96f, 18.12f);
            bezier28Path.lineTo(20.83f, 11.25f);
            bezier28Path.lineTo(24.16f, 11.41f);
            bezier28Path.cubicTo(24.14f, 11.43f, 24.12f, 11.48f, 24.12f, 11.48f);
            bezier28Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier28Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor23);
            canvas.drawPath(bezier28Path, paint);
            
            // Bezier 29
            RectF bezier29Rect = CacheForWarrior.bezier29Rect;
            bezier29Rect.set(12.57f, 18.12f, 14.76f, 20.48f);
            Path bezier29Path = CacheForWarrior.bezier29Path;
            bezier29Path.reset();
            bezier29Path.moveTo(14.76f, 20.4f);
            bezier29Path.cubicTo(14.73f, 20.43f, 14.7f, 20.46f, 14.68f, 20.48f);
            bezier29Path.lineTo(12.57f, 19.51f);
            bezier29Path.lineTo(13.96f, 18.12f);
            bezier29Path.lineTo(14.76f, 20.4f);
            bezier29Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier29Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor23);
            canvas.drawPath(bezier29Path, paint);
            
            // Bezier 30
            RectF bezier30Rect = CacheForWarrior.bezier30Rect;
            bezier30Rect.set(4.89f, 23.66f, 6.58f, 25.09f);
            Path bezier30Path = CacheForWarrior.bezier30Path;
            bezier30Path.reset();
            bezier30Path.moveTo(6.58f, 23.66f);
            bezier30Path.lineTo(6.19f, 25.09f);
            bezier30Path.lineTo(4.89f, 23.79f);
            bezier30Path.lineTo(6.58f, 23.66f);
            bezier30Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier30Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor21);
            canvas.drawPath(bezier30Path, paint);
            
            // Bezier 31
            RectF bezier31Rect = CacheForWarrior.bezier31Rect;
            bezier31Rect.set(6.99f, 25.5f, 8.42f, 27.19f);
            Path bezier31Path = CacheForWarrior.bezier31Path;
            bezier31Path.reset();
            bezier31Path.moveTo(8.42f, 25.5f);
            bezier31Path.lineTo(6.99f, 25.89f);
            bezier31Path.lineTo(8.29f, 27.19f);
            bezier31Path.lineTo(8.42f, 25.5f);
            bezier31Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier31Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor21);
            canvas.drawPath(bezier31Path, paint);
            
            // Bezier 32
            RectF bezier32Rect = CacheForWarrior.bezier32Rect;
            bezier32Rect.set(6.19f, 23.66f, 8.42f, 25.89f);
            Path bezier32Path = CacheForWarrior.bezier32Path;
            bezier32Path.reset();
            bezier32Path.moveTo(6.58f, 23.66f);
            bezier32Path.lineTo(8.42f, 25.5f);
            bezier32Path.lineTo(6.99f, 25.89f);
            bezier32Path.lineTo(6.19f, 25.09f);
            bezier32Path.lineTo(6.58f, 23.66f);
            bezier32Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier32Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor21);
            canvas.drawPath(bezier32Path, paint);
            
            // Bezier 33
            RectF bezier33Rect = CacheForWarrior.bezier33Rect;
            bezier33Rect.set(4.76f, 23.79f, 6.19f, 25.48f);
            Path bezier33Path = CacheForWarrior.bezier33Path;
            bezier33Path.reset();
            bezier33Path.moveTo(4.76f, 25.48f);
            bezier33Path.lineTo(6.19f, 25.09f);
            bezier33Path.lineTo(4.89f, 23.79f);
            bezier33Path.lineTo(4.76f, 25.48f);
            bezier33Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier33Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor22);
            canvas.drawPath(bezier33Path, paint);
            
            // Bezier 34
            RectF bezier34Rect = CacheForWarrior.bezier34Rect;
            bezier34Rect.set(6.6f, 25.89f, 8.29f, 27.32f);
            Path bezier34Path = CacheForWarrior.bezier34Path;
            bezier34Path.reset();
            bezier34Path.moveTo(6.6f, 27.32f);
            bezier34Path.lineTo(6.99f, 25.89f);
            bezier34Path.lineTo(8.29f, 27.19f);
            bezier34Path.lineTo(6.6f, 27.32f);
            bezier34Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier34Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor22);
            canvas.drawPath(bezier34Path, paint);
            
            // Bezier 35
            RectF bezier35Rect = CacheForWarrior.bezier35Rect;
            bezier35Rect.set(4.76f, 25.09f, 6.99f, 27.32f);
            Path bezier35Path = CacheForWarrior.bezier35Path;
            bezier35Path.reset();
            bezier35Path.moveTo(4.76f, 25.48f);
            bezier35Path.lineTo(6.61f, 27.32f);
            bezier35Path.lineTo(6.99f, 25.89f);
            bezier35Path.lineTo(6.19f, 25.09f);
            bezier35Path.lineTo(4.76f, 25.48f);
            bezier35Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier35Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor22);
            canvas.drawPath(bezier35Path, paint);
            
            // Rectangle 7
            canvas.save();
            canvas.translate(10.3f, 21.8f);
            currentTransformation.peek().postTranslate(10.3f, 21.8f);
            canvas.rotate(45f);
            currentTransformation.peek().postRotate(45f);
            RectF rectangle7Rect = CacheForWarrior.rectangle7Rect;
            rectangle7Rect.set(-1.3f, -0.8f, 1.3f, 0.8f);
            Path rectangle7Path = CacheForWarrior.rectangle7Path;
            rectangle7Path.reset();
            rectangle7Path.moveTo(rectangle7Rect.left, rectangle7Rect.top);
            rectangle7Path.lineTo(rectangle7Rect.right, rectangle7Rect.top);
            rectangle7Path.lineTo(rectangle7Rect.right, rectangle7Rect.bottom);
            rectangle7Path.lineTo(rectangle7Rect.left, rectangle7Rect.bottom);
            rectangle7Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor23);
            canvas.drawPath(rectangle7Path, paint);
            canvas.restore();
            
            // Rectangle 8
            canvas.save();
            canvas.translate(9.15f, 22.9f);
            currentTransformation.peek().postTranslate(9.15f, 22.9f);
            canvas.rotate(45f);
            currentTransformation.peek().postRotate(45f);
            RectF rectangle8Rect = CacheForWarrior.rectangle8Rect;
            rectangle8Rect.set(-1.3f, -0.8f, 1.3f, 0.8f);
            Path rectangle8Path = CacheForWarrior.rectangle8Path;
            rectangle8Path.reset();
            rectangle8Path.moveTo(rectangle8Rect.left, rectangle8Rect.top);
            rectangle8Path.lineTo(rectangle8Rect.right, rectangle8Rect.top);
            rectangle8Path.lineTo(rectangle8Rect.right, rectangle8Rect.bottom);
            rectangle8Path.lineTo(rectangle8Rect.left, rectangle8Rect.bottom);
            rectangle8Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor);
            canvas.drawPath(rectangle8Path, paint);
            canvas.restore();
            
            // Rectangle 9
            canvas.save();
            canvas.translate(8.05f, 24f);
            currentTransformation.peek().postTranslate(8.05f, 24f);
            canvas.rotate(45f);
            currentTransformation.peek().postRotate(45f);
            RectF rectangle9Rect = CacheForWarrior.rectangle9Rect;
            rectangle9Rect.set(-1.3f, -0.8f, 1.3f, 0.8f);
            Path rectangle9Path = CacheForWarrior.rectangle9Path;
            rectangle9Path.reset();
            rectangle9Path.moveTo(rectangle9Rect.left, rectangle9Rect.top);
            rectangle9Path.lineTo(rectangle9Rect.right, rectangle9Rect.top);
            rectangle9Path.lineTo(rectangle9Rect.right, rectangle9Rect.bottom);
            rectangle9Path.lineTo(rectangle9Rect.left, rectangle9Rect.bottom);
            rectangle9Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor23);
            canvas.drawPath(rectangle9Path, paint);
            canvas.restore();
            
            // Bezier 36
            RectF bezier36Rect = CacheForWarrior.bezier36Rect;
            bezier36Rect.set(7.75f, 15.19f, 12.58f, 20.49f);
            Path bezier36Path = CacheForWarrior.bezier36Path;
            bezier36Path.reset();
            bezier36Path.moveTo(12.58f, 19.5f);
            bezier36Path.lineTo(11.06f, 16.2f);
            bezier36Path.cubicTo(11f, 16.08f, 10.92f, 15.98f, 10.82f, 15.9f);
            bezier36Path.cubicTo(10.7f, 15.8f, 10.55f, 15.72f, 10.38f, 15.68f);
            bezier36Path.cubicTo(9.87f, 15.55f, 8.74f, 15.22f, 8.13f, 15.2f);
            bezier36Path.cubicTo(7.97f, 15.19f, 7.84f, 15.26f, 7.75f, 15.37f);
            bezier36Path.lineTo(9.97f, 17.26f);
            bezier36Path.lineTo(11.6f, 20.49f);
            bezier36Path.lineTo(12.58f, 19.5f);
            bezier36Path.lineTo(12.58f, 19.5f);
            bezier36Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier36Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor21);
            canvas.drawPath(bezier36Path, paint);
            
            // Bezier 37
            RectF bezier37Rect = CacheForWarrior.bezier37Rect;
            bezier37Rect.set(7.65f, 15.37f, 11.6f, 21.59f);
            Path bezier37Path = CacheForWarrior.bezier37Path;
            bezier37Path.reset();
            bezier37Path.moveTo(9.97f, 17.26f);
            bezier37Path.lineTo(7.75f, 15.37f);
            bezier37Path.cubicTo(7.65f, 15.5f, 7.61f, 15.67f, 7.69f, 15.84f);
            bezier37Path.lineTo(10.33f, 21.36f);
            bezier37Path.cubicTo(10.37f, 21.44f, 10.43f, 21.52f, 10.5f, 21.59f);
            bezier37Path.lineTo(11.6f, 20.49f);
            bezier37Path.lineTo(9.97f, 17.26f);
            bezier37Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier37Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor);
            canvas.drawPath(bezier37Path, paint);
            
            // Bezier 38
            RectF bezier38Rect = CacheForWarrior.bezier38Rect;
            bezier38Rect.set(11.6f, 19.5f, 16.89f, 24.33f);
            Path bezier38Path = CacheForWarrior.bezier38Path;
            bezier38Path.reset();
            bezier38Path.moveTo(16.89f, 23.95f);
            bezier38Path.cubicTo(16.86f, 23.34f, 16.54f, 22.22f, 16.4f, 21.7f);
            bezier38Path.cubicTo(16.36f, 21.54f, 16.29f, 21.39f, 16.18f, 21.26f);
            bezier38Path.cubicTo(16.1f, 21.16f, 16.01f, 21.08f, 15.88f, 21.02f);
            bezier38Path.lineTo(12.59f, 19.5f);
            bezier38Path.lineTo(12.58f, 19.5f);
            bezier38Path.lineTo(11.6f, 20.49f);
            bezier38Path.lineTo(14.82f, 22.12f);
            bezier38Path.lineTo(16.72f, 24.33f);
            bezier38Path.cubicTo(16.83f, 24.25f, 16.9f, 24.11f, 16.89f, 23.95f);
            bezier38Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier38Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor22);
            canvas.drawPath(bezier38Path, paint);
            
            // Bezier 39
            RectF bezier39Rect = CacheForWarrior.bezier39Rect;
            bezier39Rect.set(10.5f, 20.49f, 16.72f, 24.43f);
            Path bezier39Path = CacheForWarrior.bezier39Path;
            bezier39Path.reset();
            bezier39Path.moveTo(14.82f, 22.12f);
            bezier39Path.lineTo(16.72f, 24.33f);
            bezier39Path.cubicTo(16.59f, 24.43f, 16.41f, 24.47f, 16.25f, 24.39f);
            bezier39Path.lineTo(10.73f, 21.75f);
            bezier39Path.cubicTo(10.65f, 21.71f, 10.57f, 21.65f, 10.5f, 21.58f);
            bezier39Path.lineTo(11.6f, 20.49f);
            bezier39Path.lineTo(14.82f, 22.12f);
            bezier39Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier39Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor23);
            canvas.drawPath(bezier39Path, paint);
            
            // Group 5
            {
                RectF group5 = CacheForWarrior.group5;
                group5.set(15.81f, 9.27f, 19.35f, 16.27f);
                canvas.save();
                
                // Clip 2
                Path clip2Path = CacheForWarrior.clip2Path;
                clip2Path.reset();
                clip2Path.moveTo(19.35f, 9.27f);
                clip2Path.lineTo(15.81f, 12.98f);
                clip2Path.lineTo(15.81f, 16.27f);
                clip2Path.lineTo(19.35f, 12.73f);
                clip2Path.lineTo(19.35f, 9.27f);
                clip2Path.lineTo(19.35f, 9.27f);
                clip2Path.close();
                canvas.clipPath(clip2Path);
                
                // Bezier 40
                RectF bezier40Rect = CacheForWarrior.bezier40Rect;
                bezier40Rect.set(18.35f, 9f, 18.86f, 16.65f);
                Path bezier40Path = CacheForWarrior.bezier40Path;
                bezier40Path.reset();
                bezier40Path.moveTo(18.86f, 16.61f);
                bezier40Path.lineTo(18.35f, 16.65f);
                bezier40Path.cubicTo(18.35f, 16.65f, 18.35f, 11.56f, 18.35f, 9f);
                bezier40Path.lineTo(18.86f, 9f);
                bezier40Path.cubicTo(18.86f, 11.56f, 18.86f, 16.65f, 18.86f, 16.65f);
                bezier40Path.lineTo(18.86f, 16.61f);
                bezier40Path.close();
                
                paint.reset();
                paint.setFlags(Paint.ANTI_ALIAS_FLAG);
                paint.setStyle(Paint.Style.FILL);
                paint.setColor(fillColor21);
                canvas.drawPath(bezier40Path, paint);
                
                // Rectangle 10
                RectF rectangle10Rect = CacheForWarrior.rectangle10Rect;
                rectangle10Rect.set(15.8f, 9.88f, 17.3f, 17.02f);
                Path rectangle10Path = CacheForWarrior.rectangle10Path;
                rectangle10Path.reset();
                rectangle10Path.moveTo(rectangle10Rect.left, rectangle10Rect.top);
                rectangle10Path.lineTo(rectangle10Rect.right, rectangle10Rect.top);
                rectangle10Path.lineTo(rectangle10Rect.right, rectangle10Rect.bottom);
                rectangle10Path.lineTo(rectangle10Rect.left, rectangle10Rect.bottom);
                rectangle10Path.close();
                
                paint.reset();
                paint.setFlags(Paint.ANTI_ALIAS_FLAG);
                paint.setStyle(Paint.Style.FILL);
                paint.setColor(fillColor21);
                canvas.drawPath(rectangle10Path, paint);
                
                canvas.restore();
            }
        }
        
        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 _3StarDifficulty = difficulty >= 3f ? 1f : (difficulty >= 2.5f ? 0.5f : 0f);
        float _4StarDifficulty = difficulty >= 4f ? 1f : (difficulty >= 3.5f ? 0.5f : 0f);
        float _2StarDifficulty = difficulty >= 2f ? 1f : (difficulty >= 1.5f ? 0.5f : 0f);
        float _1StarDifficulty = difficulty >= 1f ? 1f : (difficulty >= 0.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 fillColor24 = Color.argb(255, 255, 166, 36);
        int fillColor25 = Color.argb(255, 225, 224, 227);
        
        // 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();
    }
    
    public static void drawStarSmall(Canvas canvas) {
        HabiticaIcons.drawStarSmall(canvas, new RectF(0f, 0f, 9f, 9f), ResizingBehavior.AspectFit);
    }
    
    public static void drawStarSmall(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForStarSmall.paint;
        
        // Local Colors
        int fillColor27 = Color.argb(255, 229, 220, 255);
        int fillColor26 = Color.argb(102, 229, 220, 255);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForStarSmall.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForStarSmall.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 9f, resizedFrame.height() / 9f);
        
        // Rectangle
        RectF rectangleRect = CacheForStarSmall.rectangleRect;
        rectangleRect.set(3f, 0f, 6f, 3f);
        Path rectanglePath = CacheForStarSmall.rectanglePath;
        rectanglePath.reset();
        rectanglePath.addRect(rectangleRect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor26);
        canvas.drawPath(rectanglePath, paint);
        
        // Rectangle 2
        RectF rectangle2Rect = CacheForStarSmall.rectangle2Rect;
        rectangle2Rect.set(6f, 3f, 9f, 6f);
        Path rectangle2Path = CacheForStarSmall.rectangle2Path;
        rectangle2Path.reset();
        rectangle2Path.addRect(rectangle2Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor26);
        canvas.drawPath(rectangle2Path, paint);
        
        // Rectangle 3
        RectF rectangle3Rect = CacheForStarSmall.rectangle3Rect;
        rectangle3Rect.set(0f, 3f, 3f, 6f);
        Path rectangle3Path = CacheForStarSmall.rectangle3Path;
        rectangle3Path.reset();
        rectangle3Path.addRect(rectangle3Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor26);
        canvas.drawPath(rectangle3Path, paint);
        
        // Rectangle 4
        RectF rectangle4Rect = CacheForStarSmall.rectangle4Rect;
        rectangle4Rect.set(3f, 6f, 6f, 9f);
        Path rectangle4Path = CacheForStarSmall.rectangle4Path;
        rectangle4Path.reset();
        rectangle4Path.addRect(rectangle4Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor26);
        canvas.drawPath(rectangle4Path, paint);
        
        // Rectangle 5
        RectF rectangle5Rect = CacheForStarSmall.rectangle5Rect;
        rectangle5Rect.set(3f, 3f, 6f, 6f);
        Path rectangle5Path = CacheForStarSmall.rectangle5Path;
        rectangle5Path.reset();
        rectangle5Path.addRect(rectangle5Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor27);
        canvas.drawPath(rectangle5Path, paint);
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawStarLarge(Canvas canvas) {
        HabiticaIcons.drawStarLarge(canvas, new RectF(0f, 0f, 27f, 27f), ResizingBehavior.AspectFit);
    }
    
    public static void drawStarLarge(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForStarLarge.paint;
        
        // Local Colors
        int fillColor28 = Color.argb(64, 229, 220, 255);
        int fillColor31 = Color.argb(191, 229, 220, 255);
        int fillColor30 = Color.argb(166, 229, 220, 255);
        int fillColor29 = Color.argb(128, 229, 220, 255);
        int fillColor27 = Color.argb(255, 229, 220, 255);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForStarLarge.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForStarLarge.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 27f, resizedFrame.height() / 27f);
        
        // Bezier
        RectF bezierRect = CacheForStarLarge.bezierRect;
        bezierRect.set(9f, 9f, 18f, 18f);
        Path bezierPath = CacheForStarLarge.bezierPath;
        bezierPath.reset();
        bezierPath.moveTo(9f, 12f);
        bezierPath.lineTo(12f, 12f);
        bezierPath.lineTo(12f, 9f);
        bezierPath.lineTo(15f, 9f);
        bezierPath.lineTo(15f, 12f);
        bezierPath.lineTo(18f, 12f);
        bezierPath.lineTo(18f, 15f);
        bezierPath.lineTo(15f, 15f);
        bezierPath.lineTo(15f, 18f);
        bezierPath.lineTo(12f, 18f);
        bezierPath.lineTo(12f, 15f);
        bezierPath.lineTo(9f, 15f);
        bezierPath.lineTo(9f, 12f);
        bezierPath.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezierPath.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor27);
        canvas.drawPath(bezierPath, paint);
        
        // Rectangle
        RectF rectangleRect = CacheForStarLarge.rectangleRect;
        rectangleRect.set(9f, 6f, 12f, 9f);
        Path rectanglePath = CacheForStarLarge.rectanglePath;
        rectanglePath.reset();
        rectanglePath.addRect(rectangleRect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor28);
        canvas.drawPath(rectanglePath, paint);
        
        // Rectangle 2
        RectF rectangle2Rect = CacheForStarLarge.rectangle2Rect;
        rectangle2Rect.set(12f, 0f, 15f, 3f);
        Path rectangle2Path = CacheForStarLarge.rectangle2Path;
        rectangle2Path.reset();
        rectangle2Path.addRect(rectangle2Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor28);
        canvas.drawPath(rectangle2Path, paint);
        
        // Rectangle 3
        RectF rectangle3Rect = CacheForStarLarge.rectangle3Rect;
        rectangle3Rect.set(12f, 3f, 15f, 6f);
        Path rectangle3Path = CacheForStarLarge.rectangle3Path;
        rectangle3Path.reset();
        rectangle3Path.addRect(rectangle3Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor29);
        canvas.drawPath(rectangle3Path, paint);
        
        // Rectangle 4
        RectF rectangle4Rect = CacheForStarLarge.rectangle4Rect;
        rectangle4Rect.set(21f, 12f, 24f, 15f);
        Path rectangle4Path = CacheForStarLarge.rectangle4Path;
        rectangle4Path.reset();
        rectangle4Path.addRect(rectangle4Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor29);
        canvas.drawPath(rectangle4Path, paint);
        
        // Rectangle 5
        RectF rectangle5Rect = CacheForStarLarge.rectangle5Rect;
        rectangle5Rect.set(3f, 12f, 6f, 15f);
        Path rectangle5Path = CacheForStarLarge.rectangle5Path;
        rectangle5Path.reset();
        rectangle5Path.addRect(rectangle5Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor29);
        canvas.drawPath(rectangle5Path, paint);
        
        // Rectangle 6
        RectF rectangle6Rect = CacheForStarLarge.rectangle6Rect;
        rectangle6Rect.set(12f, 21f, 15f, 24f);
        Path rectangle6Path = CacheForStarLarge.rectangle6Path;
        rectangle6Path.reset();
        rectangle6Path.addRect(rectangle6Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor29);
        canvas.drawPath(rectangle6Path, paint);
        
        // Rectangle 7
        RectF rectangle7Rect = CacheForStarLarge.rectangle7Rect;
        rectangle7Rect.set(9f, 15f, 12f, 18f);
        Path rectangle7Path = CacheForStarLarge.rectangle7Path;
        rectangle7Path.reset();
        rectangle7Path.addRect(rectangle7Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor30);
        canvas.drawPath(rectangle7Path, paint);
        
        // Rectangle 8
        RectF rectangle8Rect = CacheForStarLarge.rectangle8Rect;
        rectangle8Rect.set(15f, 15f, 18f, 18f);
        Path rectangle8Path = CacheForStarLarge.rectangle8Path;
        rectangle8Path.reset();
        rectangle8Path.addRect(rectangle8Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor30);
        canvas.drawPath(rectangle8Path, paint);
        
        // Rectangle 9
        RectF rectangle9Rect = CacheForStarLarge.rectangle9Rect;
        rectangle9Rect.set(15f, 9f, 18f, 12f);
        Path rectangle9Path = CacheForStarLarge.rectangle9Path;
        rectangle9Path.reset();
        rectangle9Path.addRect(rectangle9Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor30);
        canvas.drawPath(rectangle9Path, paint);
        
        // Rectangle 10
        RectF rectangle10Rect = CacheForStarLarge.rectangle10Rect;
        rectangle10Rect.set(9f, 9f, 12f, 12f);
        Path rectangle10Path = CacheForStarLarge.rectangle10Path;
        rectangle10Path.reset();
        rectangle10Path.addRect(rectangle10Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor30);
        canvas.drawPath(rectangle10Path, paint);
        
        // Rectangle 11
        RectF rectangle11Rect = CacheForStarLarge.rectangle11Rect;
        rectangle11Rect.set(12f, 18f, 15f, 21f);
        Path rectangle11Path = CacheForStarLarge.rectangle11Path;
        rectangle11Path.reset();
        rectangle11Path.addRect(rectangle11Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor31);
        canvas.drawPath(rectangle11Path, paint);
        
        // Rectangle 12
        RectF rectangle12Rect = CacheForStarLarge.rectangle12Rect;
        rectangle12Rect.set(6f, 12f, 9f, 15f);
        Path rectangle12Path = CacheForStarLarge.rectangle12Path;
        rectangle12Path.reset();
        rectangle12Path.addRect(rectangle12Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor31);
        canvas.drawPath(rectangle12Path, paint);
        
        // Rectangle 13
        RectF rectangle13Rect = CacheForStarLarge.rectangle13Rect;
        rectangle13Rect.set(12f, 6f, 15f, 9f);
        Path rectangle13Path = CacheForStarLarge.rectangle13Path;
        rectangle13Path.reset();
        rectangle13Path.addRect(rectangle13Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor31);
        canvas.drawPath(rectangle13Path, paint);
        
        // Rectangle 14
        RectF rectangle14Rect = CacheForStarLarge.rectangle14Rect;
        rectangle14Rect.set(18f, 12f, 21f, 15f);
        Path rectangle14Path = CacheForStarLarge.rectangle14Path;
        rectangle14Path.reset();
        rectangle14Path.addRect(rectangle14Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor31);
        canvas.drawPath(rectangle14Path, paint);
        
        // Rectangle 15
        RectF rectangle15Rect = CacheForStarLarge.rectangle15Rect;
        rectangle15Rect.set(9f, 18f, 12f, 21f);
        Path rectangle15Path = CacheForStarLarge.rectangle15Path;
        rectangle15Path.reset();
        rectangle15Path.addRect(rectangle15Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor28);
        canvas.drawPath(rectangle15Path, paint);
        
        // Rectangle 16
        RectF rectangle16Rect = CacheForStarLarge.rectangle16Rect;
        rectangle16Rect.set(15f, 18f, 18f, 21f);
        Path rectangle16Path = CacheForStarLarge.rectangle16Path;
        rectangle16Path.reset();
        rectangle16Path.addRect(rectangle16Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor28);
        canvas.drawPath(rectangle16Path, paint);
        
        // Rectangle 17
        RectF rectangle17Rect = CacheForStarLarge.rectangle17Rect;
        rectangle17Rect.set(12f, 24f, 15f, 27f);
        Path rectangle17Path = CacheForStarLarge.rectangle17Path;
        rectangle17Path.reset();
        rectangle17Path.addRect(rectangle17Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor28);
        canvas.drawPath(rectangle17Path, paint);
        
        // Rectangle 18
        RectF rectangle18Rect = CacheForStarLarge.rectangle18Rect;
        rectangle18Rect.set(15f, 6f, 18f, 9f);
        Path rectangle18Path = CacheForStarLarge.rectangle18Path;
        rectangle18Path.reset();
        rectangle18Path.addRect(rectangle18Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor28);
        canvas.drawPath(rectangle18Path, paint);
        
        // Rectangle 19
        RectF rectangle19Rect = CacheForStarLarge.rectangle19Rect;
        rectangle19Rect.set(6f, 9f, 9f, 12f);
        Path rectangle19Path = CacheForStarLarge.rectangle19Path;
        rectangle19Path.reset();
        rectangle19Path.addRect(rectangle19Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor28);
        canvas.drawPath(rectangle19Path, paint);
        
        // Rectangle 20
        RectF rectangle20Rect = CacheForStarLarge.rectangle20Rect;
        rectangle20Rect.set(6f, 15f, 9f, 18f);
        Path rectangle20Path = CacheForStarLarge.rectangle20Path;
        rectangle20Path.reset();
        rectangle20Path.addRect(rectangle20Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor28);
        canvas.drawPath(rectangle20Path, paint);
        
        // Rectangle 21
        RectF rectangle21Rect = CacheForStarLarge.rectangle21Rect;
        rectangle21Rect.set(0f, 12f, 3f, 15f);
        Path rectangle21Path = CacheForStarLarge.rectangle21Path;
        rectangle21Path.reset();
        rectangle21Path.addRect(rectangle21Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor28);
        canvas.drawPath(rectangle21Path, paint);
        
        // Rectangle 22
        RectF rectangle22Rect = CacheForStarLarge.rectangle22Rect;
        rectangle22Rect.set(18f, 15f, 21f, 18f);
        Path rectangle22Path = CacheForStarLarge.rectangle22Path;
        rectangle22Path.reset();
        rectangle22Path.addRect(rectangle22Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor28);
        canvas.drawPath(rectangle22Path, paint);
        
        // Rectangle 23
        RectF rectangle23Rect = CacheForStarLarge.rectangle23Rect;
        rectangle23Rect.set(24f, 12f, 27f, 15f);
        Path rectangle23Path = CacheForStarLarge.rectangle23Path;
        rectangle23Path.reset();
        rectangle23Path.addRect(rectangle23Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor28);
        canvas.drawPath(rectangle23Path, paint);
        
        // Rectangle 24
        RectF rectangle24Rect = CacheForStarLarge.rectangle24Rect;
        rectangle24Rect.set(18f, 9f, 21f, 12f);
        Path rectangle24Path = CacheForStarLarge.rectangle24Path;
        rectangle24Path.reset();
        rectangle24Path.addRect(rectangle24Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor28);
        canvas.drawPath(rectangle24Path, paint);
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawStarMedium(Canvas canvas) {
        HabiticaIcons.drawStarMedium(canvas, new RectF(0f, 0f, 21f, 21f), ResizingBehavior.AspectFit);
    }
    
    public static void drawStarMedium(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForStarMedium.paint;
        
        // Local Colors
        int fillColor27 = Color.argb(255, 229, 220, 255);
        int fillColor34 = Color.argb(38, 229, 220, 255);
        int fillColor33 = Color.argb(77, 229, 220, 255);
        int fillColor32 = Color.argb(153, 229, 220, 255);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForStarMedium.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForStarMedium.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 21f, resizedFrame.height() / 21f);
        
        // Rectangle
        RectF rectangleRect = CacheForStarMedium.rectangleRect;
        rectangleRect.set(9f, 6f, 12f, 9f);
        Path rectanglePath = CacheForStarMedium.rectanglePath;
        rectanglePath.reset();
        rectanglePath.addRect(rectangleRect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor32);
        canvas.drawPath(rectanglePath, paint);
        
        // Rectangle 2
        RectF rectangle2Rect = CacheForStarMedium.rectangle2Rect;
        rectangle2Rect.set(12f, 9f, 15f, 12f);
        Path rectangle2Path = CacheForStarMedium.rectangle2Path;
        rectangle2Path.reset();
        rectangle2Path.addRect(rectangle2Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor32);
        canvas.drawPath(rectangle2Path, paint);
        
        // Rectangle 3
        RectF rectangle3Rect = CacheForStarMedium.rectangle3Rect;
        rectangle3Rect.set(6f, 9f, 9f, 12f);
        Path rectangle3Path = CacheForStarMedium.rectangle3Path;
        rectangle3Path.reset();
        rectangle3Path.addRect(rectangle3Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor32);
        canvas.drawPath(rectangle3Path, paint);
        
        // Rectangle 4
        RectF rectangle4Rect = CacheForStarMedium.rectangle4Rect;
        rectangle4Rect.set(9f, 12f, 12f, 15f);
        Path rectangle4Path = CacheForStarMedium.rectangle4Path;
        rectangle4Path.reset();
        rectangle4Path.addRect(rectangle4Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor32);
        canvas.drawPath(rectangle4Path, paint);
        
        // Rectangle 5
        RectF rectangle5Rect = CacheForStarMedium.rectangle5Rect;
        rectangle5Rect.set(9f, 15f, 12f, 18f);
        Path rectangle5Path = CacheForStarMedium.rectangle5Path;
        rectangle5Path.reset();
        rectangle5Path.addRect(rectangle5Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor33);
        canvas.drawPath(rectangle5Path, paint);
        
        // Rectangle 6
        RectF rectangle6Rect = CacheForStarMedium.rectangle6Rect;
        rectangle6Rect.set(6f, 12f, 9f, 15f);
        Path rectangle6Path = CacheForStarMedium.rectangle6Path;
        rectangle6Path.reset();
        rectangle6Path.addRect(rectangle6Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor33);
        canvas.drawPath(rectangle6Path, paint);
        
        // Rectangle 7
        RectF rectangle7Rect = CacheForStarMedium.rectangle7Rect;
        rectangle7Rect.set(6f, 6f, 9f, 9f);
        Path rectangle7Path = CacheForStarMedium.rectangle7Path;
        rectangle7Path.reset();
        rectangle7Path.addRect(rectangle7Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor33);
        canvas.drawPath(rectangle7Path, paint);
        
        // Rectangle 8
        RectF rectangle8Rect = CacheForStarMedium.rectangle8Rect;
        rectangle8Rect.set(12f, 6f, 15f, 9f);
        Path rectangle8Path = CacheForStarMedium.rectangle8Path;
        rectangle8Path.reset();
        rectangle8Path.addRect(rectangle8Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor33);
        canvas.drawPath(rectangle8Path, paint);
        
        // Rectangle 9
        RectF rectangle9Rect = CacheForStarMedium.rectangle9Rect;
        rectangle9Rect.set(12f, 12f, 15f, 15f);
        Path rectangle9Path = CacheForStarMedium.rectangle9Path;
        rectangle9Path.reset();
        rectangle9Path.addRect(rectangle9Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor33);
        canvas.drawPath(rectangle9Path, paint);
        
        // Rectangle 10
        RectF rectangle10Rect = CacheForStarMedium.rectangle10Rect;
        rectangle10Rect.set(9f, 3f, 12f, 6f);
        Path rectangle10Path = CacheForStarMedium.rectangle10Path;
        rectangle10Path.reset();
        rectangle10Path.addRect(rectangle10Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor33);
        canvas.drawPath(rectangle10Path, paint);
        
        // Rectangle 11
        RectF rectangle11Rect = CacheForStarMedium.rectangle11Rect;
        rectangle11Rect.set(15f, 9f, 18f, 12f);
        Path rectangle11Path = CacheForStarMedium.rectangle11Path;
        rectangle11Path.reset();
        rectangle11Path.addRect(rectangle11Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor33);
        canvas.drawPath(rectangle11Path, paint);
        
        // Rectangle 12
        RectF rectangle12Rect = CacheForStarMedium.rectangle12Rect;
        rectangle12Rect.set(3f, 9f, 6f, 12f);
        Path rectangle12Path = CacheForStarMedium.rectangle12Path;
        rectangle12Path.reset();
        rectangle12Path.addRect(rectangle12Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor33);
        canvas.drawPath(rectangle12Path, paint);
        
        // Rectangle 13
        RectF rectangle13Rect = CacheForStarMedium.rectangle13Rect;
        rectangle13Rect.set(0f, 9f, 3f, 12f);
        Path rectangle13Path = CacheForStarMedium.rectangle13Path;
        rectangle13Path.reset();
        rectangle13Path.addRect(rectangle13Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor34);
        canvas.drawPath(rectangle13Path, paint);
        
        // Rectangle 14
        RectF rectangle14Rect = CacheForStarMedium.rectangle14Rect;
        rectangle14Rect.set(9f, 0f, 12f, 3f);
        Path rectangle14Path = CacheForStarMedium.rectangle14Path;
        rectangle14Path.reset();
        rectangle14Path.addRect(rectangle14Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor34);
        canvas.drawPath(rectangle14Path, paint);
        
        // Rectangle 15
        RectF rectangle15Rect = CacheForStarMedium.rectangle15Rect;
        rectangle15Rect.set(18f, 9f, 21f, 12f);
        Path rectangle15Path = CacheForStarMedium.rectangle15Path;
        rectangle15Path.reset();
        rectangle15Path.addRect(rectangle15Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor34);
        canvas.drawPath(rectangle15Path, paint);
        
        // Rectangle 16
        RectF rectangle16Rect = CacheForStarMedium.rectangle16Rect;
        rectangle16Rect.set(9f, 18f, 12f, 21f);
        Path rectangle16Path = CacheForStarMedium.rectangle16Path;
        rectangle16Path.reset();
        rectangle16Path.addRect(rectangle16Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor34);
        canvas.drawPath(rectangle16Path, paint);
        
        // Rectangle 17
        RectF rectangle17Rect = CacheForStarMedium.rectangle17Rect;
        rectangle17Rect.set(9f, 9f, 12f, 12f);
        Path rectangle17Path = CacheForStarMedium.rectangle17Path;
        rectangle17Path.reset();
        rectangle17Path.addRect(rectangle17Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor27);
        canvas.drawPath(rectangle17Path, paint);
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawPinnedItem(Canvas canvas) {
        HabiticaIcons.drawPinnedItem(canvas, new RectF(0f, 0f, 16f, 16f), ResizingBehavior.AspectFit);
    }
    
    public static void drawPinnedItem(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForPinnedItem.paint;
        
        // Local Colors
        int fillColor35 = Color.argb(255, 195, 192, 199);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForPinnedItem.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForPinnedItem.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 16f, resizedFrame.height() / 16f);
        
        // Bezier
        RectF bezierRect = CacheForPinnedItem.bezierRect;
        bezierRect.set(2f, 1f, 15f, 14f);
        Path bezierPath = CacheForPinnedItem.bezierPath;
        bezierPath.reset();
        bezierPath.moveTo(6.12f, 7.26f);
        bezierPath.lineTo(10.19f, 4.19f);
        bezierPath.lineTo(11.81f, 5.8f);
        bezierPath.lineTo(8.74f, 9.88f);
        bezierPath.lineTo(6.12f, 7.26f);
        bezierPath.close();
        bezierPath.moveTo(14.69f, 5.73f);
        bezierPath.lineTo(10.27f, 1.31f);
        bezierPath.cubicTo(9.86f, 0.9f, 9.2f, 0.9f, 8.79f, 1.31f);
        bezierPath.cubicTo(8.42f, 1.68f, 8.4f, 2.27f, 8.72f, 2.68f);
        bezierPath.lineTo(4.62f, 5.77f);
        bezierPath.lineTo(4.52f, 5.66f);
        bezierPath.cubicTo(4.11f, 5.26f, 3.45f, 5.26f, 3.04f, 5.66f);
        bezierPath.cubicTo(2.63f, 6.07f, 2.63f, 6.74f, 3.04f, 7.14f);
        bezierPath.lineTo(5.23f, 9.33f);
        bezierPath.lineTo(2.31f, 12.21f);
        bezierPath.cubicTo(1.9f, 12.62f, 1.9f, 13.28f, 2.3f, 13.69f);
        bezierPath.cubicTo(2.51f, 13.9f, 2.78f, 14f, 3.05f, 14f);
        bezierPath.cubicTo(3.31f, 14f, 3.58f, 13.9f, 3.78f, 13.7f);
        bezierPath.lineTo(6.71f, 10.81f);
        bezierPath.lineTo(8.9f, 13f);
        bezierPath.cubicTo(9.1f, 13.2f, 9.37f, 13.31f, 9.64f, 13.31f);
        bezierPath.cubicTo(9.9f, 13.31f, 10.17f, 13.2f, 10.38f, 13f);
        bezierPath.cubicTo(10.78f, 12.59f, 10.78f, 11.93f, 10.38f, 11.52f);
        bezierPath.lineTo(10.23f, 11.37f);
        bezierPath.lineTo(13.32f, 7.28f);
        bezierPath.cubicTo(13.51f, 7.42f, 13.73f, 7.51f, 13.95f, 7.51f);
        bezierPath.cubicTo(14.22f, 7.51f, 14.49f, 7.41f, 14.69f, 7.21f);
        bezierPath.cubicTo(15.1f, 6.8f, 15.1f, 6.14f, 14.69f, 5.73f);
        bezierPath.lineTo(14.69f, 5.73f);
        bezierPath.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezierPath.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor35);
        canvas.drawPath(bezierPath, paint);
        
        canvas.restore();
    }
    
    private static class CacheForAddRemovePin {
        private static Paint paint = new Paint();
        private static RectF originalFrame = new RectF(0f, 0f, 40f, 40f);
        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();
    }
    
    public static void drawAddRemovePin(Canvas canvas, boolean addPin) {
        HabiticaIcons.drawAddRemovePin(canvas, new RectF(0f, 0f, 40f, 40f), ResizingBehavior.AspectFit, addPin);
    }
    
    public static void drawAddRemovePin(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, boolean addPin) {
        // General Declarations
        Paint paint = CacheForAddRemovePin.paint;
        
        // Local Colors
        int fillColor36 = Color.argb(255, 97, 51, 180);
        int fillColor2 = Color.argb(255, 255, 97, 101);
        
        // Local Variables
        int pinColor = addPin ? fillColor36 : fillColor2;
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForAddRemovePin.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForAddRemovePin.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 40f, resizedFrame.height() / 40f);
        
        // Bezier
        RectF bezierRect = CacheForAddRemovePin.bezierRect;
        bezierRect.set(10f, 11f, 16f, 11f);
        Path bezierPath = CacheForAddRemovePin.bezierPath;
        bezierPath.reset();
        bezierPath.moveTo(16f, 11f);
        bezierPath.lineTo(10f, 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(pinColor);
        canvas.drawPath(bezierPath, paint);
        canvas.restore();
        
        // Bezier 2
        if (addPin) {
            RectF bezier2Rect = CacheForAddRemovePin.bezier2Rect;
            bezier2Rect.set(13f, 8f, 13f, 14f);
            Path bezier2Path = CacheForAddRemovePin.bezier2Path;
            bezier2Path.reset();
            bezier2Path.moveTo(13f, 8f);
            bezier2Path.lineTo(13f, 14f);
            
            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(pinColor);
            canvas.drawPath(bezier2Path, paint);
            canvas.restore();
        }
        
        // Bezier 3
        RectF bezier3Rect = CacheForAddRemovePin.bezier3Rect;
        bezier3Rect.set(12f, 11f, 32f, 31f);
        Path bezier3Path = CacheForAddRemovePin.bezier3Path;
        bezier3Path.reset();
        bezier3Path.moveTo(22.42f, 25.1f);
        bezier3Path.lineTo(17.9f, 20.58f);
        bezier3Path.lineTo(25.57f, 14.61f);
        bezier3Path.lineTo(28.39f, 17.43f);
        bezier3Path.lineTo(22.42f, 25.1f);
        bezier3Path.close();
        bezier3Path.moveTo(31.68f, 17.6f);
        bezier3Path.lineTo(30.63f, 16.56f);
        bezier3Path.cubicTo(30.63f, 16.56f, 30.63f, 16.56f, 30.63f, 16.56f);
        bezier3Path.lineTo(26.44f, 12.37f);
        bezier3Path.lineTo(25.4f, 11.32f);
        bezier3Path.cubicTo(24.97f, 10.89f, 24.27f, 10.89f, 23.84f, 11.32f);
        bezier3Path.cubicTo(23.41f, 11.75f, 23.41f, 12.45f, 23.84f, 12.88f);
        bezier3Path.lineTo(24f, 13.05f);
        bezier3Path.lineTo(16.33f, 19.01f);
        bezier3Path.lineTo(15.97f, 18.65f);
        bezier3Path.cubicTo(15.54f, 18.22f, 14.85f, 18.22f, 14.42f, 18.65f);
        bezier3Path.cubicTo(13.99f, 19.08f, 13.99f, 19.78f, 14.42f, 20.21f);
        bezier3Path.lineTo(15.46f, 21.25f);
        bezier3Path.cubicTo(15.46f, 21.25f, 15.46f, 21.26f, 15.46f, 21.26f);
        bezier3Path.lineTo(17.83f, 23.62f);
        bezier3Path.lineTo(12.32f, 29.12f);
        bezier3Path.cubicTo(11.89f, 29.55f, 11.89f, 30.25f, 12.32f, 30.68f);
        bezier3Path.cubicTo(12.54f, 30.89f, 12.82f, 31f, 13.1f, 31f);
        bezier3Path.cubicTo(13.38f, 31f, 13.66f, 30.89f, 13.88f, 30.68f);
        bezier3Path.lineTo(19.38f, 25.18f);
        bezier3Path.lineTo(21.74f, 27.54f);
        bezier3Path.cubicTo(21.75f, 27.54f, 21.75f, 27.54f, 21.75f, 27.54f);
        bezier3Path.lineTo(22.79f, 28.58f);
        bezier3Path.cubicTo(23.01f, 28.8f, 23.29f, 28.91f, 23.57f, 28.91f);
        bezier3Path.cubicTo(23.85f, 28.91f, 24.13f, 28.8f, 24.35f, 28.58f);
        bezier3Path.cubicTo(24.78f, 28.15f, 24.78f, 27.46f, 24.35f, 27.03f);
        bezier3Path.lineTo(23.99f, 26.67f);
        bezier3Path.lineTo(29.96f, 19f);
        bezier3Path.lineTo(30.12f, 19.16f);
        bezier3Path.cubicTo(30.34f, 19.38f, 30.62f, 19.48f, 30.9f, 19.48f);
        bezier3Path.cubicTo(31.18f, 19.48f, 31.46f, 19.38f, 31.68f, 19.16f);
        bezier3Path.cubicTo(32.11f, 18.73f, 32.11f, 18.03f, 31.68f, 17.6f);
        bezier3Path.lineTo(31.68f, 17.6f);
        bezier3Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier3Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(pinColor);
        canvas.drawPath(bezier3Path, paint);
        
        canvas.restore();
    }
    
    private static class CacheForPinItem {
        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 drawPinItem(Canvas canvas) {
        HabiticaIcons.drawPinItem(canvas, new RectF(0f, 0f, 40f, 40f), 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() / 40f, resizedFrame.height() / 40f);
        
        // Symbol
        RectF symbolRect = CacheForPinItem.symbolRect;
        symbolRect.set(0f, 0f, 40f, 40f);
        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, 40f, 40f);
        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, 40f, 40f), 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() / 40f, resizedFrame.height() / 40f);
        
        // Symbol
        RectF symbolRect = CacheForUnpinItem.symbolRect;
        symbolRect.set(0f, 0f, 40f, 40f);
        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();
    }
    
    public static void drawItemIndicator(Canvas canvas, int lockColor, boolean isLocked, boolean isLimited) {
        HabiticaIcons.drawItemIndicator(canvas, new RectF(0f, 0f, 28f, 28f), ResizingBehavior.AspectFit, lockColor, isLocked, isLimited);
    }
    
    public static void drawItemIndicator(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, int lockColor, boolean isLocked, boolean isLimited) {
        // General Declarations
        Paint paint = CacheForItemIndicator.paint;
        
        // Local Colors
        int fillColor38 = Color.argb(255, 165, 161, 172);
        int strokeColor2 = Color.argb(255, 189, 168, 255);
        int shadowTint = Color.argb(255, 26, 24, 29);
        int indicatorLocked = Color.argb(255, 237, 236, 238);
        int strokeColor = Color.argb(255, 97, 51, 180);
        int fillColor39 = Color.argb(255, 189, 168, 255);
        
        // Local Shadows
        PaintCodeShadow shadow = CacheForItemIndicator.shadow.get(PaintCodeColor.colorByChangingAlpha(shadowTint, (int) (Color.alpha(shadowTint) * 0.12f * 255f)), 0f, 1f, 1f);
        
        // Local Variables
        int itemIndicatorColor = isLocked ? indicatorLocked : (isLimited ? strokeColor : fillColor38);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForItemIndicator.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForItemIndicator.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 28f, resizedFrame.height() / 28f);
        
        // Oval 2
        RectF oval2Rect = CacheForItemIndicator.oval2Rect;
        oval2Rect.set(2f, 2f, 26f, 26f);
        Path oval2Path = CacheForItemIndicator.oval2Path;
        oval2Path.reset();
        oval2Path.addOval(oval2Rect, Path.Direction.CW);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        canvas.saveLayerAlpha(null, 255, Canvas.ALL_SAVE_FLAG);
        {
            canvas.translate(shadow.dx, shadow.dy);
            
            Paint shadowPaint = CacheForItemIndicator.shadowPaint;
            shadowPaint.set(paint);
            shadow.setBlurOfPaint(shadowPaint);
            canvas.drawPath(oval2Path, shadowPaint);
            shadowPaint.setXfermode(GlobalCache.blendModeSourceIn);
            canvas.saveLayer(null, shadowPaint, Canvas.ALL_SAVE_FLAG);
            {
                canvas.drawColor(shadow.color);
            }
            canvas.restore();
        }
        canvas.restore();
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(itemIndicatorColor);
        canvas.drawPath(oval2Path, paint);
        
        // Group 2
        if (isLimited) {
            // Bezier
            RectF bezierRect = CacheForItemIndicator.bezierRect;
            bezierRect.set(6f, 6f, 22f, 22f);
            Path bezierPath = CacheForItemIndicator.bezierPath;
            bezierPath.reset();
            bezierPath.moveTo(14f, 6f);
            bezierPath.cubicTo(9.58f, 6f, 6f, 9.58f, 6f, 14f);
            bezierPath.cubicTo(6f, 18.42f, 9.58f, 22f, 14f, 22f);
            bezierPath.cubicTo(18.42f, 22f, 22f, 18.42f, 22f, 14f);
            bezierPath.cubicTo(22f, 9.58f, 18.42f, 6f, 14f, 6f);
            bezierPath.close();
            bezierPath.moveTo(14f, 8f);
            bezierPath.cubicTo(17.31f, 8f, 20f, 10.69f, 20f, 14f);
            bezierPath.cubicTo(20f, 17.31f, 17.31f, 20f, 14f, 20f);
            bezierPath.cubicTo(10.69f, 20f, 8f, 17.31f, 8f, 14f);
            bezierPath.cubicTo(8f, 10.69f, 10.69f, 8f, 14f, 8f);
            bezierPath.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezierPath.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor39);
            canvas.drawPath(bezierPath, paint);
            
            // Bezier 2
            RectF bezier2Rect = CacheForItemIndicator.bezier2Rect;
            bezier2Rect.set(14f, 11f, 16f, 16f);
            Path bezier2Path = CacheForItemIndicator.bezier2Path;
            bezier2Path.reset();
            bezier2Path.moveTo(14f, 11f);
            bezier2Path.lineTo(14f, 14.03f);
            bezier2Path.lineTo(16f, 16f);
            
            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(strokeColor2);
            canvas.drawPath(bezier2Path, paint);
            canvas.restore();
        }
        
        // Symbol
        if (isLocked) {
            RectF symbolRect = CacheForItemIndicator.symbolRect;
            symbolRect.set(9f, 7f, 19f, 19f);
            canvas.save();
            canvas.clipRect(symbolRect);
            canvas.translate(symbolRect.left, symbolRect.top);
            RectF symbolTargetRect = CacheForItemIndicator.symbolTargetRect;
            symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
            HabiticaIcons.drawLocked(canvas, symbolTargetRect, ResizingBehavior.Stretch, lockColor);
            canvas.restore();
        }
        
        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 lockColor) {
        HabiticaIcons.drawItemIndicatorNumber(canvas, new RectF(0f, 0f, 28f, 28f), ResizingBehavior.AspectFit, lockColor);
    }
    
    private static void drawItemIndicatorNumber(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, int lockColor) {
        // 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, lockColor, 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 lockColor) {
        HabiticaIcons.drawItemIndicatorLocked(canvas, new RectF(0f, 0f, 28f, 28f), ResizingBehavior.AspectFit, lockColor);
    }
    
    private static void drawItemIndicatorLocked(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, int lockColor) {
        // 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, lockColor, true, 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 lockColor) {
        HabiticaIcons.drawItemIndicatorLimited(canvas, new RectF(0f, 0f, 28f, 28f), ResizingBehavior.AspectFit, lockColor);
    }
    
    private static void drawItemIndicatorLimited(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, int lockColor) {
        // 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, lockColor, false, true);
        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();
    }
    
    public static void drawWarriorLightBg(Canvas canvas) {
        HabiticaIcons.drawWarriorLightBg(canvas, new RectF(0f, 0f, 32f, 32f), ResizingBehavior.AspectFit);
    }
    
    public static void drawWarriorLightBg(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForWarriorLightBg.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForWarriorLightBg.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 32f, resizedFrame.height() / 32f);
        
        // Symbol
        RectF symbolRect = CacheForWarriorLightBg.symbolRect;
        symbolRect.set(0f, 0f, 32f, 32f);
        canvas.save();
        canvas.clipRect(symbolRect);
        canvas.translate(symbolRect.left, symbolRect.top);
        RectF symbolTargetRect = CacheForWarriorLightBg.symbolTargetRect;
        symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
        HabiticaIcons.drawWarrior(canvas, symbolTargetRect, ResizingBehavior.Stretch, false);
        canvas.restore();
        
        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);
    }
    
    public static void drawRogue(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, boolean darkBackground) {
        // General Declarations
        Stack<Matrix> currentTransformation = new Stack<Matrix>();
        currentTransformation.push(new Matrix());
        Paint paint = CacheForRogue.paint;
        
        // Local Colors
        int fillColor46 = Color.argb(255, 122, 84, 192);
        int fillColor48 = Color.argb(255, 137, 102, 199);
        int fillColor45 = Color.argb(255, 155, 129, 226);
        int fillColor36 = Color.argb(255, 97, 51, 180);
        int fillColor47 = Color.argb(255, 198, 182, 228);
        int fillColor19 = Color.argb(255, 79, 42, 147);
        int fillColor44 = Color.argb(255, 204, 190, 237);
        
        // Local Variables
        boolean lightBackground = !darkBackground;
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForRogue.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForRogue.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 32f, resizedFrame.height() / 32f);
        
        // Group 2
        if (darkBackground) {
            // Bezier
            RectF bezierRect = CacheForRogue.bezierRect;
            bezierRect.set(5f, 6f, 26.6f, 27.3f);
            Path bezierPath = CacheForRogue.bezierPath;
            bezierPath.reset();
            bezierPath.moveTo(24.35f, 22.01f);
            bezierPath.lineTo(20.83f, 18.48f);
            bezierPath.cubicTo(20.78f, 18.3f, 20.74f, 18.12f, 20.69f, 17.94f);
            bezierPath.lineTo(25.48f, 9.27f);
            bezierPath.lineTo(26.2f, 6.1f);
            bezierPath.lineTo(22.99f, 6.85f);
            bezierPath.lineTo(15.9f, 10.76f);
            bezierPath.lineTo(8.56f, 6.72f);
            bezierPath.lineTo(5.4f, 6f);
            bezierPath.lineTo(6.15f, 9.21f);
            bezierPath.lineTo(10.94f, 17.9f);
            bezierPath.cubicTo(10.89f, 18.13f, 10.83f, 18.36f, 10.77f, 18.59f);
            bezierPath.lineTo(7.25f, 22.11f);
            bezierPath.lineTo(5f, 21.7f);
            bezierPath.lineTo(5.88f, 26.43f);
            bezierPath.lineTo(10.61f, 27.3f);
            bezierPath.lineTo(10.19f, 25.06f);
            bezierPath.lineTo(13.72f, 21.53f);
            bezierPath.cubicTo(14.5f, 21.34f, 15.3f, 21.14f, 16.01f, 20.97f);
            bezierPath.cubicTo(16.61f, 21.11f, 17.25f, 21.27f, 17.89f, 21.43f);
            bezierPath.lineTo(21.41f, 24.95f);
            bezierPath.lineTo(20.99f, 27.2f);
            bezierPath.lineTo(25.72f, 26.32f);
            bezierPath.lineTo(26.6f, 21.59f);
            bezierPath.lineTo(24.35f, 22.01f);
            bezierPath.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezierPath.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor44);
            canvas.drawPath(bezierPath, paint);
            
            // Bezier 2
            RectF bezier2Rect = CacheForRogue.bezier2Rect;
            bezier2Rect.set(7.21f, 7.84f, 16.8f, 18.7f);
            Path bezier2Path = CacheForRogue.bezier2Path;
            bezier2Path.reset();
            bezier2Path.moveTo(12.83f, 18.3f);
            bezier2Path.cubicTo(12.93f, 18.49f, 13.04f, 18.62f, 13.14f, 18.7f);
            bezier2Path.lineTo(16.8f, 17.4f);
            bezier2Path.lineTo(7.24f, 7.84f);
            bezier2Path.cubicTo(7.16f, 7.93f, 7.27f, 8.19f, 7.43f, 8.5f);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier2Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor45);
            canvas.drawPath(bezier2Path, paint);
            
            // Bezier 3
            RectF bezier3Rect = CacheForRogue.bezier3Rect;
            bezier3Rect.set(13.14f, 17.4f, 19.07f, 20.1f);
            Path bezier3Path = CacheForRogue.bezier3Path;
            bezier3Path.reset();
            bezier3Path.moveTo(13.14f, 18.71f);
            bezier3Path.cubicTo(13.33f, 18.86f, 13.51f, 18.89f, 13.71f, 18.92f);
            bezier3Path.cubicTo(14f, 18.96f, 18.63f, 20.1f, 18.63f, 20.1f);
            bezier3Path.lineTo(19.07f, 19.67f);
            bezier3Path.lineTo(16.8f, 17.4f);
            bezier3Path.lineTo(13.14f, 18.71f);
            bezier3Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier3Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor46);
            canvas.drawPath(bezier3Path, paint);
            
            // Bezier 4
            RectF bezier4Rect = CacheForRogue.bezier4Rect;
            bezier4Rect.set(7.24f, 7.81f, 18.11f, 17.4f);
            Path bezier4Path = CacheForRogue.bezier4Path;
            bezier4Path.reset();
            bezier4Path.moveTo(17.7f, 13.43f);
            bezier4Path.cubicTo(17.89f, 13.53f, 18.02f, 13.63f, 18.11f, 13.74f);
            bezier4Path.lineTo(16.8f, 17.4f);
            bezier4Path.lineTo(7.24f, 7.84f);
            bezier4Path.cubicTo(7.33f, 7.76f, 7.58f, 7.86f, 7.89f, 8.01f);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier4Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor36);
            canvas.drawPath(bezier4Path, paint);
            
            // Bezier 5
            RectF bezier5Rect = CacheForRogue.bezier5Rect;
            bezier5Rect.set(16.8f, 13.74f, 19.5f, 19.67f);
            Path bezier5Path = CacheForRogue.bezier5Path;
            bezier5Path.reset();
            bezier5Path.moveTo(18.11f, 13.74f);
            bezier5Path.cubicTo(18.27f, 13.93f, 18.29f, 14.11f, 18.32f, 14.31f);
            bezier5Path.cubicTo(18.36f, 14.6f, 19.5f, 19.23f, 19.5f, 19.23f);
            bezier5Path.lineTo(19.07f, 19.67f);
            bezier5Path.lineTo(16.8f, 17.4f);
            bezier5Path.lineTo(18.11f, 13.74f);
            bezier5Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier5Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor19);
            canvas.drawPath(bezier5Path, paint);
            
            // Bezier 6
            RectF bezier6Rect = CacheForRogue.bezier6Rect;
            bezier6Rect.set(20.38f, 20.33f, 21.32f, 22.57f);
            Path bezier6Path = CacheForRogue.bezier6Path;
            bezier6Path.reset();
            bezier6Path.moveTo(21.1f, 22.57f);
            bezier6Path.lineTo(20.38f, 21.86f);
            bezier6Path.lineTo(20.61f, 20.33f);
            bezier6Path.lineTo(21.32f, 21.05f);
            bezier6Path.lineTo(21.1f, 22.57f);
            bezier6Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier6Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor46);
            canvas.drawPath(bezier6Path, paint);
            
            // Bezier 7
            RectF bezier7Rect = CacheForRogue.bezier7Rect;
            bezier7Rect.set(21.82f, 21.77f, 22.76f, 24f);
            Path bezier7Path = CacheForRogue.bezier7Path;
            bezier7Path.reset();
            bezier7Path.moveTo(22.53f, 24f);
            bezier7Path.lineTo(21.82f, 23.29f);
            bezier7Path.lineTo(22.04f, 21.77f);
            bezier7Path.lineTo(22.76f, 22.48f);
            bezier7Path.lineTo(22.53f, 24f);
            bezier7Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier7Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor46);
            canvas.drawPath(bezier7Path, paint);
            
            // Bezier 8
            RectF bezier8Rect = CacheForRogue.bezier8Rect;
            bezier8Rect.set(18.63f, 19.23f, 19.89f, 21.14f);
            Path bezier8Path = CacheForRogue.bezier8Path;
            bezier8Path.reset();
            bezier8Path.moveTo(19.5f, 19.23f);
            bezier8Path.lineTo(19.89f, 19.62f);
            bezier8Path.lineTo(19.67f, 21.14f);
            bezier8Path.lineTo(18.63f, 20.1f);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier8Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor46);
            canvas.drawPath(bezier8Path, paint);
            
            // Bezier 9
            RectF bezier9Rect = CacheForRogue.bezier9Rect;
            bezier9Rect.set(19.67f, 19.62f, 20.61f, 21.86f);
            Path bezier9Path = CacheForRogue.bezier9Path;
            bezier9Path.reset();
            bezier9Path.moveTo(20.38f, 21.86f);
            bezier9Path.lineTo(19.67f, 21.14f);
            bezier9Path.lineTo(19.89f, 19.62f);
            bezier9Path.lineTo(20.61f, 20.33f);
            bezier9Path.lineTo(20.38f, 21.86f);
            bezier9Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier9Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor19);
            canvas.drawPath(bezier9Path, paint);
            
            // Bezier 10
            RectF bezier10Rect = CacheForRogue.bezier10Rect;
            bezier10Rect.set(21.1f, 21.05f, 22.04f, 23.29f);
            Path bezier10Path = CacheForRogue.bezier10Path;
            bezier10Path.reset();
            bezier10Path.moveTo(21.82f, 23.29f);
            bezier10Path.lineTo(21.1f, 22.57f);
            bezier10Path.lineTo(21.32f, 21.05f);
            bezier10Path.lineTo(22.04f, 21.77f);
            bezier10Path.lineTo(21.82f, 23.29f);
            bezier10Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier10Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor19);
            canvas.drawPath(bezier10Path, paint);
            
            // Bezier 11
            RectF bezier11Rect = CacheForRogue.bezier11Rect;
            bezier11Rect.set(22.53f, 22.48f, 24.12f, 24.72f);
            Path bezier11Path = CacheForRogue.bezier11Path;
            bezier11Path.reset();
            bezier11Path.moveTo(23.25f, 24.72f);
            bezier11Path.lineTo(22.53f, 24f);
            bezier11Path.lineTo(22.76f, 22.48f);
            bezier11Path.lineTo(24.12f, 23.85f);
            bezier11Path.lineTo(23.25f, 24.72f);
            bezier11Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier11Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor19);
            canvas.drawPath(bezier11Path, paint);
            
            // Star
            canvas.save();
            canvas.translate(19.05f, 19.65f);
            currentTransformation.peek().postTranslate(19.05f, 19.65f);
            canvas.rotate(-135f);
            currentTransformation.peek().postRotate(-135f);
            RectF starRect = CacheForRogue.starRect;
            starRect.set(-0.6f, -0.6f, 0.6f, 0.6f);
            Path starPath = CacheForRogue.starPath;
            starPath.reset();
            starPath.moveTo(0f, -0.6f);
            starPath.lineTo(0.5f, 0f);
            starPath.lineTo(0f, 0.6f);
            starPath.lineTo(-0.5f, 0f);
            starPath.lineTo(0f, -0.6f);
            starPath.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor45);
            canvas.drawPath(starPath, paint);
            canvas.restore();
            
            // Star 2
            canvas.save();
            canvas.translate(23.8f, 24.4f);
            currentTransformation.peek().postTranslate(23.8f, 24.4f);
            canvas.rotate(-135f);
            currentTransformation.peek().postRotate(-135f);
            RectF star2Rect = CacheForRogue.star2Rect;
            star2Rect.set(-1.4f, -1.4f, 1.4f, 1.4f);
            Path star2Path = CacheForRogue.star2Path;
            star2Path.reset();
            star2Path.moveTo(0f, -1.4f);
            star2Path.lineTo(0.95f, 0f);
            star2Path.lineTo(0f, 1.4f);
            star2Path.lineTo(-0.95f, 0f);
            star2Path.lineTo(0f, -1.4f);
            star2Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor45);
            canvas.drawPath(star2Path, paint);
            canvas.restore();
        }
        
        // Group 3
        if (lightBackground) {
            // Bezier 12
            RectF bezier12Rect = CacheForRogue.bezier12Rect;
            bezier12Rect.set(4.86f, 6.36f, 26.06f, 27.55f);
            Path bezier12Path = CacheForRogue.bezier12Path;
            bezier12Path.reset();
            bezier12Path.moveTo(7.11f, 22.37f);
            bezier12Path.lineTo(10.64f, 18.84f);
            bezier12Path.cubicTo(11.14f, 16.79f, 11.66f, 14.65f, 11.7f, 14.42f);
            bezier12Path.cubicTo(11.73f, 14.18f, 11.81f, 13.65f, 12.24f, 13.15f);
            bezier12Path.cubicTo(12.46f, 12.89f, 12.73f, 12.68f, 13.06f, 12.5f);
            bezier12Path.lineTo(22.86f, 7.1f);
            bezier12Path.lineTo(26.06f, 6.36f);
            bezier12Path.lineTo(25.35f, 9.52f);
            bezier12Path.lineTo(19.92f, 19.36f);
            bezier12Path.cubicTo(19.74f, 19.68f, 19.55f, 19.93f, 19.32f, 20.14f);
            bezier12Path.lineTo(19.28f, 20.17f);
            bezier12Path.cubicTo(18.77f, 20.6f, 18.26f, 20.68f, 17.98f, 20.72f);
            bezier12Path.cubicTo(17.77f, 20.76f, 15.58f, 21.29f, 13.58f, 21.78f);
            bezier12Path.lineTo(10.05f, 25.31f);
            bezier12Path.lineTo(10.47f, 27.55f);
            bezier12Path.lineTo(5.74f, 26.68f);
            bezier12Path.lineTo(4.86f, 21.95f);
            bezier12Path.lineTo(7.11f, 22.37f);
            bezier12Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier12Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor19);
            canvas.drawPath(bezier12Path, paint);
            
            // Bezier 13
            RectF bezier13Rect = CacheForRogue.bezier13Rect;
            bezier13Rect.set(5.27f, 6.25f, 26.46f, 27.45f);
            Path bezier13Path = CacheForRogue.bezier13Path;
            bezier13Path.reset();
            bezier13Path.moveTo(21.27f, 25.2f);
            bezier13Path.lineTo(17.75f, 21.68f);
            bezier13Path.cubicTo(15.7f, 21.18f, 13.55f, 20.66f, 13.33f, 20.61f);
            bezier13Path.cubicTo(13.09f, 20.58f, 12.56f, 20.5f, 12.06f, 20.07f);
            bezier13Path.cubicTo(11.8f, 19.86f, 11.59f, 19.59f, 11.41f, 19.25f);
            bezier13Path.lineTo(6.01f, 9.46f);
            bezier13Path.lineTo(5.27f, 6.25f);
            bezier13Path.lineTo(8.43f, 6.97f);
            bezier13Path.lineTo(18.27f, 12.4f);
            bezier13Path.cubicTo(18.58f, 12.57f, 18.84f, 12.77f, 19.04f, 13f);
            bezier13Path.lineTo(19.08f, 13.04f);
            bezier13Path.cubicTo(19.51f, 13.55f, 19.59f, 14.06f, 19.63f, 14.33f);
            bezier13Path.cubicTo(19.67f, 14.55f, 20.2f, 16.74f, 20.69f, 18.74f);
            bezier13Path.lineTo(24.22f, 22.26f);
            bezier13Path.lineTo(26.46f, 21.85f);
            bezier13Path.lineTo(25.59f, 26.58f);
            bezier13Path.lineTo(20.86f, 27.45f);
            bezier13Path.lineTo(21.27f, 25.2f);
            bezier13Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier13Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor19);
            canvas.drawPath(bezier13Path, paint);
            
            // Bezier 14
            RectF bezier14Rect = CacheForRogue.bezier14Rect;
            bezier14Rect.set(7.08f, 8.09f, 16.66f, 18.96f);
            Path bezier14Path = CacheForRogue.bezier14Path;
            bezier14Path.reset();
            bezier14Path.moveTo(12.69f, 18.55f);
            bezier14Path.cubicTo(12.8f, 18.74f, 12.9f, 18.87f, 13f, 18.96f);
            bezier14Path.lineTo(16.66f, 17.65f);
            bezier14Path.lineTo(7.11f, 8.09f);
            bezier14Path.cubicTo(7.03f, 8.18f, 7.13f, 8.44f, 7.29f, 8.75f);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier14Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor47);
            canvas.drawPath(bezier14Path, paint);
            
            // Bezier 15
            RectF bezier15Rect = CacheForRogue.bezier15Rect;
            bezier15Rect.set(13f, 17.65f, 18.93f, 20.36f);
            Path bezier15Path = CacheForRogue.bezier15Path;
            bezier15Path.reset();
            bezier15Path.moveTo(13f, 18.96f);
            bezier15Path.cubicTo(13.19f, 19.12f, 13.38f, 19.14f, 13.57f, 19.17f);
            bezier15Path.cubicTo(13.87f, 19.22f, 18.49f, 20.36f, 18.49f, 20.36f);
            bezier15Path.lineTo(18.93f, 19.92f);
            bezier15Path.lineTo(16.66f, 17.65f);
            bezier15Path.lineTo(13f, 18.96f);
            bezier15Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier15Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor48);
            canvas.drawPath(bezier15Path, paint);
            
            // Bezier 16
            RectF bezier16Rect = CacheForRogue.bezier16Rect;
            bezier16Rect.set(7.11f, 8.07f, 17.97f, 17.65f);
            Path bezier16Path = CacheForRogue.bezier16Path;
            bezier16Path.reset();
            bezier16Path.moveTo(17.56f, 13.68f);
            bezier16Path.cubicTo(17.75f, 13.79f, 17.88f, 13.89f, 17.97f, 13.99f);
            bezier16Path.lineTo(16.67f, 17.65f);
            bezier16Path.lineTo(7.11f, 8.09f);
            bezier16Path.cubicTo(7.19f, 8.02f, 7.45f, 8.11f, 7.75f, 8.27f);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier16Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor46);
            canvas.drawPath(bezier16Path, paint);
            
            // Bezier 17
            RectF bezier17Rect = CacheForRogue.bezier17Rect;
            bezier17Rect.set(16.67f, 13.99f, 19.37f, 19.92f);
            Path bezier17Path = CacheForRogue.bezier17Path;
            bezier17Path.reset();
            bezier17Path.moveTo(17.97f, 13.99f);
            bezier17Path.cubicTo(18.13f, 14.18f, 18.16f, 14.37f, 18.18f, 14.56f);
            bezier17Path.cubicTo(18.23f, 14.86f, 19.37f, 19.48f, 19.37f, 19.48f);
            bezier17Path.lineTo(18.93f, 19.92f);
            bezier17Path.lineTo(16.67f, 17.65f);
            bezier17Path.lineTo(17.97f, 13.99f);
            bezier17Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier17Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor36);
            canvas.drawPath(bezier17Path, paint);
            
            // Bezier 18
            RectF bezier18Rect = CacheForRogue.bezier18Rect;
            bezier18Rect.set(20.25f, 20.59f, 21.19f, 22.82f);
            Path bezier18Path = CacheForRogue.bezier18Path;
            bezier18Path.reset();
            bezier18Path.moveTo(20.96f, 22.82f);
            bezier18Path.lineTo(20.25f, 22.11f);
            bezier18Path.lineTo(20.47f, 20.59f);
            bezier18Path.lineTo(21.19f, 21.3f);
            bezier18Path.lineTo(20.96f, 22.82f);
            bezier18Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier18Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor48);
            canvas.drawPath(bezier18Path, paint);
            
            // Bezier 19
            RectF bezier19Rect = CacheForRogue.bezier19Rect;
            bezier19Rect.set(21.68f, 22.02f, 22.62f, 24.26f);
            Path bezier19Path = CacheForRogue.bezier19Path;
            bezier19Path.reset();
            bezier19Path.moveTo(22.4f, 24.26f);
            bezier19Path.lineTo(21.68f, 23.54f);
            bezier19Path.lineTo(21.9f, 22.02f);
            bezier19Path.lineTo(22.62f, 22.73f);
            bezier19Path.lineTo(22.4f, 24.26f);
            bezier19Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier19Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor48);
            canvas.drawPath(bezier19Path, paint);
            
            // Bezier 20
            RectF bezier20Rect = CacheForRogue.bezier20Rect;
            bezier20Rect.set(18.49f, 19.48f, 19.76f, 21.39f);
            Path bezier20Path = CacheForRogue.bezier20Path;
            bezier20Path.reset();
            bezier20Path.moveTo(19.37f, 19.48f);
            bezier20Path.lineTo(19.76f, 19.87f);
            bezier20Path.lineTo(19.53f, 21.39f);
            bezier20Path.lineTo(18.49f, 20.36f);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier20Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor48);
            canvas.drawPath(bezier20Path, paint);
            
            // Bezier 21
            RectF bezier21Rect = CacheForRogue.bezier21Rect;
            bezier21Rect.set(19.53f, 19.87f, 20.47f, 22.11f);
            Path bezier21Path = CacheForRogue.bezier21Path;
            bezier21Path.reset();
            bezier21Path.moveTo(20.25f, 22.11f);
            bezier21Path.lineTo(19.53f, 21.39f);
            bezier21Path.lineTo(19.76f, 19.87f);
            bezier21Path.lineTo(20.47f, 20.59f);
            bezier21Path.lineTo(20.25f, 22.11f);
            bezier21Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier21Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor36);
            canvas.drawPath(bezier21Path, paint);
            
            // Bezier 22
            RectF bezier22Rect = CacheForRogue.bezier22Rect;
            bezier22Rect.set(20.96f, 21.3f, 21.9f, 23.54f);
            Path bezier22Path = CacheForRogue.bezier22Path;
            bezier22Path.reset();
            bezier22Path.moveTo(21.68f, 23.54f);
            bezier22Path.lineTo(20.96f, 22.82f);
            bezier22Path.lineTo(21.19f, 21.3f);
            bezier22Path.lineTo(21.9f, 22.02f);
            bezier22Path.lineTo(21.68f, 23.54f);
            bezier22Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier22Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor36);
            canvas.drawPath(bezier22Path, paint);
            
            // Bezier 23
            RectF bezier23Rect = CacheForRogue.bezier23Rect;
            bezier23Rect.set(22.4f, 22.73f, 23.98f, 24.97f);
            Path bezier23Path = CacheForRogue.bezier23Path;
            bezier23Path.reset();
            bezier23Path.moveTo(23.11f, 24.97f);
            bezier23Path.lineTo(22.4f, 24.26f);
            bezier23Path.lineTo(22.62f, 22.73f);
            bezier23Path.lineTo(23.98f, 24.1f);
            bezier23Path.lineTo(23.11f, 24.97f);
            bezier23Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier23Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor36);
            canvas.drawPath(bezier23Path, paint);
            
            // Star 3
            canvas.save();
            canvas.translate(18.95f, 19.9f);
            currentTransformation.peek().postTranslate(18.95f, 19.9f);
            canvas.rotate(-135f);
            currentTransformation.peek().postRotate(-135f);
            RectF star3Rect = CacheForRogue.star3Rect;
            star3Rect.set(-0.6f, -0.6f, 0.6f, 0.6f);
            Path star3Path = CacheForRogue.star3Path;
            star3Path.reset();
            star3Path.moveTo(0f, -0.6f);
            star3Path.lineTo(0.5f, 0f);
            star3Path.lineTo(0f, 0.6f);
            star3Path.lineTo(-0.5f, 0f);
            star3Path.lineTo(0f, -0.6f);
            star3Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor47);
            canvas.drawPath(star3Path, paint);
            canvas.restore();
            
            // Bezier 24
            RectF bezier24Rect = CacheForRogue.bezier24Rect;
            bezier24Rect.set(22.69f, 23.98f, 23.66f, 25.62f);
            Path bezier24Path = CacheForRogue.bezier24Path;
            bezier24Path.reset();
            bezier24Path.moveTo(22.99f, 23.98f);
            bezier24Path.lineTo(22.69f, 25.62f);
            bezier24Path.lineTo(22.69f, 25.62f);
            bezier24Path.lineTo(23.66f, 24.65f);
            bezier24Path.lineTo(22.99f, 23.98f);
            bezier24Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier24Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor47);
            canvas.drawPath(bezier24Path, paint);
            
            // Bezier 25
            RectF bezier25Rect = CacheForRogue.bezier25Rect;
            bezier25Rect.set(22.99f, 23.67f, 24.64f, 24.65f);
            Path bezier25Path = CacheForRogue.bezier25Path;
            bezier25Path.reset();
            bezier25Path.moveTo(24.64f, 23.67f);
            bezier25Path.lineTo(22.99f, 23.98f);
            bezier25Path.lineTo(23.66f, 24.65f);
            bezier25Path.lineTo(24.64f, 23.67f);
            bezier25Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier25Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor47);
            canvas.drawPath(bezier25Path, paint);
            
            // Bezier 26
            RectF bezier26Rect = CacheForRogue.bezier26Rect;
            bezier26Rect.set(22.69f, 24.65f, 24.33f, 25.62f);
            Path bezier26Path = CacheForRogue.bezier26Path;
            bezier26Path.reset();
            bezier26Path.moveTo(23.66f, 24.65f);
            bezier26Path.lineTo(22.69f, 25.62f);
            bezier26Path.lineTo(24.33f, 25.32f);
            bezier26Path.lineTo(23.66f, 24.65f);
            bezier26Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier26Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor47);
            canvas.drawPath(bezier26Path, paint);
            
            // Bezier 27
            RectF bezier27Rect = CacheForRogue.bezier27Rect;
            bezier27Rect.set(23.66f, 23.67f, 24.64f, 25.32f);
            Path bezier27Path = CacheForRogue.bezier27Path;
            bezier27Path.reset();
            bezier27Path.moveTo(24.33f, 25.32f);
            bezier27Path.lineTo(24.64f, 23.67f);
            bezier27Path.lineTo(24.64f, 23.67f);
            bezier27Path.lineTo(23.66f, 24.65f);
            bezier27Path.lineTo(24.33f, 25.32f);
            bezier27Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier27Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor47);
            canvas.drawPath(bezier27Path, paint);
        }
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawRogueLightBg(Canvas canvas) {
        HabiticaIcons.drawRogueLightBg(canvas, new RectF(0f, 0f, 32f, 32f), ResizingBehavior.AspectFit);
    }
    
    public static void drawRogueLightBg(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForRogueLightBg.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForRogueLightBg.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 32f, resizedFrame.height() / 32f);
        
        // Symbol
        RectF symbolRect = CacheForRogueLightBg.symbolRect;
        symbolRect.set(0f, 0f, 32f, 32f);
        canvas.save();
        canvas.clipRect(symbolRect);
        canvas.translate(symbolRect.left, symbolRect.top);
        RectF symbolTargetRect = CacheForRogueLightBg.symbolTargetRect;
        symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
        HabiticaIcons.drawRogue(canvas, symbolTargetRect, ResizingBehavior.Stretch, false);
        canvas.restore();
        
        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);
    }
    
    public static void drawHealer(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, boolean darkBackground) {
        // General Declarations
        Paint paint = CacheForHealer.paint;
        
        // Local Colors
        int fillColor58 = Color.argb(255, 229, 144, 37);
        int fillColor50 = Color.argb(255, 226, 158, 69);
        int fillColor57 = Color.argb(255, 255, 221, 181);
        int fillColor49 = Color.argb(255, 255, 215, 168);
        int fillColor56 = Color.argb(255, 255, 166, 35);
        int fillColor55 = Color.argb(255, 253, 198, 126);
        int fillColor54 = Color.argb(255, 207, 130, 41);
        int fillColor53 = Color.argb(255, 206, 129, 41);
        int fillColor10 = Color.argb(255, 255, 166, 35);
        int fillColor52 = Color.argb(255, 253, 198, 126);
        int fillColor59 = Color.argb(255, 255, 228, 201);
        int fillColor51 = Color.argb(255, 229, 144, 37);
        
        // Local Variables
        boolean lightBackground = !darkBackground;
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForHealer.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForHealer.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 32f, resizedFrame.height() / 32f);
        
        // Group 2
        if (darkBackground) {
            // Bezier
            RectF bezierRect = CacheForHealer.bezierRect;
            bezierRect.set(4.98f, 4.79f, 25.53f, 28.79f);
            Path bezierPath = CacheForHealer.bezierPath;
            bezierPath.reset();
            bezierPath.moveTo(13.91f, 28.2f);
            bezierPath.lineTo(13.81f, 28.15f);
            bezierPath.cubicTo(11.14f, 26.81f, 8.32f, 25.14f, 6.58f, 21.85f);
            bezierPath.cubicTo(4.62f, 18.12f, 5f, 12.18f, 5.04f, 11.51f);
            bezierPath.cubicTo(5.08f, 10.99f, 5.24f, 9.71f, 5.24f, 9.71f);
            bezierPath.cubicTo(5.24f, 9.71f, 6.25f, 9.26f, 6.75f, 9.03f);
            bezierPath.lineTo(13.97f, 5.37f);
            bezierPath.cubicTo(14.37f, 5.18f, 15.26f, 4.79f, 15.26f, 4.79f);
            bezierPath.cubicTo(15.26f, 4.79f, 16.14f, 5.18f, 16.54f, 5.37f);
            bezierPath.lineTo(23.76f, 9.02f);
            bezierPath.cubicTo(24.26f, 9.26f, 25.35f, 9.71f, 25.35f, 9.71f);
            bezierPath.cubicTo(25.35f, 9.71f, 25.43f, 10.99f, 25.47f, 11.51f);
            bezierPath.cubicTo(25.52f, 12.18f, 25.89f, 18.12f, 23.93f, 21.85f);
            bezierPath.cubicTo(22.19f, 25.14f, 19.37f, 26.81f, 16.7f, 28.15f);
            bezierPath.lineTo(16.6f, 28.2f);
            bezierPath.cubicTo(16.19f, 28.41f, 15.26f, 28.79f, 15.26f, 28.79f);
            bezierPath.cubicTo(15.26f, 28.79f, 14.32f, 28.41f, 13.91f, 28.2f);
            bezierPath.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezierPath.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor49);
            canvas.drawPath(bezierPath, paint);
            
            // Bezier 2
            RectF bezier2Rect = CacheForHealer.bezier2Rect;
            bezier2Rect.set(7.21f, 7.04f, 15.26f, 12.42f);
            Path bezier2Path = CacheForHealer.bezier2Path;
            bezier2Path.reset();
            bezier2Path.moveTo(9.05f, 12.41f);
            bezier2Path.lineTo(14.81f, 9.44f);
            bezier2Path.cubicTo(14.95f, 9.38f, 15.1f, 9.34f, 15.26f, 9.34f);
            bezier2Path.lineTo(15.26f, 7.04f);
            bezier2Path.cubicTo(15.1f, 7.04f, 14.95f, 7.07f, 14.81f, 7.14f);
            bezier2Path.lineTo(7.59f, 10.79f);
            bezier2Path.cubicTo(7.43f, 10.86f, 7.31f, 10.97f, 7.21f, 11.1f);
            bezier2Path.lineTo(9.05f, 12.42f);
            bezier2Path.lineTo(9.05f, 12.41f);
            bezier2Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier2Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor50);
            canvas.drawPath(bezier2Path, paint);
            
            // Bezier 3
            RectF bezier3Rect = CacheForHealer.bezier3Rect;
            bezier3Rect.set(6.94f, 7.03f, 15.26f, 26.56f);
            Path bezier3Path = CacheForHealer.bezier3Path;
            bezier3Path.reset();
            bezier3Path.moveTo(14.81f, 7.13f);
            bezier3Path.lineTo(7.59f, 10.78f);
            bezier3Path.cubicTo(7.25f, 10.94f, 7.02f, 11.27f, 6.99f, 11.65f);
            bezier3Path.cubicTo(6.97f, 11.89f, 6.57f, 17.63f, 8.31f, 20.93f);
            bezier3Path.cubicTo(9.76f, 23.67f, 12.14f, 25.12f, 14.69f, 26.4f);
            bezier3Path.lineTo(14.79f, 26.45f);
            bezier3Path.cubicTo(14.93f, 26.52f, 15.09f, 26.56f, 15.26f, 26.56f);
            bezier3Path.lineTo(15.26f, 26.56f);
            bezier3Path.lineTo(15.26f, 7.03f);
            bezier3Path.cubicTo(15.1f, 7.03f, 14.95f, 7.06f, 14.81f, 7.13f);
            bezier3Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier3Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor10);
            canvas.drawPath(bezier3Path, paint);
            
            // Bezier 4
            RectF bezier4Rect = CacheForHealer.bezier4Rect;
            bezier4Rect.set(15.26f, 7.03f, 23.57f, 26.56f);
            Path bezier4Path = CacheForHealer.bezier4Path;
            bezier4Path.reset();
            bezier4Path.moveTo(15.82f, 26.4f);
            bezier4Path.cubicTo(18.37f, 25.12f, 20.75f, 23.67f, 22.2f, 20.93f);
            bezier4Path.cubicTo(23.94f, 17.63f, 23.54f, 11.89f, 23.52f, 11.65f);
            bezier4Path.cubicTo(23.49f, 11.27f, 23.26f, 10.94f, 22.92f, 10.78f);
            bezier4Path.lineTo(15.7f, 7.13f);
            bezier4Path.cubicTo(15.56f, 7.06f, 15.41f, 7.03f, 15.26f, 7.03f);
            bezier4Path.lineTo(15.26f, 26.56f);
            bezier4Path.cubicTo(15.42f, 26.56f, 15.58f, 26.52f, 15.73f, 26.45f);
            bezier4Path.lineTo(15.82f, 26.4f);
            bezier4Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier4Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor51);
            canvas.drawPath(bezier4Path, paint);
            
            // Bezier 5
            RectF bezier5Rect = CacheForHealer.bezier5Rect;
            bezier5Rect.set(7.21f, 7.03f, 15.26f, 12.41f);
            Path bezier5Path = CacheForHealer.bezier5Path;
            bezier5Path.reset();
            bezier5Path.moveTo(9.05f, 12.4f);
            bezier5Path.lineTo(14.81f, 9.44f);
            bezier5Path.cubicTo(14.95f, 9.37f, 15.1f, 9.34f, 15.26f, 9.34f);
            bezier5Path.lineTo(15.26f, 7.03f);
            bezier5Path.cubicTo(15.1f, 7.03f, 14.95f, 7.06f, 14.81f, 7.13f);
            bezier5Path.lineTo(7.59f, 10.78f);
            bezier5Path.cubicTo(7.43f, 10.85f, 7.31f, 10.96f, 7.21f, 11.1f);
            bezier5Path.lineTo(9.05f, 12.41f);
            bezier5Path.lineTo(9.05f, 12.4f);
            bezier5Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier5Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor52);
            canvas.drawPath(bezier5Path, paint);
            
            // Bezier 6
            RectF bezier6Rect = CacheForHealer.bezier6Rect;
            bezier6Rect.set(15.26f, 7.03f, 23.3f, 12.41f);
            Path bezier6Path = CacheForHealer.bezier6Path;
            bezier6Path.reset();
            bezier6Path.moveTo(22.92f, 10.78f);
            bezier6Path.lineTo(15.7f, 7.13f);
            bezier6Path.cubicTo(15.56f, 7.06f, 15.41f, 7.03f, 15.26f, 7.03f);
            bezier6Path.lineTo(15.26f, 9.34f);
            bezier6Path.cubicTo(15.41f, 9.34f, 15.56f, 9.37f, 15.7f, 9.44f);
            bezier6Path.lineTo(21.47f, 12.41f);
            bezier6Path.lineTo(21.47f, 12.41f);
            bezier6Path.lineTo(23.3f, 11.1f);
            bezier6Path.cubicTo(23.2f, 10.96f, 23.08f, 10.85f, 22.92f, 10.78f);
            bezier6Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier6Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor10);
            canvas.drawPath(bezier6Path, paint);
            
            // Bezier 7
            RectF bezier7Rect = CacheForHealer.bezier7Rect;
            bezier7Rect.set(6.94f, 11.1f, 15.26f, 26.56f);
            Path bezier7Path = CacheForHealer.bezier7Path;
            bezier7Path.reset();
            bezier7Path.moveTo(15.05f, 24.24f);
            bezier7Path.cubicTo(12.86f, 23.13f, 11.2f, 21.93f, 10.16f, 19.95f);
            bezier7Path.cubicTo(8.99f, 17.74f, 9f, 13.89f, 9.05f, 12.41f);
            bezier7Path.lineTo(7.21f, 11.1f);
            bezier7Path.cubicTo(7.09f, 11.25f, 7.01f, 11.44f, 6.99f, 11.65f);
            bezier7Path.cubicTo(6.98f, 11.76f, 6.9f, 12.95f, 6.96f, 14.53f);
            bezier7Path.cubicTo(7.04f, 16.51f, 7.34f, 19.09f, 8.31f, 20.93f);
            bezier7Path.cubicTo(9.76f, 23.67f, 12.14f, 25.12f, 14.69f, 26.4f);
            bezier7Path.lineTo(14.79f, 26.45f);
            bezier7Path.cubicTo(14.93f, 26.52f, 15.09f, 26.56f, 15.26f, 26.56f);
            bezier7Path.lineTo(15.26f, 26.56f);
            bezier7Path.lineTo(15.26f, 24.3f);
            bezier7Path.cubicTo(15.2f, 24.3f, 15.15f, 24.28f, 15.05f, 24.24f);
            bezier7Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier7Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor51);
            canvas.drawPath(bezier7Path, paint);
            
            // Bezier 8
            RectF bezier8Rect = CacheForHealer.bezier8Rect;
            bezier8Rect.set(15.26f, 11.09f, 23.57f, 26.56f);
            Path bezier8Path = CacheForHealer.bezier8Path;
            bezier8Path.reset();
            bezier8Path.moveTo(20.35f, 19.95f);
            bezier8Path.cubicTo(19.31f, 21.93f, 17.64f, 23.13f, 15.45f, 24.24f);
            bezier8Path.cubicTo(15.35f, 24.28f, 15.31f, 24.3f, 15.26f, 24.3f);
            bezier8Path.lineTo(15.26f, 26.56f);
            bezier8Path.cubicTo(15.42f, 26.56f, 15.58f, 26.52f, 15.72f, 26.45f);
            bezier8Path.lineTo(15.82f, 26.4f);
            bezier8Path.cubicTo(18.37f, 25.12f, 20.75f, 23.67f, 22.2f, 20.93f);
            bezier8Path.cubicTo(23.17f, 19.09f, 23.47f, 16.51f, 23.55f, 14.53f);
            bezier8Path.cubicTo(23.61f, 12.95f, 23.53f, 11.76f, 23.52f, 11.65f);
            bezier8Path.cubicTo(23.5f, 11.44f, 23.42f, 11.25f, 23.3f, 11.09f);
            bezier8Path.lineTo(21.47f, 12.41f);
            bezier8Path.cubicTo(21.53f, 14.25f, 21.43f, 17.91f, 20.35f, 19.95f);
            bezier8Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier8Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor53);
            canvas.drawPath(bezier8Path, paint);
            
            // Bezier 9
            RectF bezier9Rect = CacheForHealer.bezier9Rect;
            bezier9Rect.set(10.81f, 15.31f, 15.26f, 16.79f);
            Path bezier9Path = CacheForHealer.bezier9Path;
            bezier9Path.reset();
            bezier9Path.moveTo(10.81f, 16.79f);
            bezier9Path.lineTo(13.77f, 15.31f);
            bezier9Path.lineTo(15.26f, 16.79f);
            bezier9Path.lineTo(10.81f, 16.79f);
            bezier9Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier9Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor52);
            canvas.drawPath(bezier9Path, paint);
            
            // Bezier 10
            RectF bezier10Rect = CacheForHealer.bezier10Rect;
            bezier10Rect.set(13.77f, 16.79f, 15.26f, 21.24f);
            Path bezier10Path = CacheForHealer.bezier10Path;
            bezier10Path.reset();
            bezier10Path.moveTo(15.26f, 21.24f);
            bezier10Path.lineTo(13.77f, 18.28f);
            bezier10Path.lineTo(15.26f, 16.79f);
            bezier10Path.lineTo(15.26f, 21.24f);
            bezier10Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier10Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor52);
            canvas.drawPath(bezier10Path, paint);
            
            // Bezier 11
            RectF bezier11Rect = CacheForHealer.bezier11Rect;
            bezier11Rect.set(15.26f, 16.79f, 19.7f, 18.28f);
            Path bezier11Path = CacheForHealer.bezier11Path;
            bezier11Path.reset();
            bezier11Path.moveTo(19.7f, 16.79f);
            bezier11Path.lineTo(16.74f, 18.28f);
            bezier11Path.lineTo(15.26f, 16.79f);
            bezier11Path.lineTo(19.7f, 16.79f);
            bezier11Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier11Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor53);
            canvas.drawPath(bezier11Path, paint);
            
            // Bezier 12
            RectF bezier12Rect = CacheForHealer.bezier12Rect;
            bezier12Rect.set(15.26f, 12.35f, 16.74f, 16.79f);
            Path bezier12Path = CacheForHealer.bezier12Path;
            bezier12Path.reset();
            bezier12Path.moveTo(15.26f, 12.35f);
            bezier12Path.lineTo(16.74f, 15.31f);
            bezier12Path.lineTo(15.26f, 16.79f);
            bezier12Path.lineTo(15.26f, 12.35f);
            bezier12Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier12Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor53);
            canvas.drawPath(bezier12Path, paint);
            
            // Bezier 13
            RectF bezier13Rect = CacheForHealer.bezier13Rect;
            bezier13Rect.set(15.26f, 15.31f, 19.7f, 16.79f);
            Path bezier13Path = CacheForHealer.bezier13Path;
            bezier13Path.reset();
            bezier13Path.moveTo(19.7f, 16.79f);
            bezier13Path.lineTo(16.74f, 15.31f);
            bezier13Path.lineTo(15.26f, 16.79f);
            bezier13Path.lineTo(19.7f, 16.79f);
            bezier13Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier13Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor53);
            canvas.drawPath(bezier13Path, paint);
            
            // Bezier 14
            RectF bezier14Rect = CacheForHealer.bezier14Rect;
            bezier14Rect.set(15.26f, 16.79f, 16.74f, 21.24f);
            Path bezier14Path = CacheForHealer.bezier14Path;
            bezier14Path.reset();
            bezier14Path.moveTo(15.26f, 21.24f);
            bezier14Path.lineTo(16.74f, 18.28f);
            bezier14Path.lineTo(15.26f, 16.79f);
            bezier14Path.lineTo(15.26f, 21.24f);
            bezier14Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier14Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor53);
            canvas.drawPath(bezier14Path, paint);
            
            // Bezier 15
            RectF bezier15Rect = CacheForHealer.bezier15Rect;
            bezier15Rect.set(10.81f, 16.79f, 15.26f, 18.28f);
            Path bezier15Path = CacheForHealer.bezier15Path;
            bezier15Path.reset();
            bezier15Path.moveTo(10.81f, 16.79f);
            bezier15Path.lineTo(13.77f, 18.28f);
            bezier15Path.lineTo(15.26f, 16.79f);
            bezier15Path.lineTo(10.81f, 16.79f);
            bezier15Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier15Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor52);
            canvas.drawPath(bezier15Path, paint);
            
            // Bezier 16
            RectF bezier16Rect = CacheForHealer.bezier16Rect;
            bezier16Rect.set(13.77f, 12.35f, 15.26f, 16.79f);
            Path bezier16Path = CacheForHealer.bezier16Path;
            bezier16Path.reset();
            bezier16Path.moveTo(15.26f, 12.35f);
            bezier16Path.lineTo(13.77f, 15.31f);
            bezier16Path.lineTo(15.26f, 16.79f);
            bezier16Path.lineTo(15.26f, 12.35f);
            bezier16Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier16Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor52);
            canvas.drawPath(bezier16Path, paint);
        }
        
        // Group 3
        if (lightBackground) {
            // Bezier 17
            RectF bezier17Rect = CacheForHealer.bezier17Rect;
            bezier17Rect.set(4.98f, 4.79f, 25.53f, 28.79f);
            Path bezier17Path = CacheForHealer.bezier17Path;
            bezier17Path.reset();
            bezier17Path.moveTo(15.26f, 28.79f);
            bezier17Path.cubicTo(15.26f, 28.79f, 14.32f, 28.41f, 13.91f, 28.2f);
            bezier17Path.lineTo(13.81f, 28.15f);
            bezier17Path.cubicTo(11.14f, 26.81f, 8.32f, 25.14f, 6.58f, 21.85f);
            bezier17Path.cubicTo(4.62f, 18.12f, 5f, 12.18f, 5.04f, 11.51f);
            bezier17Path.cubicTo(5.08f, 10.99f, 5.24f, 9.71f, 5.24f, 9.71f);
            bezier17Path.cubicTo(5.24f, 9.71f, 6.25f, 9.26f, 6.75f, 9.03f);
            bezier17Path.lineTo(13.97f, 5.37f);
            bezier17Path.cubicTo(14.37f, 5.18f, 15.26f, 4.79f, 15.26f, 4.79f);
            bezier17Path.cubicTo(15.26f, 4.79f, 16.14f, 5.18f, 16.54f, 5.37f);
            bezier17Path.lineTo(23.76f, 9.02f);
            bezier17Path.cubicTo(24.26f, 9.26f, 25.35f, 9.71f, 25.35f, 9.71f);
            bezier17Path.cubicTo(25.35f, 9.71f, 25.43f, 10.99f, 25.47f, 11.51f);
            bezier17Path.cubicTo(25.52f, 12.18f, 25.89f, 18.12f, 23.93f, 21.85f);
            bezier17Path.cubicTo(22.19f, 25.14f, 19.37f, 26.81f, 16.7f, 28.15f);
            bezier17Path.lineTo(16.6f, 28.2f);
            bezier17Path.cubicTo(16.19f, 28.41f, 15.26f, 28.79f, 15.26f, 28.79f);
            bezier17Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier17Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor54);
            canvas.drawPath(bezier17Path, paint);
            
            // Bezier 18
            RectF bezier18Rect = CacheForHealer.bezier18Rect;
            bezier18Rect.set(7.21f, 7.04f, 15.26f, 12.42f);
            Path bezier18Path = CacheForHealer.bezier18Path;
            bezier18Path.reset();
            bezier18Path.moveTo(9.05f, 12.41f);
            bezier18Path.lineTo(14.81f, 9.44f);
            bezier18Path.cubicTo(14.95f, 9.38f, 15.1f, 9.34f, 15.26f, 9.34f);
            bezier18Path.lineTo(15.26f, 7.04f);
            bezier18Path.cubicTo(15.1f, 7.04f, 14.95f, 7.07f, 14.81f, 7.14f);
            bezier18Path.lineTo(7.59f, 10.79f);
            bezier18Path.cubicTo(7.43f, 10.86f, 7.31f, 10.97f, 7.21f, 11.1f);
            bezier18Path.lineTo(9.05f, 12.42f);
            bezier18Path.lineTo(9.05f, 12.41f);
            bezier18Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier18Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor50);
            canvas.drawPath(bezier18Path, paint);
            
            // Bezier 19
            RectF bezier19Rect = CacheForHealer.bezier19Rect;
            bezier19Rect.set(6.94f, 7.03f, 15.26f, 26.56f);
            Path bezier19Path = CacheForHealer.bezier19Path;
            bezier19Path.reset();
            bezier19Path.moveTo(14.81f, 7.13f);
            bezier19Path.lineTo(7.59f, 10.78f);
            bezier19Path.cubicTo(7.25f, 10.94f, 7.02f, 11.27f, 6.99f, 11.65f);
            bezier19Path.cubicTo(6.97f, 11.89f, 6.57f, 17.63f, 8.31f, 20.93f);
            bezier19Path.cubicTo(9.76f, 23.67f, 12.14f, 25.12f, 14.69f, 26.4f);
            bezier19Path.lineTo(14.79f, 26.45f);
            bezier19Path.cubicTo(14.93f, 26.52f, 15.09f, 26.56f, 15.26f, 26.56f);
            bezier19Path.lineTo(15.26f, 26.56f);
            bezier19Path.lineTo(15.26f, 7.03f);
            bezier19Path.cubicTo(15.1f, 7.03f, 14.95f, 7.06f, 14.81f, 7.13f);
            bezier19Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier19Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor55);
            canvas.drawPath(bezier19Path, paint);
            
            // Bezier 20
            RectF bezier20Rect = CacheForHealer.bezier20Rect;
            bezier20Rect.set(15.26f, 7.03f, 23.57f, 26.56f);
            Path bezier20Path = CacheForHealer.bezier20Path;
            bezier20Path.reset();
            bezier20Path.moveTo(15.73f, 26.45f);
            bezier20Path.lineTo(15.82f, 26.4f);
            bezier20Path.cubicTo(18.37f, 25.12f, 20.75f, 23.67f, 22.2f, 20.93f);
            bezier20Path.cubicTo(23.94f, 17.63f, 23.54f, 11.89f, 23.52f, 11.65f);
            bezier20Path.cubicTo(23.49f, 11.27f, 23.26f, 10.94f, 22.92f, 10.78f);
            bezier20Path.lineTo(15.7f, 7.13f);
            bezier20Path.cubicTo(15.56f, 7.06f, 15.41f, 7.03f, 15.26f, 7.03f);
            bezier20Path.lineTo(15.26f, 26.56f);
            bezier20Path.cubicTo(15.42f, 26.56f, 15.58f, 26.52f, 15.73f, 26.45f);
            bezier20Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier20Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor56);
            canvas.drawPath(bezier20Path, paint);
            
            // Bezier 21
            RectF bezier21Rect = CacheForHealer.bezier21Rect;
            bezier21Rect.set(7.21f, 7.03f, 15.26f, 12.41f);
            Path bezier21Path = CacheForHealer.bezier21Path;
            bezier21Path.reset();
            bezier21Path.moveTo(9.05f, 12.4f);
            bezier21Path.lineTo(14.81f, 9.44f);
            bezier21Path.cubicTo(14.95f, 9.37f, 15.1f, 9.34f, 15.26f, 9.34f);
            bezier21Path.lineTo(15.26f, 7.03f);
            bezier21Path.cubicTo(15.1f, 7.03f, 14.95f, 7.06f, 14.81f, 7.13f);
            bezier21Path.lineTo(7.59f, 10.78f);
            bezier21Path.cubicTo(7.43f, 10.85f, 7.31f, 10.96f, 7.21f, 11.1f);
            bezier21Path.lineTo(9.05f, 12.41f);
            bezier21Path.lineTo(9.05f, 12.4f);
            bezier21Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier21Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor57);
            canvas.drawPath(bezier21Path, paint);
            
            // Bezier 22
            RectF bezier22Rect = CacheForHealer.bezier22Rect;
            bezier22Rect.set(15.26f, 7.03f, 23.3f, 12.41f);
            Path bezier22Path = CacheForHealer.bezier22Path;
            bezier22Path.reset();
            bezier22Path.moveTo(22.92f, 10.78f);
            bezier22Path.lineTo(15.7f, 7.13f);
            bezier22Path.cubicTo(15.56f, 7.06f, 15.41f, 7.03f, 15.26f, 7.03f);
            bezier22Path.lineTo(15.26f, 9.34f);
            bezier22Path.cubicTo(15.41f, 9.34f, 15.56f, 9.37f, 15.7f, 9.44f);
            bezier22Path.lineTo(21.47f, 12.41f);
            bezier22Path.lineTo(21.47f, 12.41f);
            bezier22Path.lineTo(23.3f, 11.1f);
            bezier22Path.cubicTo(23.2f, 10.96f, 23.08f, 10.85f, 22.92f, 10.78f);
            bezier22Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier22Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor55);
            canvas.drawPath(bezier22Path, paint);
            
            // Bezier 23
            RectF bezier23Rect = CacheForHealer.bezier23Rect;
            bezier23Rect.set(6.94f, 11.1f, 15.26f, 26.56f);
            Path bezier23Path = CacheForHealer.bezier23Path;
            bezier23Path.reset();
            bezier23Path.moveTo(15.05f, 24.24f);
            bezier23Path.cubicTo(12.86f, 23.13f, 11.2f, 21.93f, 10.16f, 19.95f);
            bezier23Path.cubicTo(8.99f, 17.74f, 9f, 13.89f, 9.05f, 12.41f);
            bezier23Path.lineTo(7.21f, 11.1f);
            bezier23Path.cubicTo(7.09f, 11.25f, 7.01f, 11.44f, 6.99f, 11.65f);
            bezier23Path.cubicTo(6.98f, 11.76f, 6.9f, 12.95f, 6.96f, 14.53f);
            bezier23Path.cubicTo(7.04f, 16.51f, 7.34f, 19.09f, 8.31f, 20.93f);
            bezier23Path.cubicTo(9.76f, 23.67f, 12.14f, 25.12f, 14.69f, 26.4f);
            bezier23Path.lineTo(14.79f, 26.45f);
            bezier23Path.cubicTo(14.93f, 26.52f, 15.09f, 26.56f, 15.26f, 26.56f);
            bezier23Path.lineTo(15.26f, 26.56f);
            bezier23Path.lineTo(15.26f, 24.3f);
            bezier23Path.cubicTo(15.2f, 24.3f, 15.15f, 24.28f, 15.05f, 24.24f);
            bezier23Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier23Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor56);
            canvas.drawPath(bezier23Path, paint);
            
            // Bezier 24
            RectF bezier24Rect = CacheForHealer.bezier24Rect;
            bezier24Rect.set(15.26f, 11.09f, 23.57f, 26.56f);
            Path bezier24Path = CacheForHealer.bezier24Path;
            bezier24Path.reset();
            bezier24Path.moveTo(20.35f, 19.95f);
            bezier24Path.cubicTo(19.31f, 21.93f, 17.64f, 23.13f, 15.45f, 24.24f);
            bezier24Path.cubicTo(15.35f, 24.28f, 15.31f, 24.3f, 15.26f, 24.3f);
            bezier24Path.lineTo(15.26f, 26.56f);
            bezier24Path.cubicTo(15.42f, 26.56f, 15.58f, 26.52f, 15.72f, 26.45f);
            bezier24Path.lineTo(15.82f, 26.4f);
            bezier24Path.cubicTo(18.37f, 25.12f, 20.75f, 23.67f, 22.2f, 20.93f);
            bezier24Path.cubicTo(23.17f, 19.09f, 23.47f, 16.51f, 23.55f, 14.53f);
            bezier24Path.cubicTo(23.61f, 12.95f, 23.53f, 11.76f, 23.52f, 11.65f);
            bezier24Path.cubicTo(23.5f, 11.44f, 23.42f, 11.25f, 23.3f, 11.09f);
            bezier24Path.lineTo(21.47f, 12.41f);
            bezier24Path.cubicTo(21.53f, 14.25f, 21.43f, 17.91f, 20.35f, 19.95f);
            bezier24Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier24Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor58);
            canvas.drawPath(bezier24Path, paint);
            
            // Bezier 25
            RectF bezier25Rect = CacheForHealer.bezier25Rect;
            bezier25Rect.set(10.81f, 15.31f, 15.26f, 16.79f);
            Path bezier25Path = CacheForHealer.bezier25Path;
            bezier25Path.reset();
            bezier25Path.moveTo(10.81f, 16.79f);
            bezier25Path.lineTo(13.77f, 15.31f);
            bezier25Path.lineTo(15.26f, 16.79f);
            bezier25Path.lineTo(10.81f, 16.79f);
            bezier25Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier25Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor59);
            canvas.drawPath(bezier25Path, paint);
            
            // Bezier 26
            RectF bezier26Rect = CacheForHealer.bezier26Rect;
            bezier26Rect.set(13.77f, 16.79f, 15.26f, 21.24f);
            Path bezier26Path = CacheForHealer.bezier26Path;
            bezier26Path.reset();
            bezier26Path.moveTo(15.26f, 21.24f);
            bezier26Path.lineTo(13.77f, 18.28f);
            bezier26Path.lineTo(15.26f, 16.79f);
            bezier26Path.lineTo(15.26f, 21.24f);
            bezier26Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier26Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor59);
            canvas.drawPath(bezier26Path, paint);
            
            // Bezier 27
            RectF bezier27Rect = CacheForHealer.bezier27Rect;
            bezier27Rect.set(15.26f, 16.79f, 19.7f, 18.28f);
            Path bezier27Path = CacheForHealer.bezier27Path;
            bezier27Path.reset();
            bezier27Path.moveTo(19.7f, 16.79f);
            bezier27Path.lineTo(16.74f, 18.28f);
            bezier27Path.lineTo(15.26f, 16.79f);
            bezier27Path.lineTo(19.7f, 16.79f);
            bezier27Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier27Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor58);
            canvas.drawPath(bezier27Path, paint);
            
            // Bezier 28
            RectF bezier28Rect = CacheForHealer.bezier28Rect;
            bezier28Rect.set(15.26f, 12.35f, 16.74f, 16.79f);
            Path bezier28Path = CacheForHealer.bezier28Path;
            bezier28Path.reset();
            bezier28Path.moveTo(15.26f, 12.35f);
            bezier28Path.lineTo(16.74f, 15.31f);
            bezier28Path.lineTo(15.26f, 16.79f);
            bezier28Path.lineTo(15.26f, 12.35f);
            bezier28Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier28Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor58);
            canvas.drawPath(bezier28Path, paint);
            
            // Bezier 29
            RectF bezier29Rect = CacheForHealer.bezier29Rect;
            bezier29Rect.set(15.26f, 15.31f, 19.7f, 16.79f);
            Path bezier29Path = CacheForHealer.bezier29Path;
            bezier29Path.reset();
            bezier29Path.moveTo(19.7f, 16.79f);
            bezier29Path.lineTo(16.74f, 15.31f);
            bezier29Path.lineTo(15.26f, 16.79f);
            bezier29Path.lineTo(19.7f, 16.79f);
            bezier29Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier29Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor58);
            canvas.drawPath(bezier29Path, paint);
            
            // Bezier 30
            RectF bezier30Rect = CacheForHealer.bezier30Rect;
            bezier30Rect.set(15.26f, 16.79f, 16.74f, 21.24f);
            Path bezier30Path = CacheForHealer.bezier30Path;
            bezier30Path.reset();
            bezier30Path.moveTo(15.26f, 21.24f);
            bezier30Path.lineTo(16.74f, 18.28f);
            bezier30Path.lineTo(15.26f, 16.79f);
            bezier30Path.lineTo(15.26f, 21.24f);
            bezier30Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier30Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor58);
            canvas.drawPath(bezier30Path, paint);
            
            // Bezier 31
            RectF bezier31Rect = CacheForHealer.bezier31Rect;
            bezier31Rect.set(10.81f, 16.79f, 15.26f, 18.28f);
            Path bezier31Path = CacheForHealer.bezier31Path;
            bezier31Path.reset();
            bezier31Path.moveTo(10.81f, 16.79f);
            bezier31Path.lineTo(13.77f, 18.28f);
            bezier31Path.lineTo(15.26f, 16.79f);
            bezier31Path.lineTo(10.81f, 16.79f);
            bezier31Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier31Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor59);
            canvas.drawPath(bezier31Path, paint);
            
            // Bezier 32
            RectF bezier32Rect = CacheForHealer.bezier32Rect;
            bezier32Rect.set(13.77f, 12.35f, 15.26f, 16.79f);
            Path bezier32Path = CacheForHealer.bezier32Path;
            bezier32Path.reset();
            bezier32Path.moveTo(15.26f, 12.35f);
            bezier32Path.lineTo(13.77f, 15.31f);
            bezier32Path.lineTo(15.26f, 16.79f);
            bezier32Path.lineTo(15.26f, 12.35f);
            bezier32Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier32Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor59);
            canvas.drawPath(bezier32Path, paint);
        }
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawHealerLightBg(Canvas canvas) {
        HabiticaIcons.drawHealerLightBg(canvas, new RectF(0f, 0f, 32f, 32f), ResizingBehavior.AspectFit);
    }
    
    public static void drawHealerLightBg(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForHealerLightBg.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForHealerLightBg.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 32f, resizedFrame.height() / 32f);
        
        // Symbol
        RectF symbolRect = CacheForHealerLightBg.symbolRect;
        symbolRect.set(0f, 0f, 32f, 32f);
        canvas.save();
        canvas.clipRect(symbolRect);
        canvas.translate(symbolRect.left, symbolRect.top);
        RectF symbolTargetRect = CacheForHealerLightBg.symbolTargetRect;
        symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
        HabiticaIcons.drawHealer(canvas, symbolTargetRect, ResizingBehavior.Stretch, false);
        canvas.restore();
        
        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();
    }
    
    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;
        
        // Local Colors
        int fillColor60 = Color.argb(255, 182, 225, 247);
        int fillColor64 = Color.argb(255, 77, 178, 214);
        int fillColor69 = Color.argb(255, 169, 219, 245);
        int fillColor61 = Color.argb(255, 39, 138, 191);
        int fillColor66 = Color.argb(255, 107, 196, 233);
        int fillColor63 = Color.argb(255, 42, 160, 207);
        int fillColor68 = Color.argb(255, 31, 110, 162);
        int fillColor65 = Color.argb(255, 107, 196, 233);
        int fillColor70 = Color.argb(255, 132, 207, 242);
        int fillColor62 = Color.argb(255, 83, 180, 229);
        int fillColor67 = Color.argb(255, 83, 180, 229);
        
        // Local Variables
        boolean lightBackground = !darkBackground;
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForMage.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForMage.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 32f, resizedFrame.height() / 32f);
        
        // Group 2
        if (darkBackground) {
            // Bezier
            RectF bezierRect = CacheForMage.bezierRect;
            bezierRect.set(3.74f, 5.08f, 27.74f, 28.73f);
            Path bezierPath = CacheForMage.bezierPath;
            bezierPath.reset();
            bezierPath.moveTo(15.74f, 5.08f);
            bezierPath.cubicTo(13.82f, 7.01f, 11.93f, 12.69f, 10.93f, 15.97f);
            bezierPath.cubicTo(10.49f, 15.42f, 9.99f, 14.89f, 9.29f, 14.24f);
            bezierPath.cubicTo(6.78f, 16.07f, 5.45f, 18.01f, 3.74f, 20.39f);
            bezierPath.cubicTo(8.38f, 24.52f, 9.59f, 25.21f, 15.72f, 28.73f);
            bezierPath.lineTo(15.74f, 28.72f);
            bezierPath.lineTo(15.74f, 28.72f);
            bezierPath.lineTo(15.76f, 28.73f);
            bezierPath.cubicTo(21.89f, 25.21f, 23.1f, 24.52f, 27.74f, 20.39f);
            bezierPath.cubicTo(26.03f, 18.01f, 24.7f, 16.07f, 22.2f, 14.24f);
            bezierPath.cubicTo(21.49f, 14.89f, 20.99f, 15.42f, 20.55f, 15.97f);
            bezierPath.cubicTo(19.55f, 12.69f, 17.66f, 7.01f, 15.74f, 5.08f);
            bezierPath.lineTo(15.74f, 5.08f);
            bezierPath.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezierPath.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor60);
            canvas.drawPath(bezierPath, paint);
            
            // Bezier 2
            RectF bezier2Rect = CacheForMage.bezier2Rect;
            bezier2Rect.set(15.74f, 18.72f, 25.66f, 26.81f);
            Path bezier2Path = CacheForMage.bezier2Path;
            bezier2Path.reset();
            bezier2Path.moveTo(15.74f, 21.2f);
            bezier2Path.lineTo(17.6f, 20.54f);
            bezier2Path.cubicTo(20.76f, 20.23f, 21.98f, 19.36f, 22.51f, 18.72f);
            bezier2Path.lineTo(25.66f, 20.13f);
            bezier2Path.cubicTo(25.66f, 20.13f, 25.66f, 20.14f, 25.66f, 20.14f);
            bezier2Path.cubicTo(25.66f, 20.19f, 25.64f, 20.24f, 25.6f, 20.29f);
            bezier2Path.cubicTo(25.56f, 20.34f, 25.5f, 20.4f, 25.44f, 20.46f);
            bezier2Path.cubicTo(23.66f, 22.19f, 15.94f, 26.7f, 15.74f, 26.81f);
            bezier2Path.lineTo(15.74f, 26.81f);
            bezier2Path.lineTo(15.74f, 21.2f);
            bezier2Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier2Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor61);
            canvas.drawPath(bezier2Path, paint);
            
            // Bezier 3
            RectF bezier3Rect = CacheForMage.bezier3Rect;
            bezier3Rect.set(20.73f, 16.3f, 25.66f, 20.13f);
            Path bezier3Path = CacheForMage.bezier3Path;
            bezier3Path.reset();
            bezier3Path.moveTo(21.96f, 16.48f);
            bezier3Path.cubicTo(22.08f, 16.38f, 22.11f, 16.3f, 22.31f, 16.3f);
            bezier3Path.cubicTo(22.93f, 16.34f, 25f, 19f, 25.47f, 19.67f);
            bezier3Path.cubicTo(25.57f, 19.81f, 25.66f, 19.99f, 25.66f, 20.13f);
            bezier3Path.lineTo(22.51f, 18.72f);
            bezier3Path.cubicTo(22.63f, 18.53f, 22.6f, 18.24f, 22.32f, 18.07f);
            bezier3Path.cubicTo(21.89f, 17.81f, 21f, 18.56f, 20.78f, 18.22f);
            bezier3Path.cubicTo(20.47f, 17.73f, 21.84f, 16.58f, 21.96f, 16.48f);
            bezier3Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier3Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor62);
            canvas.drawPath(bezier3Path, paint);
            
            // Bezier 4
            RectF bezier4Rect = CacheForMage.bezier4Rect;
            bezier4Rect.set(11f, 8.04f, 15.74f, 23.26f);
            Path bezier4Path = CacheForMage.bezier4Path;
            bezier4Path.reset();
            bezier4Path.moveTo(15.29f, 8.38f);
            bezier4Path.cubicTo(12.48f, 16.41f, 11f, 20.78f, 11f, 20.78f);
            bezier4Path.lineTo(15.74f, 23.26f);
            bezier4Path.lineTo(15.74f, 8.04f);
            bezier4Path.cubicTo(15.55f, 8.04f, 15.37f, 8.15f, 15.29f, 8.38f);
            bezier4Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier4Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor63);
            canvas.drawPath(bezier4Path, paint);
            
            // Bezier 5
            RectF bezier5Rect = CacheForMage.bezier5Rect;
            bezier5Rect.set(15.74f, 8.04f, 20.48f, 23.26f);
            Path bezier5Path = CacheForMage.bezier5Path;
            bezier5Path.reset();
            bezier5Path.moveTo(16.19f, 8.38f);
            bezier5Path.cubicTo(16.11f, 8.15f, 15.93f, 8.04f, 15.74f, 8.04f);
            bezier5Path.lineTo(15.74f, 23.26f);
            bezier5Path.lineTo(20.48f, 20.78f);
            bezier5Path.cubicTo(20.48f, 20.78f, 19f, 16.41f, 16.19f, 8.38f);
            bezier5Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier5Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor61);
            canvas.drawPath(bezier5Path, paint);
            
            // Bezier 6
            RectF bezier6Rect = CacheForMage.bezier6Rect;
            bezier6Rect.set(5.82f, 18.72f, 15.74f, 26.81f);
            Path bezier6Path = CacheForMage.bezier6Path;
            bezier6Path.reset();
            bezier6Path.moveTo(15.74f, 21.2f);
            bezier6Path.lineTo(13.89f, 20.54f);
            bezier6Path.cubicTo(10.72f, 20.23f, 9.54f, 19.32f, 8.98f, 18.72f);
            bezier6Path.lineTo(5.82f, 20.13f);
            bezier6Path.cubicTo(5.82f, 20.13f, 5.82f, 20.14f, 5.82f, 20.14f);
            bezier6Path.cubicTo(5.83f, 20.19f, 5.84f, 20.24f, 5.88f, 20.29f);
            bezier6Path.cubicTo(5.92f, 20.34f, 5.98f, 20.4f, 6.04f, 20.46f);
            bezier6Path.cubicTo(7.82f, 22.19f, 15.54f, 26.7f, 15.74f, 26.81f);
            bezier6Path.lineTo(15.74f, 26.81f);
            bezier6Path.lineTo(15.74f, 21.2f);
            bezier6Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier6Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor64);
            canvas.drawPath(bezier6Path, paint);
            
            // Bezier 7
            RectF bezier7Rect = CacheForMage.bezier7Rect;
            bezier7Rect.set(5.82f, 16.3f, 10.75f, 20.13f);
            Path bezier7Path = CacheForMage.bezier7Path;
            bezier7Path.reset();
            bezier7Path.moveTo(9.52f, 16.48f);
            bezier7Path.cubicTo(9.4f, 16.38f, 9.37f, 16.3f, 9.17f, 16.3f);
            bezier7Path.cubicTo(8.55f, 16.34f, 6.48f, 19f, 6.01f, 19.67f);
            bezier7Path.cubicTo(5.91f, 19.81f, 5.82f, 19.99f, 5.82f, 20.13f);
            bezier7Path.lineTo(8.98f, 18.72f);
            bezier7Path.cubicTo(8.85f, 18.53f, 8.88f, 18.24f, 9.16f, 18.07f);
            bezier7Path.cubicTo(9.59f, 17.81f, 10.48f, 18.56f, 10.7f, 18.22f);
            bezier7Path.cubicTo(11.01f, 17.73f, 9.64f, 16.58f, 9.52f, 16.48f);
            bezier7Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier7Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor65);
            canvas.drawPath(bezier7Path, paint);
            
            // Bezier 8
            RectF bezier8Rect = CacheForMage.bezier8Rect;
            bezier8Rect.set(11.22f, 17.9f, 15.74f, 22.71f);
            Path bezier8Path = CacheForMage.bezier8Path;
            bezier8Path.reset();
            bezier8Path.moveTo(15.74f, 22.71f);
            bezier8Path.lineTo(15.74f, 20.05f);
            bezier8Path.lineTo(11.99f, 17.9f);
            bezier8Path.lineTo(11.22f, 20.01f);
            bezier8Path.lineTo(15.74f, 22.71f);
            bezier8Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier8Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor66);
            canvas.drawPath(bezier8Path, paint);
            
            // Bezier 9
            RectF bezier9Rect = CacheForMage.bezier9Rect;
            bezier9Rect.set(15.74f, 17.9f, 20.27f, 22.71f);
            Path bezier9Path = CacheForMage.bezier9Path;
            bezier9Path.reset();
            bezier9Path.moveTo(15.74f, 22.71f);
            bezier9Path.lineTo(15.74f, 20.05f);
            bezier9Path.lineTo(19.5f, 17.9f);
            bezier9Path.lineTo(20.27f, 20.01f);
            bezier9Path.lineTo(15.74f, 22.71f);
            bezier9Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier9Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor67);
            canvas.drawPath(bezier9Path, paint);
        }
        
        // Group 3
        if (lightBackground) {
            // Bezier 10
            RectF bezier10Rect = CacheForMage.bezier10Rect;
            bezier10Rect.set(3.74f, 5.08f, 27.74f, 28.73f);
            Path bezier10Path = CacheForMage.bezier10Path;
            bezier10Path.reset();
            bezier10Path.moveTo(15.74f, 5.08f);
            bezier10Path.cubicTo(13.82f, 7.01f, 11.93f, 12.69f, 10.93f, 15.97f);
            bezier10Path.cubicTo(10.49f, 15.42f, 9.99f, 14.89f, 9.29f, 14.24f);
            bezier10Path.cubicTo(6.78f, 16.07f, 5.45f, 18.01f, 3.74f, 20.39f);
            bezier10Path.cubicTo(8.38f, 24.52f, 9.59f, 25.21f, 15.72f, 28.73f);
            bezier10Path.lineTo(15.74f, 28.72f);
            bezier10Path.lineTo(15.74f, 28.72f);
            bezier10Path.lineTo(15.76f, 28.73f);
            bezier10Path.cubicTo(21.89f, 25.21f, 23.1f, 24.52f, 27.74f, 20.39f);
            bezier10Path.cubicTo(26.03f, 18.01f, 24.7f, 16.07f, 22.2f, 14.24f);
            bezier10Path.cubicTo(21.49f, 14.89f, 20.99f, 15.42f, 20.55f, 15.97f);
            bezier10Path.cubicTo(19.55f, 12.69f, 17.66f, 7.01f, 15.74f, 5.08f);
            bezier10Path.lineTo(15.74f, 5.08f);
            bezier10Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier10Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor68);
            canvas.drawPath(bezier10Path, paint);
            
            // Bezier 11
            RectF bezier11Rect = CacheForMage.bezier11Rect;
            bezier11Rect.set(15.74f, 18.72f, 25.66f, 26.81f);
            Path bezier11Path = CacheForMage.bezier11Path;
            bezier11Path.reset();
            bezier11Path.moveTo(15.74f, 21.2f);
            bezier11Path.lineTo(17.6f, 20.54f);
            bezier11Path.cubicTo(20.76f, 20.23f, 21.98f, 19.36f, 22.51f, 18.72f);
            bezier11Path.lineTo(25.66f, 20.13f);
            bezier11Path.cubicTo(25.66f, 20.13f, 25.66f, 20.14f, 25.66f, 20.14f);
            bezier11Path.cubicTo(25.66f, 20.19f, 25.64f, 20.24f, 25.6f, 20.29f);
            bezier11Path.cubicTo(25.56f, 20.34f, 25.5f, 20.4f, 25.44f, 20.46f);
            bezier11Path.cubicTo(23.66f, 22.19f, 15.94f, 26.7f, 15.74f, 26.81f);
            bezier11Path.lineTo(15.74f, 26.81f);
            bezier11Path.lineTo(15.74f, 21.2f);
            bezier11Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier11Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor61);
            canvas.drawPath(bezier11Path, paint);
            
            // Bezier 12
            RectF bezier12Rect = CacheForMage.bezier12Rect;
            bezier12Rect.set(20.73f, 16.3f, 25.66f, 20.13f);
            Path bezier12Path = CacheForMage.bezier12Path;
            bezier12Path.reset();
            bezier12Path.moveTo(21.96f, 16.48f);
            bezier12Path.cubicTo(22.08f, 16.38f, 22.11f, 16.3f, 22.31f, 16.3f);
            bezier12Path.cubicTo(22.93f, 16.34f, 25f, 19f, 25.47f, 19.67f);
            bezier12Path.cubicTo(25.57f, 19.81f, 25.66f, 19.99f, 25.66f, 20.13f);
            bezier12Path.lineTo(22.51f, 18.72f);
            bezier12Path.cubicTo(22.63f, 18.53f, 22.6f, 18.24f, 22.32f, 18.07f);
            bezier12Path.cubicTo(21.89f, 17.81f, 21f, 18.56f, 20.78f, 18.22f);
            bezier12Path.cubicTo(20.47f, 17.73f, 21.84f, 16.58f, 21.96f, 16.48f);
            bezier12Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier12Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor62);
            canvas.drawPath(bezier12Path, paint);
            
            // Bezier 13
            RectF bezier13Rect = CacheForMage.bezier13Rect;
            bezier13Rect.set(11f, 8.04f, 15.74f, 23.26f);
            Path bezier13Path = CacheForMage.bezier13Path;
            bezier13Path.reset();
            bezier13Path.moveTo(15.29f, 8.38f);
            bezier13Path.cubicTo(12.48f, 16.41f, 11f, 20.78f, 11f, 20.78f);
            bezier13Path.lineTo(15.74f, 23.26f);
            bezier13Path.lineTo(15.74f, 8.04f);
            bezier13Path.cubicTo(15.55f, 8.04f, 15.37f, 8.15f, 15.29f, 8.38f);
            bezier13Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier13Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor63);
            canvas.drawPath(bezier13Path, paint);
            
            // Bezier 14
            RectF bezier14Rect = CacheForMage.bezier14Rect;
            bezier14Rect.set(15.74f, 8.04f, 20.48f, 23.26f);
            Path bezier14Path = CacheForMage.bezier14Path;
            bezier14Path.reset();
            bezier14Path.moveTo(16.19f, 8.38f);
            bezier14Path.cubicTo(16.11f, 8.15f, 15.93f, 8.04f, 15.74f, 8.04f);
            bezier14Path.lineTo(15.74f, 23.26f);
            bezier14Path.lineTo(20.48f, 20.78f);
            bezier14Path.cubicTo(20.48f, 20.78f, 19f, 16.41f, 16.19f, 8.38f);
            bezier14Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier14Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor61);
            canvas.drawPath(bezier14Path, paint);
            
            // Bezier 15
            RectF bezier15Rect = CacheForMage.bezier15Rect;
            bezier15Rect.set(5.82f, 18.72f, 15.74f, 26.81f);
            Path bezier15Path = CacheForMage.bezier15Path;
            bezier15Path.reset();
            bezier15Path.moveTo(15.74f, 21.2f);
            bezier15Path.lineTo(13.89f, 20.54f);
            bezier15Path.cubicTo(10.72f, 20.23f, 9.54f, 19.32f, 8.98f, 18.72f);
            bezier15Path.lineTo(5.82f, 20.13f);
            bezier15Path.cubicTo(5.82f, 20.13f, 5.82f, 20.14f, 5.82f, 20.14f);
            bezier15Path.cubicTo(5.83f, 20.19f, 5.84f, 20.24f, 5.88f, 20.29f);
            bezier15Path.cubicTo(5.92f, 20.34f, 5.98f, 20.4f, 6.04f, 20.46f);
            bezier15Path.cubicTo(7.82f, 22.19f, 15.54f, 26.7f, 15.74f, 26.81f);
            bezier15Path.lineTo(15.74f, 26.81f);
            bezier15Path.lineTo(15.74f, 21.2f);
            bezier15Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier15Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor64);
            canvas.drawPath(bezier15Path, paint);
            
            // Bezier 16
            RectF bezier16Rect = CacheForMage.bezier16Rect;
            bezier16Rect.set(5.82f, 16.3f, 10.75f, 20.13f);
            Path bezier16Path = CacheForMage.bezier16Path;
            bezier16Path.reset();
            bezier16Path.moveTo(9.52f, 16.48f);
            bezier16Path.cubicTo(9.4f, 16.38f, 9.37f, 16.3f, 9.17f, 16.3f);
            bezier16Path.cubicTo(8.55f, 16.34f, 6.48f, 19f, 6.01f, 19.67f);
            bezier16Path.cubicTo(5.91f, 19.81f, 5.82f, 19.99f, 5.82f, 20.13f);
            bezier16Path.lineTo(8.98f, 18.72f);
            bezier16Path.cubicTo(8.85f, 18.53f, 8.88f, 18.24f, 9.16f, 18.07f);
            bezier16Path.cubicTo(9.59f, 17.81f, 10.48f, 18.56f, 10.7f, 18.22f);
            bezier16Path.cubicTo(11.01f, 17.73f, 9.64f, 16.58f, 9.52f, 16.48f);
            bezier16Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier16Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor65);
            canvas.drawPath(bezier16Path, paint);
            
            // Bezier 17
            RectF bezier17Rect = CacheForMage.bezier17Rect;
            bezier17Rect.set(11.22f, 17.9f, 15.74f, 22.71f);
            Path bezier17Path = CacheForMage.bezier17Path;
            bezier17Path.reset();
            bezier17Path.moveTo(15.74f, 22.71f);
            bezier17Path.lineTo(15.74f, 20.05f);
            bezier17Path.lineTo(11.99f, 17.9f);
            bezier17Path.lineTo(11.22f, 20.01f);
            bezier17Path.lineTo(15.74f, 22.71f);
            bezier17Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier17Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor69);
            canvas.drawPath(bezier17Path, paint);
            
            // Bezier 18
            RectF bezier18Rect = CacheForMage.bezier18Rect;
            bezier18Rect.set(15.74f, 17.9f, 20.27f, 22.71f);
            Path bezier18Path = CacheForMage.bezier18Path;
            bezier18Path.reset();
            bezier18Path.moveTo(15.74f, 22.71f);
            bezier18Path.lineTo(15.74f, 20.05f);
            bezier18Path.lineTo(19.5f, 17.9f);
            bezier18Path.lineTo(20.27f, 20.01f);
            bezier18Path.lineTo(15.74f, 22.71f);
            bezier18Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier18Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor70);
            canvas.drawPath(bezier18Path, paint);
        }
        
        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();
    }
    
    public static void drawMageLightBg(Canvas canvas) {
        HabiticaIcons.drawMageLightBg(canvas, new RectF(0f, 0f, 32f, 32f), ResizingBehavior.AspectFit);
    }
    
    public static void drawMageLightBg(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForMageLightBg.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForMageLightBg.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 32f, resizedFrame.height() / 32f);
        
        // Symbol
        RectF symbolRect = CacheForMageLightBg.symbolRect;
        symbolRect.set(0f, 0f, 32f, 32f);
        canvas.save();
        canvas.clipRect(symbolRect);
        canvas.translate(symbolRect.left, symbolRect.top);
        RectF symbolTargetRect = CacheForMageLightBg.symbolTargetRect;
        symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
        HabiticaIcons.drawMage(canvas, symbolTargetRect, ResizingBehavior.Stretch, false);
        canvas.restore();
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawCheckmark(Canvas canvas, int checkmarkColor, float percentage) {
        HabiticaIcons.drawCheckmark(canvas, new RectF(0f, 0f, 16f, 12f), ResizingBehavior.AspectFit, checkmarkColor, percentage);
    }
    
    public static void drawCheckmark(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, int checkmarkColor, float percentage) {
        // General Declarations
        Paint paint = CacheForCheckmark.paint;
        
        // Local Variables
        float checkmarkVisibility = percentage * 20f;
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForCheckmark.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForCheckmark.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 16f, resizedFrame.height() / 12f);
        
        // Bezier
        RectF bezierRect = CacheForCheckmark.bezierRect;
        bezierRect.set(1f, 1f, 15f, 10f);
        Path bezierPath = CacheForCheckmark.bezierPath;
        bezierPath.reset();
        bezierPath.moveTo(1f, 5f);
        bezierPath.lineTo(6f, 10f);
        bezierPath.lineTo(15f, 1f);
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStrokeWidth(2f);
        paint.setStrokeMiter(10f);
        paint.setPathEffect(CacheForCheckmark.bezierPathDashEffect.get(checkmarkVisibility, 20f, 0f));
        canvas.save();
        paint.setStyle(Paint.Style.STROKE);
        paint.setColor(checkmarkColor);
        canvas.drawPath(bezierPath, paint);
        canvas.restore();
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawHourglassShop(Canvas canvas) {
        HabiticaIcons.drawHourglassShop(canvas, new RectF(0f, 0f, 42f, 53f), ResizingBehavior.AspectFit);
    }
    
    public static void drawHourglassShop(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForHourglassShop.paint;
        
        // Local Colors
        int fillColor19 = Color.argb(255, 79, 42, 147);
        int fillColor18 = Color.argb(255, 154, 98, 255);
        int fillColor17 = Color.argb(230, 255, 255, 255);
        int fillColor16 = Color.argb(204, 169, 220, 246);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForHourglassShop.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForHourglassShop.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 42f, resizedFrame.height() / 53f);
        
        // Rectangle
        RectF rectangleRect = CacheForHourglassShop.rectangleRect;
        rectangleRect.set(19f, 0f, 22f, 10f);
        Path rectanglePath = CacheForHourglassShop.rectanglePath;
        rectanglePath.reset();
        rectanglePath.moveTo(19f, 8.6f);
        rectanglePath.cubicTo(19f, 9.37f, 19.63f, 10f, 20.4f, 10f);
        rectanglePath.lineTo(20.6f, 10f);
        rectanglePath.cubicTo(21.37f, 10f, 22f, 9.37f, 22f, 8.6f);
        rectanglePath.lineTo(22f, 1.4f);
        rectanglePath.cubicTo(22f, 0.63f, 21.37f, 0f, 20.6f, 0f);
        rectanglePath.lineTo(20.4f, 0f);
        rectanglePath.cubicTo(19.63f, 0f, 19f, 0.63f, 19f, 1.4f);
        rectanglePath.lineTo(19f, 8.6f);
        rectanglePath.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor18);
        canvas.drawPath(rectanglePath, paint);
        
        // Clip
        RectF clipRect = CacheForHourglassShop.clipRect;
        clipRect.set(1f, 6f, 9.03f, 14.03f);
        Path clipPath = CacheForHourglassShop.clipPath;
        clipPath.reset();
        clipPath.moveTo(1.41f, 6.55f);
        clipPath.cubicTo(0.86f, 7.1f, 0.86f, 7.98f, 1.41f, 8.53f);
        clipPath.lineTo(6.5f, 13.62f);
        clipPath.cubicTo(7.05f, 14.17f, 7.93f, 14.17f, 8.48f, 13.62f);
        clipPath.lineTo(8.62f, 13.48f);
        clipPath.cubicTo(9.17f, 12.93f, 9.17f, 12.05f, 8.62f, 11.5f);
        clipPath.lineTo(3.53f, 6.41f);
        clipPath.cubicTo(2.98f, 5.86f, 2.1f, 5.86f, 1.55f, 6.41f);
        clipPath.lineTo(1.41f, 6.55f);
        clipPath.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor18);
        canvas.drawPath(clipPath, paint);
        
        // Clip 2
        RectF clip2Rect = CacheForHourglassShop.clip2Rect;
        clip2Rect.set(33f, 6f, 41.03f, 14.03f);
        Path clip2Path = CacheForHourglassShop.clip2Path;
        clip2Path.reset();
        clip2Path.moveTo(33.55f, 13.62f);
        clip2Path.cubicTo(34.1f, 14.17f, 34.98f, 14.17f, 35.53f, 13.62f);
        clip2Path.lineTo(40.62f, 8.53f);
        clip2Path.cubicTo(41.17f, 7.98f, 41.17f, 7.1f, 40.62f, 6.55f);
        clip2Path.lineTo(40.48f, 6.41f);
        clip2Path.cubicTo(39.93f, 5.86f, 39.05f, 5.86f, 38.5f, 6.41f);
        clip2Path.lineTo(33.41f, 11.5f);
        clip2Path.cubicTo(32.86f, 12.05f, 32.86f, 12.93f, 33.41f, 13.48f);
        clip2Path.lineTo(33.55f, 13.62f);
        clip2Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor18);
        canvas.drawPath(clip2Path, paint);
        
        // Bezier
        RectF bezierRect = CacheForHourglassShop.bezierRect;
        bezierRect.set(10f, 16f, 31.14f, 52.24f);
        Path bezierPath = CacheForHourglassShop.bezierPath;
        bezierPath.reset();
        bezierPath.moveTo(10f, 44.69f);
        bezierPath.lineTo(10f, 48.74f);
        bezierPath.cubicTo(10f, 49.21f, 10.21f, 49.67f, 10.6f, 49.95f);
        bezierPath.cubicTo(14.79f, 53.01f, 26.35f, 53.01f, 30.55f, 49.95f);
        bezierPath.cubicTo(30.93f, 49.67f, 31.14f, 49.21f, 31.14f, 48.74f);
        bezierPath.lineTo(31.14f, 44.69f);
        bezierPath.cubicTo(31.14f, 41f, 29.25f, 37.46f, 26.38f, 35.35f);
        bezierPath.cubicTo(25.54f, 34.73f, 25.54f, 33.51f, 26.38f, 32.89f);
        bezierPath.cubicTo(29.25f, 30.78f, 31.14f, 27.24f, 31.14f, 23.55f);
        bezierPath.lineTo(31.14f, 19.5f);
        bezierPath.cubicTo(31.14f, 19.03f, 30.93f, 18.58f, 30.55f, 18.3f);
        bezierPath.cubicTo(26.35f, 15.23f, 14.79f, 15.23f, 10.6f, 18.3f);
        bezierPath.cubicTo(10.21f, 18.58f, 10f, 19.03f, 10f, 19.5f);
        bezierPath.lineTo(10f, 23.55f);
        bezierPath.cubicTo(10f, 27.24f, 11.89f, 30.78f, 14.76f, 32.89f);
        bezierPath.cubicTo(15.6f, 33.51f, 15.6f, 34.73f, 14.76f, 35.35f);
        bezierPath.cubicTo(11.89f, 37.46f, 10f, 41f, 10f, 44.69f);
        bezierPath.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezierPath.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor16);
        canvas.drawPath(bezierPath, paint);
        
        // Bezier 2
        RectF bezier2Rect = CacheForHourglassShop.bezier2Rect;
        bezier2Rect.set(13.02f, 19.02f, 28.12f, 49.22f);
        Path bezier2Path = CacheForHourglassShop.bezier2Path;
        bezier2Path.reset();
        bezier2Path.moveTo(20.57f, 19.02f);
        bezier2Path.cubicTo(24.01f, 19.02f, 26.68f, 19.64f, 28.12f, 20.36f);
        bezier2Path.lineTo(28.12f, 23.55f);
        bezier2Path.cubicTo(28.12f, 26.21f, 26.77f, 28.86f, 24.59f, 30.46f);
        bezier2Path.cubicTo(23.43f, 31.32f, 22.73f, 32.69f, 22.73f, 34.12f);
        bezier2Path.cubicTo(22.73f, 35.56f, 23.43f, 36.93f, 24.59f, 37.78f);
        bezier2Path.cubicTo(26.77f, 39.39f, 28.12f, 42.03f, 28.12f, 44.69f);
        bezier2Path.lineTo(28.12f, 47.89f);
        bezier2Path.cubicTo(26.68f, 48.6f, 24.01f, 49.22f, 20.57f, 49.22f);
        bezier2Path.cubicTo(17.14f, 49.22f, 14.46f, 48.6f, 13.02f, 47.89f);
        bezier2Path.lineTo(13.02f, 44.69f);
        bezier2Path.cubicTo(13.02f, 42.03f, 14.37f, 39.39f, 16.55f, 37.78f);
        bezier2Path.cubicTo(17.72f, 36.93f, 18.41f, 35.56f, 18.41f, 34.12f);
        bezier2Path.cubicTo(18.41f, 32.69f, 17.72f, 31.32f, 16.55f, 30.46f);
        bezier2Path.cubicTo(14.37f, 28.86f, 13.02f, 26.21f, 13.02f, 23.55f);
        bezier2Path.lineTo(13.02f, 20.36f);
        bezier2Path.cubicTo(14.46f, 19.64f, 17.14f, 19.02f, 20.57f, 19.02f);
        bezier2Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier2Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor17);
        canvas.drawPath(bezier2Path, paint);
        
        // Bezier 3
        RectF bezier3Rect = CacheForHourglassShop.bezier3Rect;
        bezier3Rect.set(15.58f, 21.29f, 25.96f, 27.66f);
        Path bezier3Path = CacheForHourglassShop.bezier3Path;
        bezier3Path.reset();
        bezier3Path.moveTo(20.92f, 21.29f);
        bezier3Path.cubicTo(18.34f, 21.29f, 15.61f, 21.53f, 15.59f, 22.17f);
        bezier3Path.cubicTo(15.56f, 22.68f, 15.57f, 23.68f, 17.67f, 24.74f);
        bezier3Path.cubicTo(19.7f, 25.77f, 20.08f, 27.66f, 21.18f, 27.66f);
        bezier3Path.cubicTo(22.47f, 27.66f, 22.54f, 26.57f, 24.11f, 25.49f);
        bezier3Path.cubicTo(25.72f, 24.38f, 25.98f, 22.88f, 25.96f, 22.29f);
        bezier3Path.cubicTo(25.94f, 21.46f, 23.49f, 21.29f, 20.92f, 21.29f);
        bezier3Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier3Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor18);
        canvas.drawPath(bezier3Path, paint);
        
        // Bezier 4
        RectF bezier4Rect = CacheForHourglassShop.bezier4Rect;
        bezier4Rect.set(21.76f, 21.32f, 25.96f, 27.39f);
        Path bezier4Path = CacheForHourglassShop.bezier4Path;
        bezier4Path.reset();
        bezier4Path.moveTo(24.11f, 25.49f);
        bezier4Path.cubicTo(25.72f, 24.38f, 25.98f, 22.88f, 25.96f, 22.29f);
        bezier4Path.cubicTo(25.94f, 21.63f, 24.41f, 21.39f, 22.49f, 21.32f);
        bezier4Path.cubicTo(23.03f, 21.59f, 23.72f, 22.17f, 23.55f, 23.32f);
        bezier4Path.cubicTo(23.37f, 24.51f, 21.49f, 25.83f, 21.8f, 26.89f);
        bezier4Path.cubicTo(21.86f, 27.09f, 21.96f, 27.26f, 22.08f, 27.39f);
        bezier4Path.cubicTo(22.64f, 27.01f, 23.01f, 26.25f, 24.11f, 25.49f);
        bezier4Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier4Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor19);
        canvas.drawPath(bezier4Path, paint);
        
        // Bezier 5
        RectF bezier5Rect = CacheForHourglassShop.bezier5Rect;
        bezier5Rect.set(15.23f, 36.87f, 25.61f, 45.73f);
        Path bezier5Path = CacheForHourglassShop.bezier5Path;
        bezier5Path.reset();
        bezier5Path.moveTo(20.57f, 36.87f);
        bezier5Path.cubicTo(19.79f, 36.87f, 19.59f, 38.3f, 18.45f, 39.19f);
        bezier5Path.cubicTo(17.05f, 40.28f, 15.73f, 41.62f, 15.36f, 43.54f);
        bezier5Path.cubicTo(15.06f, 45.13f, 15.33f, 45.33f, 15.7f, 45.44f);
        bezier5Path.cubicTo(16.06f, 45.55f, 18.85f, 46.03f, 21.59f, 45.44f);
        bezier5Path.cubicTo(24.33f, 44.86f, 25.85f, 43.77f, 25.58f, 42.65f);
        bezier5Path.cubicTo(25.33f, 41.59f, 24.56f, 40.68f, 23.15f, 39.63f);
        bezier5Path.cubicTo(21.8f, 38.63f, 21.36f, 36.87f, 20.57f, 36.87f);
        bezier5Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier5Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor18);
        canvas.drawPath(bezier5Path, paint);
        
        // Bezier 6
        RectF bezier6Rect = CacheForHourglassShop.bezier6Rect;
        bezier6Rect.set(15.32f, 42.59f, 25.52f, 45.73f);
        Path bezier6Path = CacheForHourglassShop.bezier6Path;
        bezier6Path.reset();
        bezier6Path.moveTo(15.7f, 45.44f);
        bezier6Path.cubicTo(16.06f, 45.55f, 18.85f, 46.03f, 21.59f, 45.44f);
        bezier6Path.cubicTo(23.76f, 44.98f, 25.17f, 44.19f, 25.52f, 43.33f);
        bezier6Path.cubicTo(25.52f, 43.31f, 25.52f, 43.29f, 25.51f, 43.28f);
        bezier6Path.cubicTo(25.36f, 42.69f, 23.07f, 42.34f, 20.22f, 42.8f);
        bezier6Path.cubicTo(17.51f, 43.24f, 15.31f, 44.14f, 15.32f, 45.15f);
        bezier6Path.cubicTo(15.4f, 45.33f, 15.54f, 45.39f, 15.7f, 45.44f);
        bezier6Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier6Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor19);
        canvas.drawPath(bezier6Path, paint);
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawAttributeSparklesLeft(Canvas canvas) {
        HabiticaIcons.drawAttributeSparklesLeft(canvas, new RectF(0f, 0f, 77f, 24f), ResizingBehavior.AspectFit);
    }
    
    public static void drawAttributeSparklesLeft(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForAttributeSparklesLeft.paint;
        
        // Local Colors
        int fillColor73 = Color.argb(255, 255, 180, 69);
        int fillColor72 = Color.argb(255, 255, 97, 101);
        int fillColor18 = Color.argb(255, 154, 98, 255);
        int fillColor71 = Color.argb(255, 80, 181, 233);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForAttributeSparklesLeft.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForAttributeSparklesLeft.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 77f, resizedFrame.height() / 24f);
        
        // Star
        RectF starRect = CacheForAttributeSparklesLeft.starRect;
        starRect.set(36f, 0f, 49f, 13f);
        Path starPath = CacheForAttributeSparklesLeft.starPath;
        starPath.reset();
        starPath.moveTo(42.5f, 0f);
        starPath.lineTo(44.66f, 4.34f);
        starPath.lineTo(49f, 6.5f);
        starPath.lineTo(44.66f, 8.66f);
        starPath.lineTo(42.5f, 13f);
        starPath.lineTo(40.34f, 8.66f);
        starPath.lineTo(36f, 6.5f);
        starPath.lineTo(40.34f, 4.34f);
        starPath.lineTo(42.5f, 0f);
        starPath.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor71);
        canvas.drawPath(starPath, paint);
        
        // Star 2
        RectF star2Rect = CacheForAttributeSparklesLeft.star2Rect;
        star2Rect.set(61f, 6f, 77f, 22f);
        Path star2Path = CacheForAttributeSparklesLeft.star2Path;
        star2Path.reset();
        star2Path.moveTo(69f, 6f);
        star2Path.lineTo(71.65f, 11.35f);
        star2Path.lineTo(77f, 14f);
        star2Path.lineTo(71.65f, 16.65f);
        star2Path.lineTo(69f, 22f);
        star2Path.lineTo(66.35f, 16.65f);
        star2Path.lineTo(61f, 14f);
        star2Path.lineTo(66.35f, 11.35f);
        star2Path.lineTo(69f, 6f);
        star2Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor18);
        canvas.drawPath(star2Path, paint);
        
        // Star 3
        RectF star3Rect = CacheForAttributeSparklesLeft.star3Rect;
        star3Rect.set(17f, 14f, 27f, 24f);
        Path star3Path = CacheForAttributeSparklesLeft.star3Path;
        star3Path.reset();
        star3Path.moveTo(22f, 14f);
        star3Path.lineTo(23.66f, 17.34f);
        star3Path.lineTo(27f, 19f);
        star3Path.lineTo(23.66f, 20.66f);
        star3Path.lineTo(22f, 24f);
        star3Path.lineTo(20.34f, 20.66f);
        star3Path.lineTo(17f, 19f);
        star3Path.lineTo(20.34f, 17.34f);
        star3Path.lineTo(22f, 14f);
        star3Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor72);
        canvas.drawPath(star3Path, paint);
        
        // Star 4
        RectF star4Rect = CacheForAttributeSparklesLeft.star4Rect;
        star4Rect.set(0f, 9f, 7f, 16f);
        Path star4Path = CacheForAttributeSparklesLeft.star4Path;
        star4Path.reset();
        star4Path.moveTo(3.5f, 9f);
        star4Path.lineTo(4.67f, 11.33f);
        star4Path.lineTo(7f, 12.5f);
        star4Path.lineTo(4.67f, 13.67f);
        star4Path.lineTo(3.5f, 16f);
        star4Path.lineTo(2.33f, 13.67f);
        star4Path.lineTo(0f, 12.5f);
        star4Path.lineTo(2.33f, 11.33f);
        star4Path.lineTo(3.5f, 9f);
        star4Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor73);
        canvas.drawPath(star4Path, paint);
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawAttributeSparklesRight(Canvas canvas) {
        HabiticaIcons.drawAttributeSparklesRight(canvas, new RectF(0f, 0f, 77f, 24f), ResizingBehavior.AspectFit);
    }
    
    public static void drawAttributeSparklesRight(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForAttributeSparklesRight.paint;
        
        // Local Colors
        int fillColor18 = Color.argb(255, 154, 98, 255);
        int fillColor71 = Color.argb(255, 80, 181, 233);
        int fillColor74 = Color.argb(255, 255, 190, 93);
        int fillColor72 = Color.argb(255, 255, 97, 101);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForAttributeSparklesRight.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForAttributeSparklesRight.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 77f, resizedFrame.height() / 24f);
        
        // Star
        RectF starRect = CacheForAttributeSparklesRight.starRect;
        starRect.set(28f, 0f, 41f, 13f);
        Path starPath = CacheForAttributeSparklesRight.starPath;
        starPath.reset();
        starPath.moveTo(34.5f, 0f);
        starPath.lineTo(36.66f, 4.34f);
        starPath.lineTo(41f, 6.5f);
        starPath.lineTo(36.66f, 8.66f);
        starPath.lineTo(34.5f, 13f);
        starPath.lineTo(32.34f, 8.66f);
        starPath.lineTo(28f, 6.5f);
        starPath.lineTo(32.34f, 4.34f);
        starPath.lineTo(34.5f, 0f);
        starPath.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor72);
        canvas.drawPath(starPath, paint);
        
        // Star 2
        RectF star2Rect = CacheForAttributeSparklesRight.star2Rect;
        star2Rect.set(0f, 6f, 16f, 22f);
        Path star2Path = CacheForAttributeSparklesRight.star2Path;
        star2Path.reset();
        star2Path.moveTo(8f, 6f);
        star2Path.lineTo(10.65f, 11.35f);
        star2Path.lineTo(16f, 14f);
        star2Path.lineTo(10.65f, 16.65f);
        star2Path.lineTo(8f, 22f);
        star2Path.lineTo(5.35f, 16.65f);
        star2Path.lineTo(0f, 14f);
        star2Path.lineTo(5.35f, 11.35f);
        star2Path.lineTo(8f, 6f);
        star2Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor74);
        canvas.drawPath(star2Path, paint);
        
        // Star 3
        RectF star3Rect = CacheForAttributeSparklesRight.star3Rect;
        star3Rect.set(50f, 14f, 60f, 24f);
        Path star3Path = CacheForAttributeSparklesRight.star3Path;
        star3Path.reset();
        star3Path.moveTo(55f, 14f);
        star3Path.lineTo(56.66f, 17.34f);
        star3Path.lineTo(60f, 19f);
        star3Path.lineTo(56.66f, 20.66f);
        star3Path.lineTo(55f, 24f);
        star3Path.lineTo(53.34f, 20.66f);
        star3Path.lineTo(50f, 19f);
        star3Path.lineTo(53.34f, 17.34f);
        star3Path.lineTo(55f, 14f);
        star3Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor18);
        canvas.drawPath(star3Path, paint);
        
        // Star 4
        RectF star4Rect = CacheForAttributeSparklesRight.star4Rect;
        star4Rect.set(70f, 9f, 77f, 16f);
        Path star4Path = CacheForAttributeSparklesRight.star4Path;
        star4Path.reset();
        star4Path.moveTo(73.5f, 9f);
        star4Path.lineTo(74.67f, 11.33f);
        star4Path.lineTo(77f, 12.5f);
        star4Path.lineTo(74.67f, 13.67f);
        star4Path.lineTo(73.5f, 16f);
        star4Path.lineTo(72.33f, 13.67f);
        star4Path.lineTo(70f, 12.5f);
        star4Path.lineTo(72.33f, 11.33f);
        star4Path.lineTo(73.5f, 9f);
        star4Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor71);
        canvas.drawPath(star4Path, paint);
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawAttributeAllocateButton(Canvas canvas) {
        HabiticaIcons.drawAttributeAllocateButton(canvas, new RectF(0f, 0f, 24f, 15f), ResizingBehavior.AspectFit);
    }
    
    public static void drawAttributeAllocateButton(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForAttributeAllocateButton.paint;
        
        // Local Colors
        int fillColor75 = Color.argb(255, 135, 129, 144);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForAttributeAllocateButton.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForAttributeAllocateButton.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 24f, resizedFrame.height() / 15f);
        
        // Bezier
        RectF bezierRect = CacheForAttributeAllocateButton.bezierRect;
        bezierRect.set(0f, 0f, 24f, 15f);
        Path bezierPath = CacheForAttributeAllocateButton.bezierPath;
        bezierPath.reset();
        bezierPath.moveTo(0f, 15f);
        bezierPath.lineTo(12f, 0f);
        bezierPath.lineTo(24f, 15f);
        bezierPath.lineTo(0f, 15f);
        bezierPath.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezierPath.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor75);
        canvas.drawPath(bezierPath, paint);
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawInfoIcon(Canvas canvas, int infoIconColor) {
        HabiticaIcons.drawInfoIcon(canvas, new RectF(0f, 0f, 20f, 20f), ResizingBehavior.AspectFit, infoIconColor);
    }
    
    public static void drawInfoIcon(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, int infoIconColor) {
        // General Declarations
        Paint paint = CacheForInfoIcon.paint;
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForInfoIcon.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForInfoIcon.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 20f, resizedFrame.height() / 20f);
        
        // Bezier
        RectF bezierRect = CacheForInfoIcon.bezierRect;
        bezierRect.set(0f, 0f, 20f, 20f);
        Path bezierPath = CacheForInfoIcon.bezierPath;
        bezierPath.reset();
        bezierPath.moveTo(9f, 7f);
        bezierPath.lineTo(11f, 7f);
        bezierPath.lineTo(11f, 5f);
        bezierPath.lineTo(9f, 5f);
        bezierPath.lineTo(9f, 7f);
        bezierPath.close();
        bezierPath.moveTo(10f, 18f);
        bezierPath.cubicTo(5.59f, 18f, 2f, 14.41f, 2f, 10f);
        bezierPath.cubicTo(2f, 5.59f, 5.59f, 2f, 10f, 2f);
        bezierPath.cubicTo(14.41f, 2f, 18f, 5.59f, 18f, 10f);
        bezierPath.cubicTo(18f, 14.41f, 14.41f, 18f, 10f, 18f);
        bezierPath.lineTo(10f, 18f);
        bezierPath.close();
        bezierPath.moveTo(10f, 0f);
        bezierPath.cubicTo(4.48f, 0f, 0f, 4.48f, 0f, 10f);
        bezierPath.cubicTo(0f, 15.52f, 4.48f, 20f, 10f, 20f);
        bezierPath.cubicTo(15.52f, 20f, 20f, 15.52f, 20f, 10f);
        bezierPath.cubicTo(20f, 4.48f, 15.52f, 0f, 10f, 0f);
        bezierPath.lineTo(10f, 0f);
        bezierPath.close();
        bezierPath.moveTo(9f, 15f);
        bezierPath.lineTo(11f, 15f);
        bezierPath.lineTo(11f, 9f);
        bezierPath.lineTo(9f, 9f);
        bezierPath.lineTo(9f, 15f);
        bezierPath.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezierPath.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(infoIconColor);
        canvas.drawPath(bezierPath, paint);
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawContributorBadge(Canvas canvas, float contributorTier, boolean isNPC) {
        HabiticaIcons.drawContributorBadge(canvas, new RectF(0f, 0f, 16f, 16f), ResizingBehavior.AspectFit, contributorTier, isNPC);
    }
    
    public static void drawContributorBadge(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, float contributorTier, boolean isNPC) {
        // General Declarations
        Stack<Matrix> currentTransformation = new Stack<Matrix>();
        currentTransformation.push(new Matrix());
        Paint paint = CacheForContributorBadge.paint;
        
        // Local Colors
        int strokeColor4 = Color.argb(255, 136, 10, 10);
        int fillColor82 = Color.argb(255, 154, 98, 255);
        int strokeColor8 = Color.argb(255, 28, 163, 114);
        int strokeColor6 = Color.argb(255, 236, 109, 23);
        int strokeColor12 = Color.argb(255, 0, 87, 55);
        int fillColor2 = Color.argb(255, 255, 97, 101);
        int fillColor77 = Color.argb(255, 201, 43, 43);
        int fillColor7 = Color.argb(255, 41, 149, 205);
        int strokeColor10 = Color.argb(255, 5, 112, 168);
        int fillColor80 = Color.argb(255, 63, 218, 162);
        int fillColor78 = Color.argb(255, 255, 148, 76);
        int fillColor83 = Color.argb(255, 119, 244, 199);
        int strokeColor3 = Color.argb(255, 253, 124, 127);
        int strokeColor9 = Color.argb(255, 52, 181, 193);
        int strokeColor7 = Color.argb(255, 238, 145, 9);
        int strokeColor5 = Color.argb(255, 225, 22, 27);
        int strokeColor11 = Color.argb(255, 106, 52, 204);
        int fillColor76 = Color.argb(255, 255, 182, 184);
        int fillColor81 = Color.argb(255, 94, 221, 233);
        int fillColor79 = Color.argb(255, 255, 190, 93);
        
        // Local Variables
        boolean isTier8 = contributorTier == 8f && !isNPC;
        boolean isTier4 = contributorTier == 4f && !isNPC;
        boolean isTier6 = contributorTier == 6f && !isNPC;
        boolean isTier3 = contributorTier == 3f && !isNPC;
        boolean isTier2 = contributorTier == 2f && !isNPC;
        boolean isTier7 = contributorTier == 7f && !isNPC;
        boolean isTier1 = contributorTier == 1f && !isNPC;
        boolean isTier5 = contributorTier == 5f && !isNPC;
        boolean isTier9 = contributorTier == 9f && !isNPC;
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForContributorBadge.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForContributorBadge.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 16f, resizedFrame.height() / 16f);
        
        // Tier1
        if (isTier1) {
            RectF tier1Rect = CacheForContributorBadge.tier1Rect;
            tier1Rect.set(3f, 4f, 12f, 13f);
            Path tier1Path = CacheForContributorBadge.tier1Path;
            tier1Path.reset();
            tier1Path.moveTo(7.5f, 4f);
            tier1Path.lineTo(11.4f, 6.25f);
            tier1Path.lineTo(11.4f, 10.75f);
            tier1Path.lineTo(7.5f, 13f);
            tier1Path.lineTo(3.6f, 10.75f);
            tier1Path.lineTo(3.6f, 6.25f);
            tier1Path.lineTo(7.5f, 4f);
            tier1Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor76);
            canvas.drawPath(tier1Path, paint);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStrokeWidth(1f);
            paint.setStrokeMiter(10f);
            canvas.save();
            paint.setStyle(Paint.Style.STROKE);
            paint.setColor(strokeColor3);
            canvas.drawPath(tier1Path, paint);
            canvas.restore();
        }
        
        // Tier2
        if (isTier2) {
            RectF tier2Rect = CacheForContributorBadge.tier2Rect;
            tier2Rect.set(3f, 4f, 12f, 13f);
            Path tier2Path = CacheForContributorBadge.tier2Path;
            tier2Path.reset();
            tier2Path.moveTo(7.5f, 4f);
            tier2Path.lineTo(11.4f, 6.25f);
            tier2Path.lineTo(11.4f, 10.75f);
            tier2Path.lineTo(7.5f, 13f);
            tier2Path.lineTo(3.6f, 10.75f);
            tier2Path.lineTo(3.6f, 6.25f);
            tier2Path.lineTo(7.5f, 4f);
            tier2Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor77);
            canvas.drawPath(tier2Path, paint);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStrokeWidth(1f);
            paint.setStrokeMiter(10f);
            canvas.save();
            paint.setStyle(Paint.Style.STROKE);
            paint.setColor(strokeColor4);
            canvas.drawPath(tier2Path, paint);
            canvas.restore();
        }
        
        // Tier3
        if (isTier3) {
            RectF tier3Rect = CacheForContributorBadge.tier3Rect;
            tier3Rect.set(3.5f, 3.5f, 12.5f, 12.5f);
            Path tier3Path = CacheForContributorBadge.tier3Path;
            tier3Path.reset();
            tier3Path.moveTo(8f, 3.5f);
            tier3Path.lineTo(12.5f, 12.5f);
            tier3Path.lineTo(3.5f, 12.5f);
            tier3Path.lineTo(8f, 3.5f);
            tier3Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor2);
            canvas.drawPath(tier3Path, paint);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStrokeWidth(1f);
            paint.setStrokeMiter(10f);
            canvas.save();
            paint.setStyle(Paint.Style.STROKE);
            paint.setColor(strokeColor5);
            canvas.drawPath(tier3Path, paint);
            canvas.restore();
        }
        
        // Tier4
        if (isTier4) {
            RectF tier4Rect = CacheForContributorBadge.tier4Rect;
            tier4Rect.set(3.5f, 3.5f, 12.5f, 12.5f);
            Path tier4Path = CacheForContributorBadge.tier4Path;
            tier4Path.reset();
            tier4Path.moveTo(8f, 3.5f);
            tier4Path.lineTo(12.5f, 12.5f);
            tier4Path.lineTo(3.5f, 12.5f);
            tier4Path.lineTo(8f, 3.5f);
            tier4Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor78);
            canvas.drawPath(tier4Path, paint);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStrokeWidth(1f);
            paint.setStrokeMiter(10f);
            canvas.save();
            paint.setStyle(Paint.Style.STROKE);
            paint.setColor(strokeColor6);
            canvas.drawPath(tier4Path, paint);
            canvas.restore();
        }
        
        // Tier5
        if (isTier5) {
            RectF tier5Rect = CacheForContributorBadge.tier5Rect;
            tier5Rect.set(3.5f, 3.5f, 12.5f, 12.5f);
            Path tier5Path = CacheForContributorBadge.tier5Path;
            tier5Path.reset();
            tier5Path.moveTo(tier5Rect.left, tier5Rect.top);
            tier5Path.lineTo(tier5Rect.right, tier5Rect.top);
            tier5Path.lineTo(tier5Rect.right, tier5Rect.bottom);
            tier5Path.lineTo(tier5Rect.left, tier5Rect.bottom);
            tier5Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor79);
            canvas.drawPath(tier5Path, paint);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStrokeWidth(1f);
            paint.setStrokeMiter(10f);
            canvas.save();
            paint.setStyle(Paint.Style.STROKE);
            paint.setColor(strokeColor7);
            canvas.drawPath(tier5Path, paint);
            canvas.restore();
        }
        
        // Tier6
        if (isTier6) {
            RectF tier6Rect = CacheForContributorBadge.tier6Rect;
            tier6Rect.set(3.5f, 3.5f, 12.5f, 12.5f);
            Path tier6Path = CacheForContributorBadge.tier6Path;
            tier6Path.reset();
            tier6Path.moveTo(tier6Rect.left, tier6Rect.top);
            tier6Path.lineTo(tier6Rect.right, tier6Rect.top);
            tier6Path.lineTo(tier6Rect.right, tier6Rect.bottom);
            tier6Path.lineTo(tier6Rect.left, tier6Rect.bottom);
            tier6Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor80);
            canvas.drawPath(tier6Path, paint);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStrokeWidth(1f);
            paint.setStrokeMiter(10f);
            canvas.save();
            paint.setStyle(Paint.Style.STROKE);
            paint.setColor(strokeColor8);
            canvas.drawPath(tier6Path, paint);
            canvas.restore();
        }
        
        // Tier7
        if (isTier7) {
            canvas.save();
            canvas.translate(8.16f, 7.84f);
            currentTransformation.peek().postTranslate(8.16f, 7.84f);
            canvas.rotate(45f);
            currentTransformation.peek().postRotate(45f);
            RectF tier7Rect = CacheForContributorBadge.tier7Rect;
            tier7Rect.set(-4f, -4f, 4f, 4f);
            Path tier7Path = CacheForContributorBadge.tier7Path;
            tier7Path.reset();
            tier7Path.addRect(tier7Rect, Path.Direction.CW);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor81);
            canvas.drawPath(tier7Path, paint);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStrokeWidth(1f);
            paint.setStrokeMiter(10f);
            canvas.save();
            paint.setStyle(Paint.Style.STROKE);
            paint.setColor(strokeColor9);
            canvas.drawPath(tier7Path, paint);
            canvas.restore();
            canvas.restore();
        }
        
        // TierMod
        if (isTier8) {
            RectF tierModRect = CacheForContributorBadge.tierModRect;
            tierModRect.set(1.5f, 2.5f, 13.5f, 14.5f);
            Path tierModPath = CacheForContributorBadge.tierModPath;
            tierModPath.reset();
            tierModPath.moveTo(7.5f, 2.5f);
            tierModPath.lineTo(9.44f, 5.83f);
            tierModPath.lineTo(13.21f, 6.65f);
            tierModPath.lineTo(10.64f, 9.52f);
            tierModPath.lineTo(11.03f, 13.35f);
            tierModPath.lineTo(7.5f, 11.8f);
            tierModPath.lineTo(3.97f, 13.35f);
            tierModPath.lineTo(4.36f, 9.52f);
            tierModPath.lineTo(1.79f, 6.65f);
            tierModPath.lineTo(5.56f, 5.83f);
            tierModPath.lineTo(7.5f, 2.5f);
            tierModPath.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor7);
            canvas.drawPath(tierModPath, paint);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStrokeWidth(1f);
            paint.setStrokeMiter(10f);
            canvas.save();
            paint.setStyle(Paint.Style.STROKE);
            paint.setColor(strokeColor10);
            canvas.drawPath(tierModPath, paint);
            canvas.restore();
        }
        
        // TierStaff
        if (isTier9) {
            RectF tierStaffRect = CacheForContributorBadge.tierStaffRect;
            tierStaffRect.set(2.5f, 4.5f, 12.5f, 12.5f);
            Path tierStaffPath = CacheForContributorBadge.tierStaffPath;
            tierStaffPath.reset();
            tierStaffPath.moveTo(2.5f, 4.5f);
            tierStaffPath.lineTo(2.5f, 12.5f);
            tierStaffPath.lineTo(12.5f, 12.5f);
            tierStaffPath.lineTo(12.5f, 4.5f);
            tierStaffPath.lineTo(9.5f, 7.5f);
            tierStaffPath.lineTo(7.46f, 4.54f);
            tierStaffPath.lineTo(5.5f, 7.5f);
            tierStaffPath.lineTo(2.5f, 4.5f);
            tierStaffPath.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor82);
            canvas.drawPath(tierStaffPath, paint);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStrokeWidth(1f);
            paint.setStrokeMiter(10f);
            canvas.save();
            paint.setStyle(Paint.Style.STROKE);
            paint.setColor(strokeColor11);
            canvas.drawPath(tierStaffPath, paint);
            canvas.restore();
        }
        
        // Bezier 4
        if (isNPC) {
            RectF bezier4Rect = CacheForContributorBadge.bezier4Rect;
            bezier4Rect.set(3.5f, 3.5f, 11.5f, 13.5f);
            Path bezier4Path = CacheForContributorBadge.bezier4Path;
            bezier4Path.reset();
            bezier4Path.moveTo(11.5f, 3.5f);
            bezier4Path.lineTo(11.5f, 7.5f);
            bezier4Path.lineTo(11.5f, 13.5f);
            bezier4Path.lineTo(7.5f, 10.5f);
            bezier4Path.lineTo(3.5f, 13.5f);
            bezier4Path.lineTo(3.5f, 7.5f);
            bezier4Path.lineTo(3.5f, 3.5f);
            bezier4Path.lineTo(7.5f, 3.5f);
            bezier4Path.lineTo(11.5f, 3.5f);
            bezier4Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor83);
            canvas.drawPath(bezier4Path, paint);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStrokeWidth(1f);
            paint.setStrokeMiter(10f);
            canvas.save();
            paint.setStyle(Paint.Style.STROKE);
            paint.setColor(strokeColor12);
            canvas.drawPath(bezier4Path, paint);
            canvas.restore();
        }
        
        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 fillColor82 = Color.argb(255, 154, 98, 255);
        int fillColor25 = Color.argb(255, 225, 224, 227);
        
        // 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();
    }
    
    
    public static void drawQuestBackground(Canvas canvas, RectF frame, int bossColorDark, int bossColorMedium, int bossColorLight) {
        // General Declarations
        Paint paint = CacheForQuestBackground.paint;
        
        // Rectangle
        RectF rectangleRect = CacheForQuestBackground.rectangleRect;
        rectangleRect.set(frame.left,
            frame.top,
            frame.left + (float) Math.floor(frame.width() + 0.5f),
            frame.top + (float) Math.floor(frame.height() + 0.5f));
        Path rectanglePath = CacheForQuestBackground.rectanglePath;
        rectanglePath.reset();
        rectanglePath.moveTo(rectangleRect.left, rectangleRect.top);
        rectanglePath.lineTo(rectangleRect.right, rectangleRect.top);
        rectanglePath.lineTo(rectangleRect.right, rectangleRect.bottom);
        rectanglePath.lineTo(rectangleRect.left, rectangleRect.bottom);
        rectanglePath.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(bossColorMedium);
        canvas.drawPath(rectanglePath, paint);
        
        // Group
        {
            RectF group = CacheForQuestBackground.group;
            group.set(frame.left + 2f,
                frame.bottom - 8f,
                frame.left + 8f,
                frame.bottom - 2f);
            
            // Rectangle 2
            RectF rectangle2Rect = CacheForQuestBackground.rectangle2Rect;
            rectangle2Rect.set(group.left,
                group.top,
                group.left + (float) Math.floor(group.width() + 0.5f),
                group.top + (float) Math.floor(group.height() + 0.5f));
            Path rectangle2Path = CacheForQuestBackground.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(bossColorLight);
            canvas.drawPath(rectangle2Path, paint);
            
            // Rectangle 3
            RectF rectangle3Rect = CacheForQuestBackground.rectangle3Rect;
            rectangle3Rect.set(group.left + (float) Math.floor(group.width() * 0.33333f + 0.5f),
                group.top + (float) Math.floor(group.height() * 0.33333f + 0.5f),
                group.left + (float) Math.floor(group.width() * 0.66667f + 0.5f),
                group.top + (float) Math.floor(group.height() * 0.66667f + 0.5f));
            Path rectangle3Path = CacheForQuestBackground.rectangle3Path;
            rectangle3Path.reset();
            rectangle3Path.moveTo(rectangle3Rect.left, rectangle3Rect.top);
            rectangle3Path.lineTo(rectangle3Rect.right, rectangle3Rect.top);
            rectangle3Path.lineTo(rectangle3Rect.right, rectangle3Rect.bottom);
            rectangle3Path.lineTo(rectangle3Rect.left, rectangle3Rect.bottom);
            rectangle3Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(bossColorDark);
            canvas.drawPath(rectangle3Path, paint);
        }
        
        // Group 2
        {
            RectF group2 = CacheForQuestBackground.group2;
            group2.set(frame.left + 2f,
                frame.top + 2f,
                frame.left + 8f,
                frame.top + 8f);
            
            // Rectangle 4
            RectF rectangle4Rect = CacheForQuestBackground.rectangle4Rect;
            rectangle4Rect.set(group2.left,
                group2.top,
                group2.left + (float) Math.floor(group2.width() + 0.5f),
                group2.top + (float) Math.floor(group2.height() + 0.5f));
            Path rectangle4Path = CacheForQuestBackground.rectangle4Path;
            rectangle4Path.reset();
            rectangle4Path.moveTo(rectangle4Rect.left, rectangle4Rect.top);
            rectangle4Path.lineTo(rectangle4Rect.right, rectangle4Rect.top);
            rectangle4Path.lineTo(rectangle4Rect.right, rectangle4Rect.bottom);
            rectangle4Path.lineTo(rectangle4Rect.left, rectangle4Rect.bottom);
            rectangle4Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(bossColorLight);
            canvas.drawPath(rectangle4Path, paint);
            
            // Rectangle 5
            RectF rectangle5Rect = CacheForQuestBackground.rectangle5Rect;
            rectangle5Rect.set(group2.left + (float) Math.floor(group2.width() * 0.33333f + 0.5f),
                group2.top + (float) Math.floor(group2.height() * 0.33333f + 0.5f),
                group2.left + (float) Math.floor(group2.width() * 0.66667f + 0.5f),
                group2.top + (float) Math.floor(group2.height() * 0.66667f + 0.5f));
            Path rectangle5Path = CacheForQuestBackground.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(bossColorDark);
            canvas.drawPath(rectangle5Path, paint);
        }
        
        // Group 3
        {
            RectF group3 = CacheForQuestBackground.group3;
            group3.set(frame.right - 8f,
                frame.top + 2f,
                frame.right - 2f,
                frame.top + 8f);
            
            // Rectangle 6
            RectF rectangle6Rect = CacheForQuestBackground.rectangle6Rect;
            rectangle6Rect.set(group3.left,
                group3.top,
                group3.left + (float) Math.floor(group3.width() + 0.5f),
                group3.top + (float) Math.floor(group3.height() + 0.5f));
            Path rectangle6Path = CacheForQuestBackground.rectangle6Path;
            rectangle6Path.reset();
            rectangle6Path.moveTo(rectangle6Rect.left, rectangle6Rect.top);
            rectangle6Path.lineTo(rectangle6Rect.right, rectangle6Rect.top);
            rectangle6Path.lineTo(rectangle6Rect.right, rectangle6Rect.bottom);
            rectangle6Path.lineTo(rectangle6Rect.left, rectangle6Rect.bottom);
            rectangle6Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(bossColorLight);
            canvas.drawPath(rectangle6Path, paint);
            
            // Rectangle 7
            RectF rectangle7Rect = CacheForQuestBackground.rectangle7Rect;
            rectangle7Rect.set(group3.left + (float) Math.floor(group3.width() * 0.33333f + 0.5f),
                group3.top + (float) Math.floor(group3.height() * 0.33333f + 0.5f),
                group3.left + (float) Math.floor(group3.width() * 0.66667f + 0.5f),
                group3.top + (float) Math.floor(group3.height() * 0.66667f + 0.5f));
            Path rectangle7Path = CacheForQuestBackground.rectangle7Path;
            rectangle7Path.reset();
            rectangle7Path.moveTo(rectangle7Rect.left, rectangle7Rect.top);
            rectangle7Path.lineTo(rectangle7Rect.right, rectangle7Rect.top);
            rectangle7Path.lineTo(rectangle7Rect.right, rectangle7Rect.bottom);
            rectangle7Path.lineTo(rectangle7Rect.left, rectangle7Rect.bottom);
            rectangle7Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(bossColorDark);
            canvas.drawPath(rectangle7Path, paint);
        }
        
        // Group 4
        {
            RectF group4 = CacheForQuestBackground.group4;
            group4.set(frame.right - 8f,
                frame.bottom - 8f,
                frame.right - 2f,
                frame.bottom - 2f);
            
            // Rectangle 8
            RectF rectangle8Rect = CacheForQuestBackground.rectangle8Rect;
            rectangle8Rect.set(group4.left,
                group4.top,
                group4.left + (float) Math.floor(group4.width() + 0.5f),
                group4.top + (float) Math.floor(group4.height() + 0.5f));
            Path rectangle8Path = CacheForQuestBackground.rectangle8Path;
            rectangle8Path.reset();
            rectangle8Path.moveTo(rectangle8Rect.left, rectangle8Rect.top);
            rectangle8Path.lineTo(rectangle8Rect.right, rectangle8Rect.top);
            rectangle8Path.lineTo(rectangle8Rect.right, rectangle8Rect.bottom);
            rectangle8Path.lineTo(rectangle8Rect.left, rectangle8Rect.bottom);
            rectangle8Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(bossColorLight);
            canvas.drawPath(rectangle8Path, paint);
            
            // Rectangle 9
            RectF rectangle9Rect = CacheForQuestBackground.rectangle9Rect;
            rectangle9Rect.set(group4.left + (float) Math.floor(group4.width() * 0.33333f + 0.5f),
                group4.top + (float) Math.floor(group4.height() * 0.33333f + 0.5f),
                group4.left + (float) Math.floor(group4.width() * 0.66667f + 0.5f),
                group4.top + (float) Math.floor(group4.height() * 0.66667f + 0.5f));
            Path rectangle9Path = CacheForQuestBackground.rectangle9Path;
            rectangle9Path.reset();
            rectangle9Path.moveTo(rectangle9Rect.left, rectangle9Rect.top);
            rectangle9Path.lineTo(rectangle9Rect.right, rectangle9Rect.top);
            rectangle9Path.lineTo(rectangle9Rect.right, rectangle9Rect.bottom);
            rectangle9Path.lineTo(rectangle9Rect.left, rectangle9Rect.bottom);
            rectangle9Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(bossColorDark);
            canvas.drawPath(rectangle9Path, paint);
        }
        
        // Rectangle 10
        RectF rectangle10Rect = CacheForQuestBackground.rectangle10Rect;
        rectangle10Rect.set(frame.right - 4f,
            frame.top + 10f,
            frame.right - 2f,
            frame.bottom - 10f);
        Path rectangle10Path = CacheForQuestBackground.rectangle10Path;
        rectangle10Path.reset();
        rectangle10Path.moveTo(rectangle10Rect.left, rectangle10Rect.top);
        rectangle10Path.lineTo(rectangle10Rect.right, rectangle10Rect.top);
        rectangle10Path.lineTo(rectangle10Rect.right, rectangle10Rect.bottom);
        rectangle10Path.lineTo(rectangle10Rect.left, rectangle10Rect.bottom);
        rectangle10Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(bossColorLight);
        canvas.drawPath(rectangle10Path, paint);
        
        // Rectangle 11
        RectF rectangle11Rect = CacheForQuestBackground.rectangle11Rect;
        rectangle11Rect.set(frame.left + 10f,
            frame.bottom - 4f,
            frame.right - 10f,
            frame.bottom - 2f);
        Path rectangle11Path = CacheForQuestBackground.rectangle11Path;
        rectangle11Path.reset();
        rectangle11Path.moveTo(rectangle11Rect.left, rectangle11Rect.top);
        rectangle11Path.lineTo(rectangle11Rect.right, rectangle11Rect.top);
        rectangle11Path.lineTo(rectangle11Rect.right, rectangle11Rect.bottom);
        rectangle11Path.lineTo(rectangle11Rect.left, rectangle11Rect.bottom);
        rectangle11Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(bossColorLight);
        canvas.drawPath(rectangle11Path, paint);
        
        // Rectangle 12
        RectF rectangle12Rect = CacheForQuestBackground.rectangle12Rect;
        rectangle12Rect.set(frame.left + 10f,
            frame.top + 2f,
            frame.right - 10f,
            frame.top + 4f);
        Path rectangle12Path = CacheForQuestBackground.rectangle12Path;
        rectangle12Path.reset();
        rectangle12Path.moveTo(rectangle12Rect.left, rectangle12Rect.top);
        rectangle12Path.lineTo(rectangle12Rect.right, rectangle12Rect.top);
        rectangle12Path.lineTo(rectangle12Rect.right, rectangle12Rect.bottom);
        rectangle12Path.lineTo(rectangle12Rect.left, rectangle12Rect.bottom);
        rectangle12Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(bossColorLight);
        canvas.drawPath(rectangle12Path, paint);
        
        // Rectangle 13
        RectF rectangle13Rect = CacheForQuestBackground.rectangle13Rect;
        rectangle13Rect.set(frame.left + 10f,
            frame.top + 4f,
            frame.right - 10f,
            frame.bottom - 4f);
        Path rectangle13Path = CacheForQuestBackground.rectangle13Path;
        rectangle13Path.reset();
        rectangle13Path.moveTo(rectangle13Rect.left, rectangle13Rect.top);
        rectangle13Path.lineTo(rectangle13Rect.right, rectangle13Rect.top);
        rectangle13Path.lineTo(rectangle13Rect.right, rectangle13Rect.bottom);
        rectangle13Path.lineTo(rectangle13Rect.left, rectangle13Rect.bottom);
        rectangle13Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(bossColorDark);
        canvas.drawPath(rectangle13Path, paint);
        
        // Rectangle 14
        RectF rectangle14Rect = CacheForQuestBackground.rectangle14Rect;
        rectangle14Rect.set(frame.left + 4f,
            frame.top + 10f,
            frame.right - 4f,
            frame.bottom - 10f);
        Path rectangle14Path = CacheForQuestBackground.rectangle14Path;
        rectangle14Path.reset();
        rectangle14Path.moveTo(rectangle14Rect.left, rectangle14Rect.top);
        rectangle14Path.lineTo(rectangle14Rect.right, rectangle14Rect.top);
        rectangle14Path.lineTo(rectangle14Rect.right, rectangle14Rect.bottom);
        rectangle14Path.lineTo(rectangle14Rect.left, rectangle14Rect.bottom);
        rectangle14Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(bossColorDark);
        canvas.drawPath(rectangle14Path, paint);
        
        // Rectangle 15
        RectF rectangle15Rect = CacheForQuestBackground.rectangle15Rect;
        rectangle15Rect.set(frame.left + 2f,
            frame.top + 10f,
            frame.left + 4f,
            frame.bottom - 10f);
        Path rectangle15Path = CacheForQuestBackground.rectangle15Path;
        rectangle15Path.reset();
        rectangle15Path.moveTo(rectangle15Rect.left, rectangle15Rect.top);
        rectangle15Path.lineTo(rectangle15Rect.right, rectangle15Rect.top);
        rectangle15Path.lineTo(rectangle15Rect.right, rectangle15Rect.bottom);
        rectangle15Path.lineTo(rectangle15Rect.left, rectangle15Rect.bottom);
        rectangle15Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(bossColorLight);
        canvas.drawPath(rectangle15Path, paint);
    }
    
    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();
    }
    
    public static void drawDamage(Canvas canvas) {
        HabiticaIcons.drawDamage(canvas, new RectF(0f, 0f, 18f, 18f), ResizingBehavior.AspectFit);
    }
    
    public static void drawDamage(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Stack<Matrix> currentTransformation = new Stack<Matrix>();
        currentTransformation.push(new Matrix());
        Paint paint = CacheForDamage.paint;
        
        // Local Colors
        int fillColor25 = Color.argb(255, 225, 224, 227);
        int fillColor90 = Color.argb(179, 78, 74, 87);
        int fillColor89 = Color.argb(255, 227, 143, 61);
        int fillColor37 = Color.argb(255, 255, 255, 255);
        int fillColor88 = Color.argb(255, 179, 98, 19);
        int fillColor87 = Color.argb(255, 189, 168, 255);
        int fillColor86 = Color.argb(255, 213, 200, 255);
        int fillColor40 = Color.argb(255, 165, 161, 172);
        int fillColor35 = Color.argb(255, 195, 192, 199);
        int fillColor75 = Color.argb(255, 135, 129, 144);
        int fillColor85 = Color.argb(255, 237, 236, 238);
        int fillColor84 = Color.argb(255, 240, 97, 102);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForDamage.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForDamage.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 18f, resizedFrame.height() / 18f);
        
        // Group 2
        {
            // Bezier
            RectF bezierRect = CacheForDamage.bezierRect;
            bezierRect.set(8f, 8.06f, 14.65f, 14.71f);
            Path bezierPath = CacheForDamage.bezierPath;
            bezierPath.reset();
            bezierPath.moveTo(11.1f, 11.16f);
            bezierPath.lineTo(8.73f, 12.26f);
            bezierPath.cubicTo(8.53f, 12.35f, 8.4f, 12.53f, 8.35f, 12.74f);
            bezierPath.cubicTo(8.27f, 13.1f, 8.02f, 13.93f, 8f, 14.37f);
            bezierPath.cubicTo(8f, 14.48f, 8.05f, 14.59f, 8.15f, 14.65f);
            bezierPath.cubicTo(8.24f, 14.72f, 8.36f, 14.73f, 8.47f, 14.68f);
            bezierPath.lineTo(12.44f, 12.78f);
            bezierPath.cubicTo(12.56f, 12.72f, 12.66f, 12.62f, 12.72f, 12.49f);
            bezierPath.lineTo(14.63f, 8.53f);
            bezierPath.cubicTo(14.67f, 8.42f, 14.66f, 8.3f, 14.6f, 8.2f);
            bezierPath.cubicTo(14.53f, 8.11f, 14.42f, 8.05f, 14.31f, 8.06f);
            bezierPath.cubicTo(13.87f, 8.08f, 13.06f, 8.32f, 12.68f, 8.41f);
            bezierPath.cubicTo(12.47f, 8.46f, 12.29f, 8.59f, 12.2f, 8.79f);
            bezierPath.lineTo(11.1f, 11.16f);
            bezierPath.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor84);
            canvas.drawPath(bezierPath, paint);
            
            // Bezier 2
            RectF bezier2Rect = CacheForDamage.bezier2Rect;
            bezier2Rect.set(0.59f, 0.65f, 17.87f, 17.93f);
            Path bezier2Path = CacheForDamage.bezier2Path;
            bezier2Path.reset();
            bezier2Path.moveTo(16.85f, 16.91f);
            bezier2Path.lineTo(15.82f, 17.93f);
            bezier2Path.lineTo(13.17f, 17.72f);
            bezier2Path.lineTo(13.03f, 15.98f);
            bezier2Path.lineTo(11.5f, 14.45f);
            bezier2Path.lineTo(8.73f, 15.77f);
            bezier2Path.lineTo(6.65f, 15.21f);
            bezier2Path.lineTo(7.52f, 11.47f);
            bezier2Path.lineTo(1.71f, 6.04f);
            bezier2Path.lineTo(0.59f, 0.65f);
            bezier2Path.lineTo(0.59f, 0.65f);
            bezier2Path.lineTo(0.59f, 0.65f);
            bezier2Path.lineTo(0.59f, 0.65f);
            bezier2Path.lineTo(5.98f, 1.76f);
            bezier2Path.lineTo(11.41f, 7.58f);
            bezier2Path.lineTo(15.15f, 6.71f);
            bezier2Path.lineTo(15.71f, 8.79f);
            bezier2Path.lineTo(14.39f, 11.56f);
            bezier2Path.lineTo(15.92f, 13.09f);
            bezier2Path.lineTo(17.66f, 13.22f);
            bezier2Path.lineTo(17.87f, 15.88f);
            bezier2Path.lineTo(16.85f, 16.91f);
            bezier2Path.lineTo(16.85f, 16.91f);
            bezier2Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor90);
            canvas.drawPath(bezier2Path, paint);
            
            // Rectangle
            canvas.save();
            canvas.translate(13.65f, 13.75f);
            currentTransformation.peek().postTranslate(13.65f, 13.75f);
            canvas.rotate(45f);
            currentTransformation.peek().postRotate(45f);
            RectF rectangleRect = CacheForDamage.rectangleRect;
            rectangleRect.set(-2.32f, -0.95f, 2.32f, 0.95f);
            Path rectanglePath = CacheForDamage.rectanglePath;
            rectanglePath.reset();
            rectanglePath.moveTo(rectangleRect.left, rectangleRect.top);
            rectanglePath.lineTo(rectangleRect.right, rectangleRect.top);
            rectanglePath.lineTo(rectangleRect.right, rectangleRect.bottom);
            rectanglePath.lineTo(rectangleRect.left, rectangleRect.bottom);
            rectanglePath.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor84);
            canvas.drawPath(rectanglePath, paint);
            canvas.restore();
            
            // Bezier 3
            RectF bezier3Rect = CacheForDamage.bezier3Rect;
            bezier3Rect.set(14.1f, 14.15f, 16.73f, 16.79f);
            Path bezier3Path = CacheForDamage.bezier3Path;
            bezier3Path.reset();
            bezier3Path.moveTo(16.73f, 15.46f);
            bezier3Path.lineTo(16.64f, 14.25f);
            bezier3Path.lineTo(15.42f, 14.15f);
            bezier3Path.lineTo(14.1f, 15.48f);
            bezier3Path.lineTo(14.19f, 16.7f);
            bezier3Path.lineTo(15.4f, 16.79f);
            bezier3Path.lineTo(16.73f, 15.46f);
            bezier3Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor84);
            canvas.drawPath(bezier3Path, paint);
            
            // Bezier 4
            RectF bezier4Rect = CacheForDamage.bezier4Rect;
            bezier4Rect.set(2.12f, 2.17f, 5.27f, 5.22f);
            Path bezier4Path = CacheForDamage.bezier4Path;
            bezier4Path.reset();
            bezier4Path.moveTo(5.27f, 2.82f);
            bezier4Path.lineTo(5.16f, 5.22f);
            bezier4Path.lineTo(2.12f, 2.18f);
            bezier4Path.cubicTo(2.18f, 2.13f, 4.47f, 2.39f, 5.27f, 2.82f);
            bezier4Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor37);
            canvas.drawPath(bezier4Path, paint);
            
            // Bezier 5
            RectF bezier5Rect = CacheForDamage.bezier5Rect;
            bezier5Rect.set(5.16f, 2.82f, 11.75f, 10.16f);
            Path bezier5Path = CacheForDamage.bezier5Path;
            bezier5Path.reset();
            bezier5Path.moveTo(5.33f, 2.85f);
            bezier5Path.lineTo(11.75f, 9.59f);
            bezier5Path.lineTo(10.11f, 10.16f);
            bezier5Path.lineTo(5.16f, 5.22f);
            bezier5Path.lineTo(5.27f, 2.82f);
            bezier5Path.lineTo(5.33f, 2.85f);
            bezier5Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor85);
            canvas.drawPath(bezier5Path, paint);
            
            // Bezier 6
            RectF bezier6Rect = CacheForDamage.bezier6Rect;
            bezier6Rect.set(2.12f, 2.18f, 11.81f, 11.17f);
            Path bezier6Path = CacheForDamage.bezier6Path;
            bezier6Path.reset();
            bezier6Path.moveTo(11.75f, 9.59f);
            bezier6Path.lineTo(11.81f, 9.65f);
            bezier6Path.lineTo(11.11f, 11.17f);
            bezier6Path.lineTo(10.11f, 10.16f);
            bezier6Path.lineTo(11.75f, 9.59f);
            bezier6Path.lineTo(11.75f, 9.59f);
            bezier6Path.close();
            bezier6Path.moveTo(2.77f, 5.33f);
            bezier6Path.lineTo(5.16f, 5.22f);
            bezier6Path.lineTo(2.12f, 2.18f);
            bezier6Path.cubicTo(2.07f, 2.24f, 2.33f, 4.53f, 2.77f, 5.33f);
            bezier6Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor85);
            canvas.drawPath(bezier6Path, paint);
            
            // Bezier 7
            RectF bezier7Rect = CacheForDamage.bezier7Rect;
            bezier7Rect.set(2.77f, 5.22f, 10.11f, 11.81f);
            Path bezier7Path = CacheForDamage.bezier7Path;
            bezier7Path.reset();
            bezier7Path.moveTo(2.79f, 5.39f);
            bezier7Path.lineTo(9.53f, 11.81f);
            bezier7Path.lineTo(10.11f, 10.16f);
            bezier7Path.lineTo(5.16f, 5.22f);
            bezier7Path.lineTo(2.77f, 5.33f);
            bezier7Path.cubicTo(2.78f, 5.35f, 2.79f, 5.37f, 2.79f, 5.39f);
            bezier7Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor25);
            canvas.drawPath(bezier7Path, paint);
            
            // Bezier 8
            RectF bezier8Rect = CacheForDamage.bezier8Rect;
            bezier8Rect.set(9.53f, 10.17f, 11.11f, 11.87f);
            Path bezier8Path = CacheForDamage.bezier8Path;
            bezier8Path.reset();
            bezier8Path.moveTo(9.53f, 11.81f);
            bezier8Path.lineTo(9.59f, 11.87f);
            bezier8Path.lineTo(11.11f, 11.17f);
            bezier8Path.lineTo(10.11f, 10.17f);
            bezier8Path.lineTo(9.53f, 11.81f);
            bezier8Path.lineTo(9.53f, 11.81f);
            bezier8Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor25);
            canvas.drawPath(bezier8Path, paint);
            
            // Bezier 9
            RectF bezier9Rect = CacheForDamage.bezier9Rect;
            bezier9Rect.set(14.1f, 14.15f, 16.64f, 16.69f);
            Path bezier9Path = CacheForDamage.bezier9Path;
            bezier9Path.reset();
            bezier9Path.moveTo(15.43f, 14.15f);
            bezier9Path.lineTo(15.71f, 15.18f);
            bezier9Path.lineTo(16.64f, 14.25f);
            bezier9Path.lineTo(15.43f, 14.15f);
            bezier9Path.close();
            bezier9Path.moveTo(14.1f, 15.48f);
            bezier9Path.lineTo(15.13f, 15.76f);
            bezier9Path.lineTo(14.19f, 16.69f);
            bezier9Path.lineTo(14.1f, 15.48f);
            bezier9Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor86);
            canvas.drawPath(bezier9Path, paint);
            
            // Bezier 10
            RectF bezier10Rect = CacheForDamage.bezier10Rect;
            bezier10Rect.set(14.1f, 14.15f, 15.71f, 15.76f);
            Path bezier10Path = CacheForDamage.bezier10Path;
            bezier10Path.reset();
            bezier10Path.moveTo(15.43f, 14.15f);
            bezier10Path.lineTo(14.1f, 15.48f);
            bezier10Path.lineTo(15.13f, 15.76f);
            bezier10Path.lineTo(15.71f, 15.18f);
            bezier10Path.lineTo(15.43f, 14.15f);
            bezier10Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor87);
            canvas.drawPath(bezier10Path, paint);
            
            // Bezier 11
            RectF bezier11Rect = CacheForDamage.bezier11Rect;
            bezier11Rect.set(14.19f, 14.25f, 16.73f, 16.79f);
            Path bezier11Path = CacheForDamage.bezier11Path;
            bezier11Path.reset();
            bezier11Path.moveTo(16.73f, 15.46f);
            bezier11Path.lineTo(15.7f, 15.18f);
            bezier11Path.lineTo(16.64f, 14.25f);
            bezier11Path.lineTo(16.73f, 15.46f);
            bezier11Path.close();
            bezier11Path.moveTo(15.41f, 16.79f);
            bezier11Path.lineTo(15.12f, 15.76f);
            bezier11Path.lineTo(14.19f, 16.7f);
            bezier11Path.lineTo(15.41f, 16.79f);
            bezier11Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor87);
            canvas.drawPath(bezier11Path, paint);
            
            // Bezier 12
            RectF bezier12Rect = CacheForDamage.bezier12Rect;
            bezier12Rect.set(15.12f, 15.18f, 16.73f, 16.79f);
            Path bezier12Path = CacheForDamage.bezier12Path;
            bezier12Path.reset();
            bezier12Path.moveTo(16.73f, 15.46f);
            bezier12Path.lineTo(15.4f, 16.79f);
            bezier12Path.lineTo(15.12f, 15.76f);
            bezier12Path.lineTo(15.7f, 15.18f);
            bezier12Path.lineTo(16.73f, 15.46f);
            bezier12Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor86);
            canvas.drawPath(bezier12Path, paint);
            
            // Rectangle 2
            canvas.save();
            canvas.translate(12.75f, 12.8f);
            currentTransformation.peek().postTranslate(12.75f, 12.8f);
            canvas.rotate(45f);
            currentTransformation.peek().postRotate(45f);
            RectF rectangle2Rect = CacheForDamage.rectangle2Rect;
            rectangle2Rect.set(-0.57f, -0.95f, 0.57f, 0.95f);
            Path rectangle2Path = CacheForDamage.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(fillColor88);
            canvas.drawPath(rectangle2Path, paint);
            canvas.restore();
            
            // Rectangle 3
            canvas.save();
            canvas.translate(13.55f, 13.6f);
            currentTransformation.peek().postTranslate(13.55f, 13.6f);
            canvas.rotate(45f);
            currentTransformation.peek().postRotate(45f);
            RectF rectangle3Rect = CacheForDamage.rectangle3Rect;
            rectangle3Rect.set(-0.57f, -0.95f, 0.57f, 0.95f);
            Path rectangle3Path = CacheForDamage.rectangle3Path;
            rectangle3Path.reset();
            rectangle3Path.moveTo(rectangle3Rect.left, rectangle3Rect.top);
            rectangle3Path.lineTo(rectangle3Rect.right, rectangle3Rect.top);
            rectangle3Path.lineTo(rectangle3Rect.right, rectangle3Rect.bottom);
            rectangle3Path.lineTo(rectangle3Rect.left, rectangle3Rect.bottom);
            rectangle3Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor89);
            canvas.drawPath(rectangle3Path, paint);
            canvas.restore();
            
            // Rectangle 4
            canvas.save();
            canvas.translate(14.35f, 14.4f);
            currentTransformation.peek().postTranslate(14.35f, 14.4f);
            canvas.rotate(-45f);
            currentTransformation.peek().postRotate(-45f);
            RectF rectangle4Rect = CacheForDamage.rectangle4Rect;
            rectangle4Rect.set(-0.95f, -0.57f, 0.95f, 0.57f);
            Path rectangle4Path = CacheForDamage.rectangle4Path;
            rectangle4Path.reset();
            rectangle4Path.moveTo(rectangle4Rect.left, rectangle4Rect.top);
            rectangle4Path.lineTo(rectangle4Rect.right, rectangle4Rect.top);
            rectangle4Path.lineTo(rectangle4Rect.right, rectangle4Rect.bottom);
            rectangle4Path.lineTo(rectangle4Rect.left, rectangle4Rect.bottom);
            rectangle4Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor88);
            canvas.drawPath(rectangle4Path, paint);
            canvas.restore();
            
            // Bezier 13
            RectF bezier13Rect = CacheForDamage.bezier13Rect;
            bezier13Rect.set(11.1f, 8.06f, 14.58f, 11.87f);
            Path bezier13Path = CacheForDamage.bezier13Path;
            bezier13Path.reset();
            bezier13Path.moveTo(11.1f, 11.16f);
            bezier13Path.lineTo(12.2f, 8.79f);
            bezier13Path.cubicTo(12.24f, 8.7f, 12.3f, 8.63f, 12.37f, 8.57f);
            bezier13Path.cubicTo(12.46f, 8.49f, 12.57f, 8.44f, 12.68f, 8.41f);
            bezier13Path.cubicTo(13.06f, 8.32f, 13.87f, 8.08f, 14.31f, 8.06f);
            bezier13Path.cubicTo(14.41f, 8.06f, 14.51f, 8.1f, 14.58f, 8.19f);
            bezier13Path.lineTo(12.98f, 9.55f);
            bezier13Path.lineTo(11.81f, 11.87f);
            bezier13Path.lineTo(11.1f, 11.16f);
            bezier13Path.lineTo(11.1f, 11.16f);
            bezier13Path.lineTo(11.1f, 11.16f);
            bezier13Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor35);
            canvas.drawPath(bezier13Path, paint);
            
            // Bezier 14
            RectF bezier14Rect = CacheForDamage.bezier14Rect;
            bezier14Rect.set(8f, 8.19f, 14.65f, 14.64f);
            Path bezier14Path = CacheForDamage.bezier14Path;
            bezier14Path.reset();
            bezier14Path.moveTo(12.98f, 9.55f);
            bezier14Path.lineTo(14.58f, 8.19f);
            bezier14Path.cubicTo(14.66f, 8.28f, 14.67f, 8.41f, 14.62f, 8.53f);
            bezier14Path.lineTo(12.72f, 12.5f);
            bezier14Path.cubicTo(12.69f, 12.56f, 12.65f, 12.61f, 12.6f, 12.66f);
            bezier14Path.lineTo(11.81f, 11.87f);
            bezier14Path.lineTo(12.98f, 9.55f);
            bezier14Path.close();
            bezier14Path.moveTo(8f, 14.37f);
            bezier14Path.cubicTo(8.02f, 13.93f, 8.25f, 13.12f, 8.35f, 12.74f);
            bezier14Path.cubicTo(8.38f, 12.63f, 8.43f, 12.52f, 8.51f, 12.43f);
            bezier14Path.cubicTo(8.56f, 12.36f, 8.64f, 12.3f, 8.72f, 12.26f);
            bezier14Path.lineTo(11.1f, 11.16f);
            bezier14Path.lineTo(11.1f, 11.16f);
            bezier14Path.lineTo(11.81f, 11.87f);
            bezier14Path.lineTo(9.49f, 13.04f);
            bezier14Path.lineTo(8.12f, 14.64f);
            bezier14Path.cubicTo(8.04f, 14.58f, 7.99f, 14.47f, 8f, 14.37f);
            bezier14Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor40);
            canvas.drawPath(bezier14Path, paint);
            
            // Bezier 15
            RectF bezier15Rect = CacheForDamage.bezier15Rect;
            bezier15Rect.set(8.12f, 11.87f, 12.6f, 14.71f);
            Path bezier15Path = CacheForDamage.bezier15Path;
            bezier15Path.reset();
            bezier15Path.moveTo(9.49f, 13.04f);
            bezier15Path.lineTo(8.12f, 14.64f);
            bezier15Path.cubicTo(8.22f, 14.72f, 8.35f, 14.73f, 8.46f, 14.68f);
            bezier15Path.lineTo(12.43f, 12.78f);
            bezier15Path.cubicTo(12.49f, 12.75f, 12.55f, 12.71f, 12.6f, 12.66f);
            bezier15Path.lineTo(11.81f, 11.87f);
            bezier15Path.lineTo(9.49f, 13.04f);
            bezier15Path.lineTo(9.49f, 13.04f);
            bezier15Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor75);
            canvas.drawPath(bezier15Path, paint);
            
            // Group 3
            {
                RectF group3 = CacheForDamage.group3;
                group3.set(6.23f, 3.79f, 8.78f, 8.83f);
                canvas.save();
                
                // Clip
                Path clipPath = CacheForDamage.clipPath;
                clipPath.reset();
                clipPath.moveTo(6.23f, 3.79f);
                clipPath.lineTo(8.78f, 6.47f);
                clipPath.lineTo(8.78f, 8.83f);
                clipPath.lineTo(6.23f, 6.29f);
                clipPath.lineTo(6.23f, 3.79f);
                clipPath.close();
                canvas.clipPath(clipPath);
                
                // Bezier 16
                RectF bezier16Rect = CacheForDamage.bezier16Rect;
                bezier16Rect.set(6.58f, 3f, 8.78f, 9f);
                Path bezier16Path = CacheForDamage.bezier16Path;
                bezier16Path.reset();
                bezier16Path.moveTo(8.78f, 4.22f);
                bezier16Path.cubicTo(8.78f, 4.22f, 8.78f, 7.06f, 8.78f, 9f);
                bezier16Path.lineTo(7.68f, 9f);
                bezier16Path.cubicTo(7.68f, 7.06f, 7.68f, 4.22f, 7.68f, 4.22f);
                bezier16Path.lineTo(8.78f, 4.22f);
                bezier16Path.lineTo(8.78f, 4.22f);
                bezier16Path.close();
                bezier16Path.moveTo(6.95f, 8.96f);
                bezier16Path.lineTo(6.58f, 9f);
                bezier16Path.cubicTo(6.58f, 8.3f, 6.58f, 4.34f, 6.58f, 3f);
                bezier16Path.lineTo(6.95f, 3f);
                bezier16Path.cubicTo(6.95f, 4.34f, 6.95f, 8.3f, 6.95f, 9f);
                bezier16Path.lineTo(6.95f, 8.96f);
                bezier16Path.close();
                
                paint.reset();
                paint.setFlags(Paint.ANTI_ALIAS_FLAG);
                paint.setStyle(Paint.Style.FILL);
                paint.setColor(fillColor37);
                canvas.drawPath(bezier16Path, paint);
                
                canvas.restore();
            }
        }
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawCaret(Canvas canvas, int caretColor, boolean pointsUp) {
        HabiticaIcons.drawCaret(canvas, new RectF(0f, 0f, 16f, 16f), ResizingBehavior.AspectFit, caretColor, pointsUp);
    }
    
    public static void drawCaret(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, int caretColor, boolean pointsUp) {
        // General Declarations
        Stack<Matrix> currentTransformation = new Stack<Matrix>();
        currentTransformation.push(new Matrix());
        Paint paint = CacheForCaret.paint;
        
        // Local Variables
        float caretRotation = pointsUp ? 180f : 0f;
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForCaret.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForCaret.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 16f, resizedFrame.height() / 16f);
        
        // Bezier
        canvas.saveLayerAlpha(null, 138, Canvas.ALL_SAVE_FLAG);
        {
            canvas.translate(8f, 8f);
            currentTransformation.peek().postTranslate(8f, 8f);
            canvas.rotate(-caretRotation);
            currentTransformation.peek().postRotate(-caretRotation);
            RectF bezierRect = CacheForCaret.bezierRect;
            bezierRect.set(-6f, -3.7f, 6f, 3.7f);
            Path bezierPath = CacheForCaret.bezierPath;
            bezierPath.reset();
            bezierPath.moveTo(4.6f, -3.7f);
            bezierPath.lineTo(6f, -2.3f);
            bezierPath.lineTo(0f, 3.7f);
            bezierPath.lineTo(-6f, -2.3f);
            bezierPath.lineTo(-4.6f, -3.7f);
            bezierPath.lineTo(0f, 0.9f);
            bezierPath.lineTo(4.6f, -3.7f);
            bezierPath.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezierPath.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(caretColor);
            canvas.drawPath(bezierPath, paint);
        }
        canvas.restore();
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawRageStrikeInactive(Canvas canvas) {
        HabiticaIcons.drawRageStrikeInactive(canvas, new RectF(0f, 0f, 63f, 82f), ResizingBehavior.AspectFit);
    }
    
    public static void drawRageStrikeInactive(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForRageStrikeInactive.paint;
        
        // Local Colors
        int textForeground = Color.argb(255, 183, 90, 28);
        int fillColor91 = Color.argb(255, 255, 200, 167);
        int strokeColor14 = Color.argb(255, 255, 148, 76);
        int strokeColor13 = Color.argb(255, 244, 120, 37);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForRageStrikeInactive.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForRageStrikeInactive.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 63f, resizedFrame.height() / 82f);
        
        // Group 3
        {
            // Bezier 2
            RectF bezier2Rect = CacheForRageStrikeInactive.bezier2Rect;
            bezier2Rect.set(17f, 21f, 45f, 61f);
            Path bezier2Path = CacheForRageStrikeInactive.bezier2Path;
            bezier2Path.reset();
            bezier2Path.moveTo(17f, 48.08f);
            bezier2Path.lineTo(21.6f, 41f);
            bezier2Path.lineTo(17f, 33.92f);
            bezier2Path.lineTo(31f, 21f);
            bezier2Path.lineTo(45f, 33.92f);
            bezier2Path.lineTo(40.4f, 41f);
            bezier2Path.lineTo(45f, 48.08f);
            bezier2Path.lineTo(31f, 61f);
            bezier2Path.lineTo(17f, 48.08f);
            bezier2Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStrokeWidth(16f);
            paint.setStrokeMiter(10f);
            canvas.save();
            paint.setStyle(Paint.Style.STROKE);
            paint.setColor(strokeColor13);
            canvas.drawPath(bezier2Path, paint);
            canvas.restore();
            
            // Bezier 4
            RectF bezier4Rect = CacheForRageStrikeInactive.bezier4Rect;
            bezier4Rect.set(17f, 21f, 45f, 61f);
            Path bezier4Path = CacheForRageStrikeInactive.bezier4Path;
            bezier4Path.reset();
            bezier4Path.moveTo(17f, 48.08f);
            bezier4Path.lineTo(21.6f, 41f);
            bezier4Path.lineTo(17f, 33.92f);
            bezier4Path.lineTo(31f, 21f);
            bezier4Path.lineTo(45f, 33.92f);
            bezier4Path.lineTo(40.4f, 41f);
            bezier4Path.lineTo(45f, 48.08f);
            bezier4Path.lineTo(31f, 61f);
            bezier4Path.lineTo(17f, 48.08f);
            bezier4Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStrokeWidth(8f);
            paint.setStrokeMiter(10f);
            canvas.save();
            paint.setStyle(Paint.Style.STROKE);
            paint.setColor(strokeColor14);
            canvas.drawPath(bezier4Path, paint);
            canvas.restore();
            
            // Bezier
            RectF bezierRect = CacheForRageStrikeInactive.bezierRect;
            bezierRect.set(17f, 21f, 45f, 61f);
            Path bezierPath = CacheForRageStrikeInactive.bezierPath;
            bezierPath.reset();
            bezierPath.moveTo(17f, 48.08f);
            bezierPath.lineTo(21.6f, 41f);
            bezierPath.lineTo(17f, 33.92f);
            bezierPath.lineTo(31f, 21f);
            bezierPath.lineTo(45f, 33.92f);
            bezierPath.lineTo(40.4f, 41f);
            bezierPath.lineTo(45f, 48.08f);
            bezierPath.lineTo(31f, 61f);
            bezierPath.lineTo(17f, 48.08f);
            bezierPath.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor91);
            canvas.drawPath(bezierPath, paint);
            
            // Label
            RectF labelRect = CacheForRageStrikeInactive.labelRect;
            labelRect.set(27.1f, 34.38f, 35.8f, 49f);
            Path labelPath = CacheForRageStrikeInactive.labelPath;
            labelPath.reset();
            labelPath.moveTo(30.36f, 46.78f);
            labelPath.lineTo(30.36f, 49f);
            labelPath.lineTo(32.58f, 49f);
            labelPath.lineTo(32.58f, 46.78f);
            labelPath.lineTo(30.36f, 46.78f);
            labelPath.close();
            labelPath.moveTo(27.1f, 39.18f);
            labelPath.lineTo(28.8f, 39.18f);
            labelPath.cubicTo(28.8f, 38.71f, 28.85f, 38.28f, 28.96f, 37.88f);
            labelPath.cubicTo(29.07f, 37.48f, 29.24f, 37.13f, 29.47f, 36.84f);
            labelPath.cubicTo(29.7f, 36.55f, 29.99f, 36.31f, 30.34f, 36.14f);
            labelPath.cubicTo(30.69f, 35.97f, 31.1f, 35.88f, 31.58f, 35.88f);
            labelPath.cubicTo(32.3f, 35.88f, 32.87f, 36.09f, 33.29f, 36.5f);
            labelPath.cubicTo(33.71f, 36.91f, 33.95f, 37.49f, 34f, 38.22f);
            labelPath.cubicTo(34.03f, 38.71f, 33.97f, 39.13f, 33.82f, 39.48f);
            labelPath.cubicTo(33.67f, 39.83f, 33.48f, 40.14f, 33.23f, 40.43f);
            labelPath.cubicTo(32.98f, 40.72f, 32.72f, 40.99f, 32.43f, 41.25f);
            labelPath.cubicTo(32.14f, 41.51f, 31.87f, 41.79f, 31.61f, 42.1f);
            labelPath.cubicTo(31.35f, 42.41f, 31.13f, 42.76f, 30.95f, 43.15f);
            labelPath.cubicTo(30.77f, 43.54f, 30.67f, 44.02f, 30.64f, 44.58f);
            labelPath.lineTo(30.64f, 45.52f);
            labelPath.lineTo(32.34f, 45.52f);
            labelPath.lineTo(32.34f, 44.74f);
            labelPath.cubicTo(32.34f, 44.39f, 32.39f, 44.08f, 32.49f, 43.81f);
            labelPath.cubicTo(32.59f, 43.54f, 32.72f, 43.28f, 32.89f, 43.05f);
            labelPath.cubicTo(33.06f, 42.82f, 33.24f, 42.6f, 33.45f, 42.39f);
            labelPath.cubicTo(33.66f, 42.18f, 33.87f, 41.98f, 34.08f, 41.78f);
            labelPath.cubicTo(34.29f, 41.57f, 34.5f, 41.35f, 34.71f, 41.12f);
            labelPath.cubicTo(34.92f, 40.89f, 35.1f, 40.65f, 35.26f, 40.38f);
            labelPath.cubicTo(35.42f, 40.11f, 35.55f, 39.82f, 35.65f, 39.49f);
            labelPath.cubicTo(35.75f, 39.16f, 35.8f, 38.79f, 35.8f, 38.38f);
            labelPath.cubicTo(35.8f, 37.74f, 35.7f, 37.17f, 35.49f, 36.68f);
            labelPath.cubicTo(35.28f, 36.19f, 34.99f, 35.77f, 34.62f, 35.43f);
            labelPath.cubicTo(34.25f, 35.09f, 33.8f, 34.83f, 33.29f, 34.65f);
            labelPath.cubicTo(32.78f, 34.47f, 32.21f, 34.38f, 31.58f, 34.38f);
            labelPath.cubicTo(30.89f, 34.38f, 30.26f, 34.5f, 29.7f, 34.74f);
            labelPath.cubicTo(29.14f, 34.98f, 28.67f, 35.32f, 28.28f, 35.75f);
            labelPath.cubicTo(27.89f, 36.18f, 27.6f, 36.69f, 27.39f, 37.28f);
            labelPath.cubicTo(27.18f, 37.87f, 27.09f, 38.5f, 27.1f, 39.18f);
            labelPath.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(textForeground);
            canvas.drawPath(labelPath, paint);
        }
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawRageStrikeActive(Canvas canvas, Context context, Bitmap rageStrikeNPC) {
        HabiticaIcons.drawRageStrikeActive(canvas, context, new RectF(0f, 0f, 63f, 82f), ResizingBehavior.AspectFit, rageStrikeNPC);
    }
    
    public static void drawRageStrikeActive(Canvas canvas, Context context, RectF targetFrame, ResizingBehavior resizing, Bitmap rageStrikeNPC) {
        // General Declarations
        float displayDensity = context.getResources().getDisplayMetrics().density;
        Paint paint = CacheForRageStrikeActive.paint;
        
        // Local Colors
        int strokeColor13 = Color.argb(255, 244, 120, 37);
        int strokeColor14 = Color.argb(255, 255, 148, 76);
        
        // Local Images
        PaintCodeBitmap pc_rageStrikeNPC = GlobalCache.rageStrikeNPC.get(rageStrikeNPC);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForRageStrikeActive.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForRageStrikeActive.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 63f, resizedFrame.height() / 82f);
        
        // Bezier
        RectF bezierRect = CacheForRageStrikeActive.bezierRect;
        bezierRect.set(10.39f, 10.89f, 52.39f, 70.89f);
        Path bezierPath = CacheForRageStrikeActive.bezierPath;
        bezierPath.reset();
        bezierPath.moveTo(10.39f, 51.5f);
        bezierPath.lineTo(17.28f, 40.89f);
        bezierPath.lineTo(10.39f, 30.27f);
        bezierPath.lineTo(31.39f, 10.89f);
        bezierPath.lineTo(52.39f, 30.27f);
        bezierPath.lineTo(45.49f, 40.89f);
        bezierPath.lineTo(52.39f, 51.5f);
        bezierPath.lineTo(31.39f, 70.89f);
        bezierPath.lineTo(10.39f, 51.5f);
        bezierPath.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStrokeWidth(16f);
        paint.setStrokeMiter(10f);
        canvas.save();
        paint.setStyle(Paint.Style.STROKE);
        paint.setColor(strokeColor13);
        canvas.drawPath(bezierPath, paint);
        canvas.restore();
        
        // Bezier 3
        RectF bezier3Rect = CacheForRageStrikeActive.bezier3Rect;
        bezier3Rect.set(10.39f, 10.89f, 52.39f, 70.89f);
        Path bezier3Path = CacheForRageStrikeActive.bezier3Path;
        bezier3Path.reset();
        bezier3Path.moveTo(10.39f, 51.5f);
        bezier3Path.lineTo(17.28f, 40.89f);
        bezier3Path.lineTo(10.39f, 30.27f);
        bezier3Path.lineTo(31.39f, 10.89f);
        bezier3Path.lineTo(52.39f, 30.27f);
        bezier3Path.lineTo(45.49f, 40.89f);
        bezier3Path.lineTo(52.39f, 51.5f);
        bezier3Path.lineTo(31.39f, 70.89f);
        bezier3Path.lineTo(10.39f, 51.5f);
        bezier3Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStrokeWidth(8f);
        paint.setStrokeMiter(10f);
        canvas.save();
        paint.setStyle(Paint.Style.STROKE);
        paint.setColor(strokeColor14);
        canvas.drawPath(bezier3Path, paint);
        canvas.restore();
        
        // Bezier 2
        RectF bezier2Rect = CacheForRageStrikeActive.bezier2Rect;
        bezier2Rect.set(10f, 11f, 52f, 71f);
        Path bezier2Path = CacheForRageStrikeActive.bezier2Path;
        bezier2Path.reset();
        bezier2Path.moveTo(10f, 51.61f);
        bezier2Path.lineTo(16.9f, 41f);
        bezier2Path.lineTo(10f, 30.39f);
        bezier2Path.lineTo(31f, 11f);
        bezier2Path.lineTo(52f, 30.39f);
        bezier2Path.lineTo(45.1f, 41f);
        bezier2Path.lineTo(52f, 51.61f);
        bezier2Path.lineTo(31f, 71f);
        bezier2Path.lineTo(10f, 51.61f);
        bezier2Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setShader(pc_rageStrikeNPC.getShader());
        
        canvas.save();
        canvas.clipPath(bezier2Path);
        canvas.translate(bezier2Rect.left - 27f, bezier2Rect.top - 18f);
        canvas.scale(1 / displayDensity, 1 / displayDensity);
        canvas.clipRect(pc_rageStrikeNPC.getBounds());
        canvas.drawPaint(paint);
        canvas.restore();
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawRage(Canvas canvas) {
        HabiticaIcons.drawRage(canvas, new RectF(0f, 0f, 18f, 18f), ResizingBehavior.AspectFit);
    }
    
    public static void drawRage(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForRage.paint;
        
        // Local Colors
        int fillColor93 = Color.argb(255, 244, 120, 37);
        int fillColor14 = Color.argb(255, 36, 204, 143);
        int fillColor15 = Color.argb(89, 27, 153, 107);
        int fillColor92 = Color.argb(255, 90, 228, 178);
        int fillColor3 = Color.argb(128, 255, 255, 255);
        int fillColor5 = Color.argb(64, 255, 255, 255);
        int fillColor94 = Color.argb(89, 180, 89, 27);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForRage.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForRage.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 18f, resizedFrame.height() / 18f);
        
        // Group
        {
            // Bezier
            RectF bezierRect = CacheForRage.bezierRect;
            bezierRect.set(2f, 1f, 15.33f, 17f);
            Path bezierPath = CacheForRage.bezierPath;
            bezierPath.reset();
            bezierPath.moveTo(2f, 7f);
            bezierPath.lineTo(8.67f, 1f);
            bezierPath.lineTo(15.33f, 7f);
            bezierPath.lineTo(8.67f, 17f);
            bezierPath.lineTo(2f, 7f);
            bezierPath.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor14);
            canvas.drawPath(bezierPath, paint);
            
            // Bezier 2
            RectF bezier2Rect = CacheForRage.bezier2Rect;
            bezier2Rect.set(2f, 1f, 15.33f, 17f);
            Path bezier2Path = CacheForRage.bezier2Path;
            bezier2Path.reset();
            bezier2Path.moveTo(2f, 7f);
            bezier2Path.lineTo(8.67f, 1f);
            bezier2Path.lineTo(15.33f, 7f);
            bezier2Path.lineTo(8.67f, 17f);
            bezier2Path.lineTo(2f, 7f);
            bezier2Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor14);
            canvas.drawPath(bezier2Path, paint);
            
            // Bezier 3
            RectF bezier3Rect = CacheForRage.bezier3Rect;
            bezier3Rect.set(8.67f, 2.8f, 13.6f, 7.2f);
            Path bezier3Path = CacheForRage.bezier3Path;
            bezier3Path.reset();
            bezier3Path.moveTo(13.6f, 7.2f);
            bezier3Path.lineTo(8.67f, 6.2f);
            bezier3Path.lineTo(8.67f, 2.8f);
            bezier3Path.lineTo(13.6f, 7.2f);
            bezier3Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor5);
            canvas.drawPath(bezier3Path, paint);
            
            // Bezier 4
            RectF bezier4Rect = CacheForRage.bezier4Rect;
            bezier4Rect.set(3.73f, 2.8f, 8.67f, 7.2f);
            Path bezier4Path = CacheForRage.bezier4Path;
            bezier4Path.reset();
            bezier4Path.moveTo(8.67f, 6.2f);
            bezier4Path.lineTo(3.73f, 7.2f);
            bezier4Path.lineTo(8.67f, 2.8f);
            bezier4Path.lineTo(8.67f, 6.2f);
            bezier4Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor3);
            canvas.drawPath(bezier4Path, paint);
            
            // Bezier 5
            RectF bezier5Rect = CacheForRage.bezier5Rect;
            bezier5Rect.set(3.73f, 6.2f, 8.67f, 14.6f);
            Path bezier5Path = CacheForRage.bezier5Path;
            bezier5Path.reset();
            bezier5Path.moveTo(8.67f, 6.2f);
            bezier5Path.lineTo(8.67f, 14.6f);
            bezier5Path.lineTo(3.73f, 7.2f);
            bezier5Path.lineTo(8.67f, 6.2f);
            bezier5Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor92);
            canvas.drawPath(bezier5Path, paint);
            
            // Bezier 6
            RectF bezier6Rect = CacheForRage.bezier6Rect;
            bezier6Rect.set(8.67f, 6.2f, 13.6f, 14.6f);
            Path bezier6Path = CacheForRage.bezier6Path;
            bezier6Path.reset();
            bezier6Path.moveTo(13.6f, 7.2f);
            bezier6Path.lineTo(8.67f, 14.6f);
            bezier6Path.lineTo(8.67f, 6.2f);
            bezier6Path.lineTo(13.6f, 7.2f);
            bezier6Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor15);
            canvas.drawPath(bezier6Path, paint);
            
            // Bezier 7
            RectF bezier7Rect = CacheForRage.bezier7Rect;
            bezier7Rect.set(2f, 1f, 15.33f, 17f);
            Path bezier7Path = CacheForRage.bezier7Path;
            bezier7Path.reset();
            bezier7Path.moveTo(15.33f, 7f);
            bezier7Path.lineTo(8.67f, 1f);
            bezier7Path.lineTo(2f, 7f);
            bezier7Path.lineTo(3.33f, 9f);
            bezier7Path.lineTo(2f, 11f);
            bezier7Path.lineTo(8.67f, 17f);
            bezier7Path.lineTo(15.33f, 11f);
            bezier7Path.lineTo(14f, 9f);
            bezier7Path.lineTo(15.33f, 7f);
            bezier7Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor93);
            canvas.drawPath(bezier7Path, paint);
            
            // Bezier 8
            RectF bezier8Rect = CacheForRage.bezier8Rect;
            bezier8Rect.set(8.67f, 2.8f, 13.6f, 7.2f);
            Path bezier8Path = CacheForRage.bezier8Path;
            bezier8Path.reset();
            bezier8Path.moveTo(13.6f, 7.2f);
            bezier8Path.lineTo(8.67f, 6.2f);
            bezier8Path.lineTo(8.67f, 2.8f);
            bezier8Path.lineTo(13.6f, 7.2f);
            bezier8Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor5);
            canvas.drawPath(bezier8Path, paint);
            
            // Bezier 9
            RectF bezier9Rect = CacheForRage.bezier9Rect;
            bezier9Rect.set(3.73f, 2.8f, 8.67f, 7.2f);
            Path bezier9Path = CacheForRage.bezier9Path;
            bezier9Path.reset();
            bezier9Path.moveTo(8.67f, 6.2f);
            bezier9Path.lineTo(3.73f, 7.2f);
            bezier9Path.lineTo(8.67f, 2.8f);
            bezier9Path.lineTo(8.67f, 6.2f);
            bezier9Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor3);
            canvas.drawPath(bezier9Path, paint);
            
            // Bezier 10
            RectF bezier10Rect = CacheForRage.bezier10Rect;
            bezier10Rect.set(3.73f, 3.4f, 13.6f, 14.6f);
            Path bezier10Path = CacheForRage.bezier10Path;
            bezier10Path.reset();
            bezier10Path.moveTo(8.67f, 6.2f);
            bezier10Path.lineTo(8.67f, 14.6f);
            bezier10Path.lineTo(7.37f, 12.65f);
            bezier10Path.lineTo(3.73f, 7.2f);
            bezier10Path.lineTo(8.67f, 6.2f);
            bezier10Path.close();
            bezier10Path.moveTo(8.67f, 11.8f);
            bezier10Path.lineTo(8.67f, 3.4f);
            bezier10Path.lineTo(9.96f, 5.35f);
            bezier10Path.lineTo(13.6f, 10.8f);
            bezier10Path.lineTo(8.67f, 11.8f);
            bezier10Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor5);
            canvas.drawPath(bezier10Path, paint);
            
            // Bezier 11
            RectF bezier11Rect = CacheForRage.bezier11Rect;
            bezier11Rect.set(3.73f, 6.2f, 13.6f, 15.2f);
            Path bezier11Path = CacheForRage.bezier11Path;
            bezier11Path.reset();
            bezier11Path.moveTo(13.6f, 7.2f);
            bezier11Path.lineTo(8.67f, 14.6f);
            bezier11Path.lineTo(8.67f, 6.2f);
            bezier11Path.lineTo(13.6f, 7.2f);
            bezier11Path.close();
            bezier11Path.moveTo(3.73f, 10.8f);
            bezier11Path.lineTo(8.67f, 11.8f);
            bezier11Path.lineTo(8.67f, 15.2f);
            bezier11Path.lineTo(3.73f, 10.8f);
            bezier11Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor94);
            canvas.drawPath(bezier11Path, paint);
            
            // Bezier 12
            RectF bezier12Rect = CacheForRage.bezier12Rect;
            bezier12Rect.set(8.67f, 10.8f, 13.6f, 15.2f);
            Path bezier12Path = CacheForRage.bezier12Path;
            bezier12Path.reset();
            bezier12Path.moveTo(8.67f, 11.8f);
            bezier12Path.lineTo(13.6f, 10.8f);
            bezier12Path.lineTo(8.67f, 15.2f);
            bezier12Path.lineTo(8.67f, 11.8f);
            bezier12Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor3);
            canvas.drawPath(bezier12Path, paint);
            
            // Bezier 13
            RectF bezier13Rect = CacheForRage.bezier13Rect;
            bezier13Rect.set(3.73f, 3.4f, 8.67f, 11.8f);
            Path bezier13Path = CacheForRage.bezier13Path;
            bezier13Path.reset();
            bezier13Path.moveTo(3.73f, 10.8f);
            bezier13Path.lineTo(8.67f, 3.4f);
            bezier13Path.lineTo(8.67f, 11.8f);
            bezier13Path.lineTo(3.73f, 10.8f);
            bezier13Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor5);
            canvas.drawPath(bezier13Path, paint);
            
            // Bezier 14
            RectF bezier14Rect = CacheForRage.bezier14Rect;
            bezier14Rect.set(5.5f, 4.67f, 11.83f, 13.33f);
            Path bezier14Path = CacheForRage.bezier14Path;
            bezier14Path.reset();
            bezier14Path.moveTo(5.5f, 10.53f);
            bezier14Path.lineTo(6.54f, 9f);
            bezier14Path.lineTo(5.5f, 7.47f);
            bezier14Path.lineTo(8.67f, 4.67f);
            bezier14Path.lineTo(11.83f, 7.47f);
            bezier14Path.lineTo(10.79f, 9f);
            bezier14Path.lineTo(11.83f, 10.53f);
            bezier14Path.lineTo(8.67f, 13.33f);
            bezier14Path.lineTo(5.5f, 10.53f);
            bezier14Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(fillColor3);
            canvas.drawPath(bezier14Path, paint);
        }
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawTaskDifficultyStars(Canvas canvas, int taskTintColor, float difficulty, boolean isActive) {
        HabiticaIcons.drawTaskDifficultyStars(canvas, new RectF(0f, 0f, 36f, 36f), ResizingBehavior.AspectFit, taskTintColor, difficulty, isActive);
    }
    
    public static void drawTaskDifficultyStars(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, int taskTintColor, float difficulty, boolean isActive) {
        // Local Variables
        boolean isTrivial = difficulty == 0.1f;
        boolean isHard = difficulty == 2f;
        boolean isEasy = difficulty == 1f;
        boolean isMedium = difficulty == 1.5f;
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForTaskDifficultyStars.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForTaskDifficultyStars.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 36f, resizedFrame.height() / 36f);
        
        // Group
        if (isEasy) {
            // Symbol 2
            RectF symbol2Rect = CacheForTaskDifficultyStars.symbol2Rect;
            symbol2Rect.set(0f, 9f, 16f, 25f);
            canvas.save();
            canvas.clipRect(symbol2Rect);
            canvas.translate(symbol2Rect.left, symbol2Rect.top);
            RectF symbol2TargetRect = CacheForTaskDifficultyStars.symbol2TargetRect;
            symbol2TargetRect.set(0f, 0f, symbol2Rect.width(), symbol2Rect.height());
            HabiticaIcons.drawTaskFormDifficultyStar(canvas, symbol2TargetRect, ResizingBehavior.Stretch, taskTintColor, isActive);
            canvas.restore();
            
            // Symbol 3
            RectF symbol3Rect = CacheForTaskDifficultyStars.symbol3Rect;
            symbol3Rect.set(20f, 9f, 36f, 25f);
            canvas.save();
            canvas.clipRect(symbol3Rect);
            canvas.translate(symbol3Rect.left, symbol3Rect.top);
            RectF symbol3TargetRect = CacheForTaskDifficultyStars.symbol3TargetRect;
            symbol3TargetRect.set(0f, 0f, symbol3Rect.width(), symbol3Rect.height());
            HabiticaIcons.drawTaskFormDifficultyStar(canvas, symbol3TargetRect, ResizingBehavior.Stretch, taskTintColor, isActive);
            canvas.restore();
        }
        
        // Group 2
        if (isMedium) {
            // Symbol 4
            RectF symbol4Rect = CacheForTaskDifficultyStars.symbol4Rect;
            symbol4Rect.set(10f, 0f, 26f, 16f);
            canvas.save();
            canvas.clipRect(symbol4Rect);
            canvas.translate(symbol4Rect.left, symbol4Rect.top);
            RectF symbol4TargetRect = CacheForTaskDifficultyStars.symbol4TargetRect;
            symbol4TargetRect.set(0f, 0f, symbol4Rect.width(), symbol4Rect.height());
            HabiticaIcons.drawTaskFormDifficultyStar(canvas, symbol4TargetRect, ResizingBehavior.Stretch, taskTintColor, isActive);
            canvas.restore();
            
            // Symbol 5
            RectF symbol5Rect = CacheForTaskDifficultyStars.symbol5Rect;
            symbol5Rect.set(20f, 13f, 36f, 29f);
            canvas.save();
            canvas.clipRect(symbol5Rect);
            canvas.translate(symbol5Rect.left, symbol5Rect.top);
            RectF symbol5TargetRect = CacheForTaskDifficultyStars.symbol5TargetRect;
            symbol5TargetRect.set(0f, 0f, symbol5Rect.width(), symbol5Rect.height());
            HabiticaIcons.drawTaskFormDifficultyStar(canvas, symbol5TargetRect, ResizingBehavior.Stretch, taskTintColor, isActive);
            canvas.restore();
            
            // Symbol 6
            RectF symbol6Rect = CacheForTaskDifficultyStars.symbol6Rect;
            symbol6Rect.set(0f, 13f, 16f, 29f);
            canvas.save();
            canvas.clipRect(symbol6Rect);
            canvas.translate(symbol6Rect.left, symbol6Rect.top);
            RectF symbol6TargetRect = CacheForTaskDifficultyStars.symbol6TargetRect;
            symbol6TargetRect.set(0f, 0f, symbol6Rect.width(), symbol6Rect.height());
            HabiticaIcons.drawTaskFormDifficultyStar(canvas, symbol6TargetRect, ResizingBehavior.Stretch, taskTintColor, isActive);
            canvas.restore();
        }
        
        // Group 3
        if (isHard) {
            // Symbol 7
            RectF symbol7Rect = CacheForTaskDifficultyStars.symbol7Rect;
            symbol7Rect.set(0f, 0f, 16f, 16f);
            canvas.save();
            canvas.clipRect(symbol7Rect);
            canvas.translate(symbol7Rect.left, symbol7Rect.top);
            RectF symbol7TargetRect = CacheForTaskDifficultyStars.symbol7TargetRect;
            symbol7TargetRect.set(0f, 0f, symbol7Rect.width(), symbol7Rect.height());
            HabiticaIcons.drawTaskFormDifficultyStar(canvas, symbol7TargetRect, ResizingBehavior.Stretch, taskTintColor, isActive);
            canvas.restore();
            
            // Symbol 8
            RectF symbol8Rect = CacheForTaskDifficultyStars.symbol8Rect;
            symbol8Rect.set(20f, 0f, 36f, 16f);
            canvas.save();
            canvas.clipRect(symbol8Rect);
            canvas.translate(symbol8Rect.left, symbol8Rect.top);
            RectF symbol8TargetRect = CacheForTaskDifficultyStars.symbol8TargetRect;
            symbol8TargetRect.set(0f, 0f, symbol8Rect.width(), symbol8Rect.height());
            HabiticaIcons.drawTaskFormDifficultyStar(canvas, symbol8TargetRect, ResizingBehavior.Stretch, taskTintColor, isActive);
            canvas.restore();
            
            // Symbol 9
            RectF symbol9Rect = CacheForTaskDifficultyStars.symbol9Rect;
            symbol9Rect.set(0f, 20f, 16f, 36f);
            canvas.save();
            canvas.clipRect(symbol9Rect);
            canvas.translate(symbol9Rect.left, symbol9Rect.top);
            RectF symbol9TargetRect = CacheForTaskDifficultyStars.symbol9TargetRect;
            symbol9TargetRect.set(0f, 0f, symbol9Rect.width(), symbol9Rect.height());
            HabiticaIcons.drawTaskFormDifficultyStar(canvas, symbol9TargetRect, ResizingBehavior.Stretch, taskTintColor, isActive);
            canvas.restore();
            
            // Symbol 10
            RectF symbol10Rect = CacheForTaskDifficultyStars.symbol10Rect;
            symbol10Rect.set(20f, 20f, 36f, 36f);
            canvas.save();
            canvas.clipRect(symbol10Rect);
            canvas.translate(symbol10Rect.left, symbol10Rect.top);
            RectF symbol10TargetRect = CacheForTaskDifficultyStars.symbol10TargetRect;
            symbol10TargetRect.set(0f, 0f, symbol10Rect.width(), symbol10Rect.height());
            HabiticaIcons.drawTaskFormDifficultyStar(canvas, symbol10TargetRect, ResizingBehavior.Stretch, taskTintColor, isActive);
            canvas.restore();
        }
        
        // Symbol
        if (isTrivial) {
            RectF symbolRect = CacheForTaskDifficultyStars.symbolRect;
            symbolRect.set(10f, 9f, 26f, 25f);
            canvas.save();
            canvas.clipRect(symbolRect);
            canvas.translate(symbolRect.left, symbolRect.top);
            RectF symbolTargetRect = CacheForTaskDifficultyStars.symbolTargetRect;
            symbolTargetRect.set(0f, 0f, symbolRect.width(), symbolRect.height());
            HabiticaIcons.drawTaskFormDifficultyStar(canvas, symbolTargetRect, ResizingBehavior.Stretch, taskTintColor, isActive);
            canvas.restore();
        }
        
        canvas.restore();
    }
    
    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();
    }
    
    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;
        
        // Local Colors
        int transparent = Color.argb(0, 204, 82, 82);
        int strokeColor15 = Color.argb(255, 195, 192, 199);
        
        // Local Variables
        int borderColor = isActive ? taskTintColor : strokeColor15;
        int starFillColor = isActive ? taskTintColor : transparent;
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForTaskFormDifficultyStar.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForTaskFormDifficultyStar.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 16f, resizedFrame.height() / 16f);
        
        // Star 3
        RectF star3Rect = CacheForTaskFormDifficultyStar.star3Rect;
        star3Rect.set(1f, 1f, 15f, 15f);
        Path star3Path = CacheForTaskFormDifficultyStar.star3Path;
        star3Path.reset();
        star3Path.moveTo(8f, 1f);
        star3Path.lineTo(10.33f, 5.67f);
        star3Path.lineTo(15f, 8f);
        star3Path.lineTo(10.33f, 10.33f);
        star3Path.lineTo(8f, 15f);
        star3Path.lineTo(5.67f, 10.33f);
        star3Path.lineTo(1f, 8f);
        star3Path.lineTo(5.67f, 5.67f);
        star3Path.lineTo(8f, 1f);
        star3Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(starFillColor);
        canvas.drawPath(star3Path, 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(star3Path, paint);
        canvas.restore();
        
        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 strokeColor15 = Color.argb(255, 195, 192, 199);
        int fillColor37 = Color.argb(255, 255, 255, 255);
        int transparent = Color.argb(0, 204, 82, 82);
        
        // Local Variables
        int controlFillColor = isActive ? fillColor37 : strokeColor15;
        int borderColor = isActive ? taskTintColor : strokeColor15;
        int starFillColor = isActive ? taskTintColor : transparent;
        
        // 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 strokeColor15 = Color.argb(255, 195, 192, 199);
        int fillColor37 = Color.argb(255, 255, 255, 255);
        int transparent = Color.argb(0, 204, 82, 82);
        
        // Local Variables
        int controlFillColor = isActive ? fillColor37 : strokeColor15;
        int borderColor = isActive ? taskTintColor : strokeColor15;
        int starFillColor = isActive ? taskTintColor : transparent;
        
        // 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();
    }
    
    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;
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForLocked.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForLocked.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 15f, resizedFrame.height() / 17f);
        
        // Group 3
        {
            // Rectangle
            RectF rectangleRect = CacheForLocked.rectangleRect;
            rectangleRect.set(6f, 10f, 9f, 13f);
            Path rectanglePath = CacheForLocked.rectanglePath;
            rectanglePath.reset();
            rectanglePath.addRect(rectangleRect, Path.Direction.CW);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(lockColor);
            canvas.drawPath(rectanglePath, paint);
            
            // Group
            {
                RectF group = CacheForLocked.group;
                group.set(0f, 6f, 15f, 17f);
                canvas.save();
                
                // Clip
                Path clipPath = CacheForLocked.clipPath;
                clipPath.reset();
                clipPath.moveTo(2f, 6f);
                clipPath.lineTo(13f, 6f);
                clipPath.cubicTo(14.1f, 6f, 15f, 6.9f, 15f, 8f);
                clipPath.lineTo(15f, 15f);
                clipPath.cubicTo(15f, 16.1f, 14.1f, 17f, 13f, 17f);
                clipPath.lineTo(2f, 17f);
                clipPath.cubicTo(0.9f, 17f, 0f, 16.1f, 0f, 15f);
                clipPath.lineTo(0f, 8f);
                clipPath.cubicTo(0f, 6.9f, 0.9f, 6f, 2f, 6f);
                clipPath.close();
                canvas.clipPath(clipPath);
                
                // Bezier
                RectF bezierRect = CacheForLocked.bezierRect;
                bezierRect.set(0f, 6f, 15f, 17f);
                Path bezierPath = CacheForLocked.bezierPath;
                bezierPath.reset();
                bezierPath.moveTo(2f, 6f);
                bezierPath.lineTo(13f, 6f);
                bezierPath.cubicTo(14.1f, 6f, 15f, 6.9f, 15f, 8f);
                bezierPath.lineTo(15f, 15f);
                bezierPath.cubicTo(15f, 16.1f, 14.1f, 17f, 13f, 17f);
                bezierPath.lineTo(2f, 17f);
                bezierPath.cubicTo(0.9f, 17f, 0f, 16.1f, 0f, 15f);
                bezierPath.lineTo(0f, 8f);
                bezierPath.cubicTo(0f, 6.9f, 0.9f, 6f, 2f, 6f);
                bezierPath.close();
                
                paint.reset();
                paint.setFlags(Paint.ANTI_ALIAS_FLAG);
                paint.setStrokeWidth(4f);
                paint.setStrokeMiter(10f);
                canvas.save();
                paint.setStyle(Paint.Style.STROKE);
                paint.setColor(lockColor);
                canvas.drawPath(bezierPath, paint);
                canvas.restore();
                
                canvas.restore();
            }
            
            // Group 2
            {
                RectF group2 = CacheForLocked.group2;
                group2.set(2f, 0f, 13f, 8f);
                canvas.save();
                
                // Clip 2
                Path clip2Path = CacheForLocked.clip2Path;
                clip2Path.reset();
                clip2Path.moveTo(7.5f, 0f);
                clip2Path.lineTo(7.5f, 0f);
                clip2Path.cubicTo(10.54f, 0f, 13f, 2.46f, 13f, 5.5f);
                clip2Path.lineTo(13f, 8f);
                clip2Path.lineTo(2f, 8f);
                clip2Path.lineTo(2f, 5.5f);
                clip2Path.cubicTo(2f, 2.46f, 4.46f, 0f, 7.5f, 0f);
                clip2Path.close();
                canvas.clipPath(clip2Path);
                
                // Bezier 3
                RectF bezier3Rect = CacheForLocked.bezier3Rect;
                bezier3Rect.set(2f, 0f, 13f, 8f);
                Path bezier3Path = CacheForLocked.bezier3Path;
                bezier3Path.reset();
                bezier3Path.moveTo(7.5f, 0f);
                bezier3Path.lineTo(7.5f, 0f);
                bezier3Path.cubicTo(10.54f, 0f, 13f, 2.46f, 13f, 5.5f);
                bezier3Path.lineTo(13f, 8f);
                bezier3Path.lineTo(2f, 8f);
                bezier3Path.lineTo(2f, 5.5f);
                bezier3Path.cubicTo(2f, 2.46f, 4.46f, 0f, 7.5f, 0f);
                bezier3Path.close();
                
                paint.reset();
                paint.setFlags(Paint.ANTI_ALIAS_FLAG);
                paint.setStrokeWidth(4f);
                paint.setStrokeMiter(10f);
                canvas.save();
                paint.setStyle(Paint.Style.STROKE);
                paint.setColor(lockColor);
                canvas.drawPath(bezier3Path, paint);
                canvas.restore();
                
                canvas.restore();
            }
        }
        
        canvas.restore();
    }
    
    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();
    }
    
    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, Context context, RectF targetFrame, ResizingBehavior resizing, boolean isOwner, boolean isPublic, float memberCount, String memberCountLabel) {
        // General Declarations
        Stack<Matrix> currentTransformation = new Stack<Matrix>();
        currentTransformation.push(new Matrix());
        Paint paint = CacheForGuildCrest.paint;
        
        // Local Colors
        int crestSilver5 = Color.argb(255, 141, 141, 141);
        int crestBronze3 = Color.argb(255, 179, 98, 19);
        int crestGold5 = Color.argb(255, 223, 145, 30);
        int crestSilver6 = Color.argb(255, 141, 141, 141);
        int crestBronze2 = Color.argb(255, 244, 165, 89);
        int crestGold6 = Color.argb(255, 223, 145, 30);
        int crestSilver4 = Color.argb(255, 175, 175, 175);
        int crestBronze1 = Color.argb(255, 234, 140, 49);
        int crestGold4 = Color.argb(255, 255, 166, 35);
        int crestSilver3 = Color.argb(255, 141, 141, 141);
        int crestGold3 = Color.argb(255, 223, 145, 30);
        int crestSilver1 = Color.argb(255, 194, 194, 194);
        int crestGold2 = Color.argb(255, 255, 210, 145);
        int crestBronze6 = Color.argb(255, 179, 98, 19);
        int crestGold1 = Color.argb(255, 255, 188, 90);
        int crestBronze5 = Color.argb(255, 179, 98, 19);
        int crestSilver2 = Color.argb(255, 217, 217, 217);
        int crestBronze4 = Color.argb(255, 215, 122, 32);
        
        // Local Variables
        boolean isPrivate = !isPublic;
        int crestColor1 = memberCount < 100f ? crestBronze1 : (memberCount < 1000f ? crestSilver1 : crestGold1);
        int crestColor4 = memberCount < 100f ? crestBronze4 : (memberCount < 1000f ? crestSilver4 : crestGold4);
        int crestColor6 = memberCount < 100f ? crestBronze6 : (memberCount < 1000f ? crestSilver6 : crestGold6);
        int crestColor2 = memberCount < 100f ? crestBronze2 : (memberCount < 1000f ? crestSilver2 : crestGold2);
        int crestColor3 = memberCount < 100f ? crestBronze3 : (memberCount < 1000f ? crestSilver3 : crestGold3);
        int crestColor5 = memberCount < 100f ? crestBronze5 : (memberCount < 1000f ? crestSilver5 : crestGold5);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForGuildCrest.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForGuildCrest.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 40f, resizedFrame.height() / 38f);
        
        // Group
        if (isPublic) {
            RectF group = CacheForGuildCrest.group;
            group.set(0f, 0f, 40f, 38f);
            canvas.save();
            
            // Clip 5
            Path clip5Path = CacheForGuildCrest.clip5Path;
            clip5Path.reset();
            clip5Path.moveTo(20.5f, 38f);
            clip5Path.lineTo(33.14f, 30.6f);
            clip5Path.cubicTo(33.01f, 22.28f, 33.81f, 13.48f, 40f, 4.93f);
            clip5Path.cubicTo(29.47f, 3.77f, 26.58f, 0f, 20.5f, 0f);
            clip5Path.cubicTo(14.6f, 0f, 10.53f, 3.77f, 0f, 4.93f);
            clip5Path.cubicTo(6.19f, 13.48f, 6.99f, 22.28f, 6.86f, 30.6f);
            clip5Path.lineTo(20.5f, 38f);
            clip5Path.close();
            canvas.clipPath(clip5Path);
            
            // Rectangle
            RectF rectangleRect = CacheForGuildCrest.rectangleRect;
            rectangleRect.set(-5f, -5f, 45f, 43f);
            Path rectanglePath = CacheForGuildCrest.rectanglePath;
            rectanglePath.reset();
            rectanglePath.addRect(rectangleRect, Path.Direction.CW);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(crestColor1);
            canvas.drawPath(rectanglePath, paint);
            
            // Rectangle 2
            canvas.save();
            canvas.translate(23.03f, 23.53f);
            currentTransformation.peek().postTranslate(23.03f, 23.53f);
            canvas.rotate(-45f);
            currentTransformation.peek().postRotate(-45f);
            RectF rectangle2Rect = CacheForGuildCrest.rectangle2Rect;
            rectangle2Rect.set(-6.01f, -38f, 6.01f, 38f);
            Path rectangle2Path = CacheForGuildCrest.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(crestColor2);
            canvas.drawPath(rectangle2Path, paint);
            canvas.restore();
            
            // Rectangle 4
            canvas.save();
            canvas.translate(35f, 22f);
            currentTransformation.peek().postTranslate(35f, 22f);
            canvas.rotate(-45f);
            currentTransformation.peek().postRotate(-45f);
            RectF rectangle4Rect = CacheForGuildCrest.rectangle4Rect;
            rectangle4Rect.set(-1f, -38f, 1f, 38f);
            Path rectangle4Path = CacheForGuildCrest.rectangle4Path;
            rectangle4Path.reset();
            rectangle4Path.addRect(rectangle4Rect, Path.Direction.CW);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(crestColor2);
            canvas.drawPath(rectangle4Path, paint);
            canvas.restore();
            
            // Bezier 2
            RectF bezier2Rect = CacheForGuildCrest.bezier2Rect;
            bezier2Rect.set(0f, 0f, 40f, 38f);
            Path bezier2Path = CacheForGuildCrest.bezier2Path;
            bezier2Path.reset();
            bezier2Path.moveTo(20.5f, 38f);
            bezier2Path.lineTo(33.14f, 30.6f);
            bezier2Path.cubicTo(33.01f, 22.28f, 33.81f, 13.48f, 40f, 4.93f);
            bezier2Path.cubicTo(29.47f, 3.77f, 26.58f, 0f, 20.5f, 0f);
            bezier2Path.cubicTo(14.6f, 0f, 10.53f, 3.77f, 0f, 4.93f);
            bezier2Path.cubicTo(6.19f, 13.48f, 6.99f, 22.28f, 6.86f, 30.6f);
            bezier2Path.lineTo(20.5f, 38f);
            bezier2Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStrokeWidth(10f);
            paint.setStrokeMiter(10f);
            canvas.save();
            paint.setStyle(Paint.Style.STROKE);
            paint.setColor(crestColor3);
            canvas.drawPath(bezier2Path, paint);
            canvas.restore();
            
            // Bezier 4
            RectF bezier4Rect = CacheForGuildCrest.bezier4Rect;
            bezier4Rect.set(0f, -0f, 40f, 38f);
            Path bezier4Path = CacheForGuildCrest.bezier4Path;
            bezier4Path.reset();
            bezier4Path.moveTo(20.5f, 38f);
            bezier4Path.lineTo(33.14f, 30.6f);
            bezier4Path.cubicTo(33.01f, 22.28f, 33.81f, 13.48f, 40f, 4.93f);
            bezier4Path.cubicTo(29.47f, 3.77f, 26.58f, -0f, 20.5f, -0f);
            bezier4Path.cubicTo(14.6f, -0f, 10.53f, 3.77f, 0f, 4.93f);
            bezier4Path.cubicTo(6.19f, 13.48f, 6.99f, 22.28f, 6.86f, 30.6f);
            bezier4Path.lineTo(20.5f, 38f);
            bezier4Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStrokeWidth(6f);
            paint.setStrokeMiter(10f);
            canvas.save();
            paint.setStyle(Paint.Style.STROKE);
            paint.setColor(crestColor4);
            canvas.drawPath(bezier4Path, paint);
            canvas.restore();
            
            // Bezier 7
            if (isOwner) {
                RectF bezier7Rect = CacheForGuildCrest.bezier7Rect;
                bezier7Rect.set(10.85f, 8.25f, 15.75f, 13.16f);
                Path bezier7Path = CacheForGuildCrest.bezier7Path;
                bezier7Path.reset();
                bezier7Path.moveTo(13.3f, 12.54f);
                bezier7Path.lineTo(12.37f, 13.05f);
                bezier7Path.cubicTo(11.89f, 13.31f, 11.57f, 13.08f, 11.65f, 12.55f);
                bezier7Path.lineTo(11.84f, 11.43f);
                bezier7Path.lineTo(11.07f, 10.65f);
                bezier7Path.cubicTo(10.69f, 10.26f, 10.82f, 9.87f, 11.36f, 9.79f);
                bezier7Path.lineTo(12.4f, 9.63f);
                bezier7Path.lineTo(12.87f, 8.63f);
                bezier7Path.cubicTo(13.11f, 8.13f, 13.49f, 8.12f, 13.73f, 8.63f);
                bezier7Path.lineTo(14.2f, 9.63f);
                bezier7Path.lineTo(15.24f, 9.79f);
                bezier7Path.cubicTo(15.78f, 9.87f, 15.92f, 10.25f, 15.53f, 10.65f);
                bezier7Path.lineTo(14.76f, 11.43f);
                bezier7Path.lineTo(14.95f, 12.55f);
                bezier7Path.cubicTo(15.04f, 13.09f, 14.72f, 13.32f, 14.23f, 13.05f);
                bezier7Path.lineTo(13.3f, 12.54f);
                bezier7Path.close();
                
                paint.reset();
                paint.setFlags(Paint.ANTI_ALIAS_FLAG);
                bezier7Path.setFillType(Path.FillType.EVEN_ODD);
                paint.setStyle(Paint.Style.FILL);
                paint.setColor(crestColor6);
                canvas.drawPath(bezier7Path, paint);
            }
            
            // Bezier 8
            if (isOwner) {
                RectF bezier8Rect = CacheForGuildCrest.bezier8Rect;
                bezier8Rect.set(24.25f, 8.25f, 29.15f, 13.16f);
                Path bezier8Path = CacheForGuildCrest.bezier8Path;
                bezier8Path.reset();
                bezier8Path.moveTo(26.7f, 12.54f);
                bezier8Path.lineTo(25.77f, 13.05f);
                bezier8Path.cubicTo(25.29f, 13.31f, 24.97f, 13.08f, 25.05f, 12.55f);
                bezier8Path.lineTo(25.24f, 11.43f);
                bezier8Path.lineTo(24.47f, 10.65f);
                bezier8Path.cubicTo(24.09f, 10.26f, 24.22f, 9.87f, 24.76f, 9.79f);
                bezier8Path.lineTo(25.8f, 9.63f);
                bezier8Path.lineTo(26.27f, 8.63f);
                bezier8Path.cubicTo(26.51f, 8.13f, 26.89f, 8.12f, 27.13f, 8.63f);
                bezier8Path.lineTo(27.6f, 9.63f);
                bezier8Path.lineTo(28.64f, 9.79f);
                bezier8Path.cubicTo(29.18f, 9.87f, 29.32f, 10.25f, 28.93f, 10.65f);
                bezier8Path.lineTo(28.16f, 11.43f);
                bezier8Path.lineTo(28.35f, 12.55f);
                bezier8Path.cubicTo(28.44f, 13.09f, 28.12f, 13.32f, 27.63f, 13.05f);
                bezier8Path.lineTo(26.7f, 12.54f);
                bezier8Path.close();
                
                paint.reset();
                paint.setFlags(Paint.ANTI_ALIAS_FLAG);
                bezier8Path.setFillType(Path.FillType.EVEN_ODD);
                paint.setStyle(Paint.Style.FILL);
                paint.setColor(crestColor6);
                canvas.drawPath(bezier8Path, paint);
            }
            
            canvas.restore();
        }
        
        // Group 8
        if (isPrivate) {
            RectF group8 = CacheForGuildCrest.group8;
            group8.set(3f, 0f, 37f, 38f);
            canvas.save();
            
            // Clip 14
            Path clip14Path = CacheForGuildCrest.clip14Path;
            clip14Path.reset();
            clip14Path.moveTo(20f, 0f);
            clip14Path.lineTo(3f, 7.62f);
            clip14Path.cubicTo(3f, 22.85f, 5.07f, 31.47f, 20f, 38f);
            clip14Path.cubicTo(34.93f, 31.47f, 37f, 22.85f, 37f, 7.62f);
            clip14Path.lineTo(20f, 0f);
            clip14Path.close();
            canvas.clipPath(clip14Path);
            
            // Rectangle 3
            RectF rectangle3Rect = CacheForGuildCrest.rectangle3Rect;
            rectangle3Rect.set(2f, 0f, 37f, 38f);
            Path rectangle3Path = CacheForGuildCrest.rectangle3Path;
            rectangle3Path.reset();
            rectangle3Path.addRect(rectangle3Rect, Path.Direction.CW);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(crestColor1);
            canvas.drawPath(rectangle3Path, paint);
            
            // Rectangle 8
            canvas.save();
            canvas.translate(23.7f, 10.7f);
            currentTransformation.peek().postTranslate(23.7f, 10.7f);
            canvas.rotate(-45f);
            currentTransformation.peek().postRotate(-45f);
            RectF rectangle8Rect = CacheForGuildCrest.rectangle8Rect;
            rectangle8Rect.set(-1f, -11f, 1f, 11f);
            Path rectangle8Path = CacheForGuildCrest.rectangle8Path;
            rectangle8Path.reset();
            rectangle8Path.addRect(rectangle8Rect, Path.Direction.CW);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(crestColor2);
            canvas.drawPath(rectangle8Path, paint);
            canvas.restore();
            
            // Rectangle 5
            canvas.save();
            canvas.translate(17.73f, 24f);
            currentTransformation.peek().postTranslate(17.73f, 24f);
            canvas.rotate(45f);
            currentTransformation.peek().postRotate(45f);
            RectF rectangle5Rect = CacheForGuildCrest.rectangle5Rect;
            rectangle5Rect.set(-19f, -10f, 19f, 10f);
            Path rectangle5Path = CacheForGuildCrest.rectangle5Path;
            rectangle5Path.reset();
            rectangle5Path.addRect(rectangle5Rect, Path.Direction.CW);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(crestColor2);
            canvas.drawPath(rectangle5Path, paint);
            canvas.restore();
            
            // Bezier 3
            RectF bezier3Rect = CacheForGuildCrest.bezier3Rect;
            bezier3Rect.set(3f, 0f, 37f, 38f);
            Path bezier3Path = CacheForGuildCrest.bezier3Path;
            bezier3Path.reset();
            bezier3Path.moveTo(20f, 0f);
            bezier3Path.lineTo(3f, 7.62f);
            bezier3Path.cubicTo(3f, 22.85f, 5.07f, 31.47f, 20f, 38f);
            bezier3Path.cubicTo(34.93f, 31.47f, 37f, 22.85f, 37f, 7.62f);
            bezier3Path.lineTo(20f, 0f);
            bezier3Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStrokeWidth(10f);
            paint.setStrokeMiter(10f);
            canvas.save();
            paint.setStyle(Paint.Style.STROKE);
            paint.setColor(crestColor3);
            canvas.drawPath(bezier3Path, paint);
            canvas.restore();
            
            // Bezier 6
            RectF bezier6Rect = CacheForGuildCrest.bezier6Rect;
            bezier6Rect.set(3f, 0f, 37f, 38f);
            Path bezier6Path = CacheForGuildCrest.bezier6Path;
            bezier6Path.reset();
            bezier6Path.moveTo(20f, 0f);
            bezier6Path.lineTo(3f, 7.62f);
            bezier6Path.cubicTo(3f, 22.85f, 5.07f, 31.47f, 20f, 38f);
            bezier6Path.cubicTo(34.93f, 31.47f, 37f, 22.85f, 37f, 7.62f);
            bezier6Path.lineTo(20f, 0f);
            bezier6Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStrokeWidth(6f);
            paint.setStrokeMiter(10f);
            canvas.save();
            paint.setStyle(Paint.Style.STROKE);
            paint.setColor(crestColor4);
            canvas.drawPath(bezier6Path, paint);
            canvas.restore();
            
            // Bezier 14
            if (isOwner) {
                RectF bezier14Rect = CacheForGuildCrest.bezier14Rect;
                bezier14Rect.set(25.85f, 10.85f, 30.75f, 15.76f);
                Path bezier14Path = CacheForGuildCrest.bezier14Path;
                bezier14Path.reset();
                bezier14Path.moveTo(28.3f, 15.14f);
                bezier14Path.lineTo(27.37f, 15.65f);
                bezier14Path.cubicTo(26.89f, 15.91f, 26.57f, 15.69f, 26.65f, 15.15f);
                bezier14Path.lineTo(26.84f, 14.03f);
                bezier14Path.lineTo(26.07f, 13.25f);
                bezier14Path.cubicTo(25.69f, 12.86f, 25.82f, 12.47f, 26.36f, 12.39f);
                bezier14Path.lineTo(27.4f, 12.23f);
                bezier14Path.lineTo(27.87f, 11.23f);
                bezier14Path.cubicTo(28.11f, 10.73f, 28.49f, 10.72f, 28.73f, 11.23f);
                bezier14Path.lineTo(29.2f, 12.23f);
                bezier14Path.lineTo(30.24f, 12.39f);
                bezier14Path.cubicTo(30.78f, 12.47f, 30.92f, 12.85f, 30.53f, 13.25f);
                bezier14Path.lineTo(29.76f, 14.03f);
                bezier14Path.lineTo(29.95f, 15.15f);
                bezier14Path.cubicTo(30.04f, 15.69f, 29.72f, 15.92f, 29.23f, 15.65f);
                bezier14Path.lineTo(28.3f, 15.14f);
                bezier14Path.close();
                
                paint.reset();
                paint.setFlags(Paint.ANTI_ALIAS_FLAG);
                bezier14Path.setFillType(Path.FillType.EVEN_ODD);
                paint.setStyle(Paint.Style.FILL);
                paint.setColor(crestColor6);
                canvas.drawPath(bezier14Path, paint);
            }
            
            // Bezier 15
            if (isOwner) {
                RectF bezier15Rect = CacheForGuildCrest.bezier15Rect;
                bezier15Rect.set(9.25f, 10.85f, 14.15f, 15.76f);
                Path bezier15Path = CacheForGuildCrest.bezier15Path;
                bezier15Path.reset();
                bezier15Path.moveTo(11.7f, 15.14f);
                bezier15Path.lineTo(10.77f, 15.65f);
                bezier15Path.cubicTo(10.29f, 15.91f, 9.97f, 15.69f, 10.05f, 15.15f);
                bezier15Path.lineTo(10.24f, 14.03f);
                bezier15Path.lineTo(9.47f, 13.25f);
                bezier15Path.cubicTo(9.09f, 12.86f, 9.22f, 12.47f, 9.76f, 12.39f);
                bezier15Path.lineTo(10.8f, 12.23f);
                bezier15Path.lineTo(11.27f, 11.23f);
                bezier15Path.cubicTo(11.51f, 10.73f, 11.89f, 10.72f, 12.13f, 11.23f);
                bezier15Path.lineTo(12.6f, 12.23f);
                bezier15Path.lineTo(13.64f, 12.39f);
                bezier15Path.cubicTo(14.18f, 12.47f, 14.32f, 12.85f, 13.93f, 13.25f);
                bezier15Path.lineTo(13.16f, 14.03f);
                bezier15Path.lineTo(13.35f, 15.15f);
                bezier15Path.cubicTo(13.44f, 15.69f, 13.12f, 15.92f, 12.63f, 15.65f);
                bezier15Path.lineTo(11.7f, 15.14f);
                bezier15Path.close();
                
                paint.reset();
                paint.setFlags(Paint.ANTI_ALIAS_FLAG);
                bezier15Path.setFillType(Path.FillType.EVEN_ODD);
                paint.setStyle(Paint.Style.FILL);
                paint.setColor(crestColor6);
                canvas.drawPath(bezier15Path, paint);
            }
            
            canvas.restore();
        }
        
        // Bezier 13
        RectF bezier13Rect = CacheForGuildCrest.bezier13Rect;
        bezier13Rect.set(15f, 7f, 25f, 17f);
        Path bezier13Path = CacheForGuildCrest.bezier13Path;
        bezier13Path.reset();
        bezier13Path.moveTo(20f, 12.72f);
        bezier13Path.cubicTo(18.33f, 12.72f, 15f, 13.55f, 15f, 15.22f);
        bezier13Path.lineTo(15f, 17f);
        bezier13Path.lineTo(25f, 17f);
        bezier13Path.lineTo(25f, 15.22f);
        bezier13Path.cubicTo(25f, 13.55f, 21.67f, 12.72f, 20f, 12.72f);
        bezier13Path.close();
        bezier13Path.moveTo(20f, 7f);
        bezier13Path.cubicTo(18.82f, 7f, 17.86f, 7.96f, 17.86f, 9.14f);
        bezier13Path.cubicTo(17.86f, 10.33f, 18.82f, 11.29f, 20f, 11.29f);
        bezier13Path.cubicTo(21.18f, 11.29f, 22.14f, 10.33f, 22.14f, 9.14f);
        bezier13Path.cubicTo(22.14f, 7.96f, 21.18f, 7f, 20f, 7f);
        bezier13Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier13Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(crestColor6);
        canvas.drawPath(bezier13Path, paint);
        
        // Bezier 10
        RectF bezier10Rect = CacheForGuildCrest.bezier10Rect;
        bezier10Rect.set(2f, 19f, 38f, 34f);
        Path bezier10Path = CacheForGuildCrest.bezier10Path;
        bezier10Path.reset();
        bezier10Path.moveTo(2f, 26.5f);
        bezier10Path.cubicTo(2f, 22.36f, 5.35f, 19f, 9.5f, 19f);
        bezier10Path.lineTo(30.5f, 19f);
        bezier10Path.cubicTo(34.64f, 19f, 38f, 22.37f, 38f, 26.5f);
        bezier10Path.lineTo(38f, 26.5f);
        bezier10Path.cubicTo(38f, 30.64f, 34.65f, 34f, 30.5f, 34f);
        bezier10Path.lineTo(9.5f, 34f);
        bezier10Path.cubicTo(5.36f, 34f, 2f, 30.63f, 2f, 26.5f);
        bezier10Path.lineTo(2f, 26.5f);
        bezier10Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier10Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(Color.WHITE);
        canvas.drawPath(bezier10Path, paint);
        
        // Bezier 11
        RectF bezier11Rect = CacheForGuildCrest.bezier11Rect;
        bezier11Rect.set(2f, 19f, 38f, 34f);
        Path bezier11Path = CacheForGuildCrest.bezier11Path;
        bezier11Path.reset();
        bezier11Path.moveTo(2f, 26.5f);
        bezier11Path.cubicTo(2f, 22.36f, 5.35f, 19f, 9.5f, 19f);
        bezier11Path.lineTo(30.5f, 19f);
        bezier11Path.cubicTo(34.64f, 19f, 38f, 22.37f, 38f, 26.5f);
        bezier11Path.lineTo(38f, 26.5f);
        bezier11Path.cubicTo(38f, 30.64f, 34.65f, 34f, 30.5f, 34f);
        bezier11Path.lineTo(9.5f, 34f);
        bezier11Path.cubicTo(5.36f, 34f, 2f, 30.63f, 2f, 26.5f);
        bezier11Path.lineTo(2f, 26.5f);
        bezier11Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        paint.setStrokeWidth(2f);
        paint.setStrokeMiter(10f);
        canvas.save();
        paint.setStyle(Paint.Style.STROKE);
        paint.setColor(crestColor3);
        canvas.drawPath(bezier11Path, paint);
        canvas.restore();
        
        // Label
        RectF labelRect = CacheForGuildCrest.labelRect;
        labelRect.set(4f, 20f, 36f, 33f);
        TextPaint labelTextPaint = CacheForGuildCrest.labelTextPaint;
        labelTextPaint.reset();
        labelTextPaint.setFlags(Paint.ANTI_ALIAS_FLAG);
        labelTextPaint.setColor(crestColor5);
        labelTextPaint.setTypeface(Typeface.createFromAsset(context.getAssets(), "HelveticaNeue.ttc"));
        labelTextPaint.setTextSize(12f);
        StaticLayout labelStaticLayout = CacheForGuildCrest.labelStaticLayout.get((int) labelRect.width(), Layout.Alignment.ALIGN_CENTER, memberCountLabel, labelTextPaint);
        canvas.save();
        canvas.clipRect(labelRect);
        canvas.translate(labelRect.left, labelRect.top + (labelRect.height() - labelStaticLayout.getHeight()) / 2f);
        labelStaticLayout.draw(canvas);
        canvas.restore();
        
        canvas.restore();
    }
    
    private static class CacheForGuildCrestMedium {
        private static Paint paint = new Paint();
        private static RectF originalFrame = new RectF(0f, 0f, 30f, 34f);
        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 bezier6Rect = new RectF();
        private static Path bezier6Path = new Path();
    }
    
    public static void drawGuildCrestMedium(Canvas canvas, float memberCount) {
        HabiticaIcons.drawGuildCrestMedium(canvas, new RectF(0f, 0f, 30f, 34f), ResizingBehavior.AspectFit, memberCount);
    }
    
    public static void drawGuildCrestMedium(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, float memberCount) {
        // General Declarations
        Stack<Matrix> currentTransformation = new Stack<Matrix>();
        currentTransformation.push(new Matrix());
        Paint paint = CacheForGuildCrestMedium.paint;
        
        // Local Colors
        int crestBronze3 = Color.argb(255, 179, 98, 19);
        int crestSilver6 = Color.argb(255, 141, 141, 141);
        int crestBronze2 = Color.argb(255, 244, 165, 89);
        int crestGold6 = Color.argb(255, 223, 145, 30);
        int crestSilver4 = Color.argb(255, 175, 175, 175);
        int crestBronze1 = Color.argb(255, 234, 140, 49);
        int crestGold4 = Color.argb(255, 255, 166, 35);
        int crestSilver3 = Color.argb(255, 141, 141, 141);
        int crestGold3 = Color.argb(255, 223, 145, 30);
        int crestSilver1 = Color.argb(255, 194, 194, 194);
        int crestGold2 = Color.argb(255, 255, 210, 145);
        int crestBronze6 = Color.argb(255, 179, 98, 19);
        int crestGold1 = Color.argb(255, 255, 188, 90);
        int crestSilver2 = Color.argb(255, 217, 217, 217);
        int crestBronze4 = Color.argb(255, 215, 122, 32);
        
        // Local Variables
        int crestColor6 = memberCount < 100f ? crestBronze6 : (memberCount < 1000f ? crestSilver6 : crestGold6);
        int crestColor3 = memberCount < 100f ? crestBronze3 : (memberCount < 1000f ? crestSilver3 : crestGold3);
        int crestColor1 = memberCount < 100f ? crestBronze1 : (memberCount < 1000f ? crestSilver1 : crestGold1);
        int crestColor2 = memberCount < 100f ? crestBronze2 : (memberCount < 1000f ? crestSilver2 : crestGold2);
        int crestColor4 = memberCount < 100f ? crestBronze4 : (memberCount < 1000f ? crestSilver4 : crestGold4);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForGuildCrestMedium.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForGuildCrestMedium.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 30f, resizedFrame.height() / 34f);
        
        // Group
        {
            RectF group = CacheForGuildCrestMedium.group;
            group.set(0f, 0f, 30f, 34f);
            canvas.save();
            
            // Clip 5
            Path clip5Path = CacheForGuildCrestMedium.clip5Path;
            clip5Path.reset();
            clip5Path.moveTo(15f, 0f);
            clip5Path.lineTo(0f, 7f);
            clip5Path.cubicTo(0f, 21f, 1f, 28f, 15f, 34f);
            clip5Path.cubicTo(29f, 28f, 30f, 21f, 30f, 7f);
            clip5Path.lineTo(15f, 0f);
            clip5Path.close();
            canvas.clipPath(clip5Path);
            
            // Rectangle
            RectF rectangleRect = CacheForGuildCrestMedium.rectangleRect;
            rectangleRect.set(-5f, -5f, 35f, 39f);
            Path rectanglePath = CacheForGuildCrestMedium.rectanglePath;
            rectanglePath.reset();
            rectanglePath.addRect(rectangleRect, Path.Direction.CW);
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(crestColor1);
            canvas.drawPath(rectanglePath, paint);
            
            // Rectangle 2
            canvas.save();
            canvas.translate(14.44f, 17.06f);
            currentTransformation.peek().postTranslate(14.44f, 17.06f);
            canvas.rotate(45f);
            currentTransformation.peek().postRotate(45f);
            RectF rectangle2Rect = CacheForGuildCrestMedium.rectangle2Rect;
            rectangle2Rect.set(-12.37f, -4f, 12.37f, 4f);
            Path rectangle2Path = CacheForGuildCrestMedium.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(crestColor2);
            canvas.drawPath(rectangle2Path, paint);
            canvas.restore();
            
            // Rectangle 4
            canvas.save();
            canvas.translate(17.86f, 10.71f);
            currentTransformation.peek().postTranslate(17.86f, 10.71f);
            canvas.rotate(-45f);
            currentTransformation.peek().postRotate(-45f);
            RectF rectangle4Rect = CacheForGuildCrestMedium.rectangle4Rect;
            rectangle4Rect.set(-1f, -12.5f, 1f, 12.5f);
            Path rectangle4Path = CacheForGuildCrestMedium.rectangle4Path;
            rectangle4Path.reset();
            rectangle4Path.moveTo(rectangle4Rect.left, rectangle4Rect.top);
            rectangle4Path.lineTo(rectangle4Rect.right, rectangle4Rect.top);
            rectangle4Path.lineTo(rectangle4Rect.right, rectangle4Rect.bottom);
            rectangle4Path.lineTo(rectangle4Rect.left, rectangle4Rect.bottom);
            rectangle4Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(crestColor2);
            canvas.drawPath(rectangle4Path, paint);
            canvas.restore();
            
            // Bezier 2
            RectF bezier2Rect = CacheForGuildCrestMedium.bezier2Rect;
            bezier2Rect.set(0f, 0f, 30f, 34f);
            Path bezier2Path = CacheForGuildCrestMedium.bezier2Path;
            bezier2Path.reset();
            bezier2Path.moveTo(15f, 0f);
            bezier2Path.lineTo(0f, 7f);
            bezier2Path.cubicTo(0f, 21f, 1f, 28f, 15f, 34f);
            bezier2Path.cubicTo(29f, 28f, 30f, 21f, 30f, 7f);
            bezier2Path.lineTo(15f, 0f);
            bezier2Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStrokeWidth(10f);
            paint.setStrokeMiter(10f);
            canvas.save();
            paint.setStyle(Paint.Style.STROKE);
            paint.setColor(crestColor3);
            canvas.drawPath(bezier2Path, paint);
            canvas.restore();
            
            // Bezier 4
            RectF bezier4Rect = CacheForGuildCrestMedium.bezier4Rect;
            bezier4Rect.set(0f, 0f, 30f, 34f);
            Path bezier4Path = CacheForGuildCrestMedium.bezier4Path;
            bezier4Path.reset();
            bezier4Path.moveTo(15f, 0f);
            bezier4Path.lineTo(0f, 7f);
            bezier4Path.cubicTo(0f, 21f, 1f, 28f, 15f, 34f);
            bezier4Path.cubicTo(29f, 28f, 30f, 21f, 30f, 7f);
            bezier4Path.lineTo(15f, 0f);
            bezier4Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStrokeWidth(6f);
            paint.setStrokeMiter(10f);
            canvas.save();
            paint.setStyle(Paint.Style.STROKE);
            paint.setColor(crestColor4);
            canvas.drawPath(bezier4Path, paint);
            canvas.restore();
            
            // Bezier 6
            RectF bezier6Rect = CacheForGuildCrestMedium.bezier6Rect;
            bezier6Rect.set(10f, 11f, 20f, 21f);
            Path bezier6Path = CacheForGuildCrestMedium.bezier6Path;
            bezier6Path.reset();
            bezier6Path.moveTo(15f, 16.72f);
            bezier6Path.cubicTo(13.33f, 16.72f, 10f, 17.55f, 10f, 19.22f);
            bezier6Path.lineTo(10f, 21f);
            bezier6Path.lineTo(20f, 21f);
            bezier6Path.lineTo(20f, 19.22f);
            bezier6Path.cubicTo(20f, 17.55f, 16.67f, 16.72f, 15f, 16.72f);
            bezier6Path.close();
            bezier6Path.moveTo(15f, 11f);
            bezier6Path.cubicTo(13.82f, 11f, 12.86f, 11.96f, 12.86f, 13.14f);
            bezier6Path.cubicTo(12.86f, 14.33f, 13.82f, 15.29f, 15f, 15.29f);
            bezier6Path.cubicTo(16.18f, 15.29f, 17.14f, 14.33f, 17.14f, 13.14f);
            bezier6Path.cubicTo(17.14f, 11.96f, 16.18f, 11f, 15f, 11f);
            bezier6Path.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            bezier6Path.setFillType(Path.FillType.EVEN_ODD);
            paint.setStyle(Paint.Style.FILL);
            paint.setColor(crestColor6);
            canvas.drawPath(bezier6Path, paint);
            
            canvas.restore();
        }
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawGuildCrestSmall(Canvas canvas, float memberCount) {
        HabiticaIcons.drawGuildCrestSmall(canvas, new RectF(0f, 0f, 16f, 16f), ResizingBehavior.AspectFit, memberCount);
    }
    
    public static void drawGuildCrestSmall(Canvas canvas, RectF targetFrame, ResizingBehavior resizing, float memberCount) {
        // General Declarations
        Paint paint = CacheForGuildCrestSmall.paint;
        
        // Local Colors
        int crestGold4 = Color.argb(255, 255, 166, 35);
        int fillColor37 = Color.argb(255, 255, 255, 255);
        int crestSilver4 = Color.argb(255, 175, 175, 175);
        int crestBronze4 = Color.argb(255, 215, 122, 32);
        
        // Local Variables
        int crestColor4 = memberCount < 100f ? crestBronze4 : (memberCount < 1000f ? crestSilver4 : crestGold4);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForGuildCrestSmall.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForGuildCrestSmall.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 16f, resizedFrame.height() / 16f);
        
        // Bezier
        RectF bezierRect = CacheForGuildCrestSmall.bezierRect;
        bezierRect.set(0f, 0f, 16f, 16f);
        Path bezierPath = CacheForGuildCrestSmall.bezierPath;
        bezierPath.reset();
        bezierPath.moveTo(15.94f, 3.41f);
        bezierPath.cubicTo(15.94f, 2.94f, 15.69f, 2.5f, 15.18f, 2.25f);
        bezierPath.cubicTo(13.64f, 1.5f, 9.97f, 0f, 8f, 0f);
        bezierPath.cubicTo(6.02f, 0f, 2.36f, 1.5f, 0.82f, 2.25f);
        bezierPath.cubicTo(0.31f, 2.5f, 0.06f, 2.94f, 0.05f, 3.41f);
        bezierPath.cubicTo(0.01f, 5.65f, -0.93f, 12.24f, 7.1f, 15.81f);
        bezierPath.cubicTo(7.65f, 16.05f, 8.35f, 16.07f, 8.9f, 15.81f);
        bezierPath.cubicTo(16.95f, 12.24f, 15.98f, 5.65f, 15.94f, 3.41f);
        bezierPath.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezierPath.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(crestColor4);
        canvas.drawPath(bezierPath, paint);
        
        // Bezier 2
        RectF bezier2Rect = CacheForGuildCrestSmall.bezier2Rect;
        bezier2Rect.set(4f, 3f, 12f, 11f);
        Path bezier2Path = CacheForGuildCrestSmall.bezier2Path;
        bezier2Path.reset();
        bezier2Path.moveTo(8f, 7.57f);
        bezier2Path.cubicTo(6.67f, 7.57f, 4f, 8.24f, 4f, 9.57f);
        bezier2Path.lineTo(4f, 11f);
        bezier2Path.lineTo(12f, 11f);
        bezier2Path.lineTo(12f, 9.57f);
        bezier2Path.cubicTo(12f, 8.24f, 9.33f, 7.57f, 8f, 7.57f);
        bezier2Path.close();
        bezier2Path.moveTo(8f, 3f);
        bezier2Path.cubicTo(7.05f, 3f, 6.29f, 3.77f, 6.29f, 4.71f);
        bezier2Path.cubicTo(6.29f, 5.66f, 7.05f, 6.43f, 8f, 6.43f);
        bezier2Path.cubicTo(8.95f, 6.43f, 9.71f, 5.66f, 9.71f, 4.71f);
        bezier2Path.cubicTo(9.71f, 3.77f, 8.95f, 3f, 8f, 3f);
        bezier2Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier2Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor37);
        canvas.drawPath(bezier2Path, paint);
        
        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<Matrix> currentTransformation = new Stack<Matrix>();
        currentTransformation.push(new Matrix());
        Paint paint = CacheForGuildHeaderCrest.paint;
        
        // Local Colors
        int guildHeaderDark3 = PaintCodeColor.colorByChangingValue(guildHeader, 1f);
        int guildHeaderDark5 = PaintCodeColor.colorByApplyingHighlight(guildHeaderDark3, 0.7f);
        int guildHeaderDark4 = PaintCodeColor.colorByApplyingHighlight(guildHeaderDark3, 0.15f);
        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();
    }
    
    public static void drawTwoHandedIcon(Canvas canvas) {
        HabiticaIcons.drawTwoHandedIcon(canvas, new RectF(0f, 0f, 15f, 15f), ResizingBehavior.AspectFit);
    }
    
    public static void drawTwoHandedIcon(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForTwoHandedIcon.paint;
        
        // Local Colors
        int fillColor39 = Color.argb(255, 189, 168, 255);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForTwoHandedIcon.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForTwoHandedIcon.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 15f, resizedFrame.height() / 15f);
        
        // Bezier
        RectF bezierRect = CacheForTwoHandedIcon.bezierRect;
        bezierRect.set(0f, 0f, 14.85f, 14.59f);
        Path bezierPath = CacheForTwoHandedIcon.bezierPath;
        bezierPath.reset();
        bezierPath.moveTo(13.85f, 11.48f);
        bezierPath.cubicTo(13.85f, 12.64f, 12.9f, 13.59f, 11.74f, 13.59f);
        bezierPath.lineTo(9.27f, 13.59f);
        bezierPath.cubicTo(8.72f, 13.59f, 8.34f, 13.46f, 7.9f, 13.08f);
        bezierPath.lineTo(8.16f, 13.08f);
        bezierPath.cubicTo(9.88f, 13.08f, 11.27f, 11.69f, 11.27f, 9.97f);
        bezierPath.lineTo(11.27f, 3.78f);
        bezierPath.cubicTo(11.28f, 3.57f, 11.45f, 3.4f, 11.66f, 3.4f);
        bezierPath.cubicTo(11.88f, 3.4f, 12.06f, 3.58f, 12.06f, 3.8f);
        bezierPath.lineTo(12.06f, 7.67f);
        bezierPath.cubicTo(12.06f, 7.95f, 12.28f, 8.17f, 12.56f, 8.17f);
        bezierPath.cubicTo(12.83f, 8.17f, 13.06f, 7.95f, 13.06f, 7.67f);
        bezierPath.lineTo(13.06f, 4.9f);
        bezierPath.cubicTo(13.06f, 4.68f, 13.24f, 4.5f, 13.45f, 4.5f);
        bezierPath.cubicTo(13.67f, 4.5f, 13.85f, 4.68f, 13.85f, 4.9f);
        bezierPath.lineTo(13.85f, 11.48f);
        bezierPath.close();
        bezierPath.moveTo(5.71f, 12.08f);
        bezierPath.lineTo(5.69f, 12.08f);
        bezierPath.cubicTo(4.55f, 12.08f, 4.11f, 11.55f, 2.41f, 9.3f);
        bezierPath.cubicTo(2.05f, 8.81f, 1.64f, 8.26f, 1.15f, 7.64f);
        bezierPath.cubicTo(1.36f, 7.46f, 1.6f, 7.29f, 1.94f, 7.33f);
        bezierPath.cubicTo(2.48f, 7.34f, 2.91f, 7.84f, 3.18f, 8.26f);
        bezierPath.cubicTo(3.3f, 8.45f, 3.53f, 8.53f, 3.74f, 8.47f);
        bezierPath.cubicTo(3.96f, 8.41f, 4.1f, 8.21f, 4.1f, 7.99f);
        bezierPath.lineTo(4.1f, 2.38f);
        bezierPath.cubicTo(4.1f, 2.17f, 4.28f, 1.99f, 4.5f, 1.99f);
        bezierPath.cubicTo(4.72f, 1.99f, 4.9f, 2.17f, 4.9f, 2.38f);
        bezierPath.lineTo(4.9f, 6.17f);
        bezierPath.cubicTo(4.9f, 6.44f, 5.12f, 6.67f, 5.4f, 6.67f);
        bezierPath.cubicTo(5.67f, 6.67f, 5.9f, 6.44f, 5.9f, 6.17f);
        bezierPath.lineTo(5.9f, 1.4f);
        bezierPath.cubicTo(5.9f, 1.18f, 6.07f, 1f, 6.29f, 1f);
        bezierPath.cubicTo(6.51f, 1f, 6.69f, 1.18f, 6.69f, 1.4f);
        bezierPath.lineTo(6.69f, 5.24f);
        bezierPath.cubicTo(6.69f, 5.52f, 6.91f, 5.74f, 7.19f, 5.74f);
        bezierPath.cubicTo(7.46f, 5.74f, 7.67f, 5.52f, 7.68f, 5.26f);
        bezierPath.lineTo(7.69f, 2.29f);
        bezierPath.cubicTo(7.69f, 2.07f, 7.86f, 1.9f, 8.08f, 1.9f);
        bezierPath.cubicTo(8.3f, 1.9f, 8.48f, 2.08f, 8.48f, 2.29f);
        bezierPath.lineTo(8.48f, 6.17f);
        bezierPath.cubicTo(8.48f, 6.44f, 8.7f, 6.67f, 8.98f, 6.67f);
        bezierPath.cubicTo(9.25f, 6.67f, 9.46f, 6.45f, 9.47f, 6.19f);
        bezierPath.cubicTo(9.47f, 6.18f, 9.48f, 6.17f, 9.48f, 6.17f);
        bezierPath.lineTo(9.48f, 3.4f);
        bezierPath.cubicTo(9.48f, 3.18f, 9.66f, 3f, 9.87f, 3f);
        bezierPath.cubicTo(10.09f, 3f, 10.27f, 3.18f, 10.27f, 3.4f);
        bezierPath.lineTo(10.27f, 9.97f);
        bezierPath.cubicTo(10.27f, 11.14f, 9.32f, 12.08f, 8.16f, 12.08f);
        bezierPath.lineTo(5.71f, 12.08f);
        bezierPath.close();
        bezierPath.moveTo(13.45f, 3.5f);
        bezierPath.cubicTo(13.31f, 3.5f, 13.17f, 3.53f, 13.04f, 3.57f);
        bezierPath.cubicTo(12.93f, 2.91f, 12.36f, 2.4f, 11.66f, 2.4f);
        bezierPath.cubicTo(11.42f, 2.4f, 11.2f, 2.47f, 11f, 2.58f);
        bezierPath.cubicTo(10.74f, 2.23f, 10.34f, 2f, 9.87f, 2f);
        bezierPath.cubicTo(9.73f, 2f, 9.59f, 2.03f, 9.46f, 2.07f);
        bezierPath.cubicTo(9.35f, 1.41f, 8.78f, 0.9f, 8.08f, 0.9f);
        bezierPath.cubicTo(7.92f, 0.9f, 7.76f, 0.93f, 7.62f, 0.98f);
        bezierPath.cubicTo(7.44f, 0.42f, 6.92f, 0f, 6.29f, 0f);
        bezierPath.cubicTo(5.63f, 0f, 5.09f, 0.46f, 4.94f, 1.07f);
        bezierPath.cubicTo(4.8f, 1.02f, 4.65f, 0.99f, 4.5f, 0.99f);
        bezierPath.cubicTo(3.73f, 0.99f, 3.1f, 1.62f, 3.1f, 2.38f);
        bezierPath.lineTo(3.1f, 6.72f);
        bezierPath.cubicTo(2.68f, 6.42f, 2.28f, 6.34f, 1.96f, 6.33f);
        bezierPath.cubicTo(1.11f, 6.27f, 0.45f, 6.82f, 0.1f, 7.32f);
        bezierPath.cubicTo(-0.04f, 7.5f, -0.03f, 7.74f, 0.11f, 7.92f);
        bezierPath.cubicTo(0.7f, 8.68f, 1.19f, 9.33f, 1.62f, 9.9f);
        bezierPath.cubicTo(3.31f, 12.15f, 4.01f, 13.08f, 5.69f, 13.08f);
        bezierPath.lineTo(6.51f, 13.08f);
        bezierPath.cubicTo(7.4f, 14.12f, 8.1f, 14.59f, 9.27f, 14.59f);
        bezierPath.lineTo(11.74f, 14.59f);
        bezierPath.cubicTo(13.45f, 14.59f, 14.85f, 13.19f, 14.85f, 11.48f);
        bezierPath.lineTo(14.85f, 4.9f);
        bezierPath.cubicTo(14.85f, 4.13f, 14.22f, 3.5f, 13.45f, 3.5f);
        bezierPath.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezierPath.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor39);
        canvas.drawPath(bezierPath, paint);
        
        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 fillColor40 = Color.argb(255, 165, 161, 172);
        int fillColor101 = Color.argb(255, 247, 78, 82);
        
        // 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 filterNode3Position = 3f + 5f * percentage;
        float filterNode1Position = 3f + 10f * percentage;
        float filterNode2Position = 13f - 10f * 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();
    }
    
    public static void drawBuffIcon(Canvas canvas) {
        HabiticaIcons.drawBuffIcon(canvas, new RectF(0f, 0f, 15f, 15f), ResizingBehavior.AspectFit);
    }
    
    public static void drawBuffIcon(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForBuffIcon.paint;
        
        // Local Colors
        int fillColor18 = Color.argb(255, 154, 98, 255);
        int fillColor85 = Color.argb(255, 237, 236, 238);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForBuffIcon.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForBuffIcon.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 15f, resizedFrame.height() / 15f);
        
        // Rectangle
        RectF rectangleRect = CacheForBuffIcon.rectangleRect;
        rectangleRect.set(0f, 0f, 15f, 15f);
        Path rectanglePath = CacheForBuffIcon.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(fillColor85);
        canvas.drawPath(rectanglePath, paint);
        
        // Bezier 2
        RectF bezier2Rect = CacheForBuffIcon.bezier2Rect;
        bezier2Rect.set(3.75f, 3f, 11.25f, 12f);
        Path bezier2Path = CacheForBuffIcon.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(fillColor18);
        canvas.drawPath(bezier2Path, paint);
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawParticipantsIcon(Canvas canvas) {
        HabiticaIcons.drawParticipantsIcon(canvas, new RectF(0f, 0f, 20f, 20f), ResizingBehavior.AspectFit);
    }
    
    public static void drawParticipantsIcon(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForParticipantsIcon.paint;
        
        // Local Colors
        int fillColor25 = Color.argb(255, 225, 224, 227);
        int fillColor39 = Color.argb(255, 189, 168, 255);
        int fillColor104 = Color.argb(255, 249, 249, 249);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForParticipantsIcon.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForParticipantsIcon.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 20f, resizedFrame.height() / 20f);
        
        // Bezier
        RectF bezierRect = CacheForParticipantsIcon.bezierRect;
        bezierRect.set(1f, 3f, 13f, 17f);
        Path bezierPath = CacheForParticipantsIcon.bezierPath;
        bezierPath.reset();
        bezierPath.moveTo(5f, 3f);
        bezierPath.lineTo(3f, 7f);
        bezierPath.lineTo(5f, 11f);
        bezierPath.lineTo(2f, 13f);
        bezierPath.lineTo(1f, 16f);
        bezierPath.lineTo(2f, 17f);
        bezierPath.lineTo(13f, 17f);
        bezierPath.lineTo(13f, 15f);
        bezierPath.lineTo(12f, 13f);
        bezierPath.lineTo(11f, 11f);
        bezierPath.lineTo(11f, 8f);
        bezierPath.lineTo(11f, 4f);
        bezierPath.lineTo(10f, 4f);
        bezierPath.lineTo(7f, 3f);
        bezierPath.lineTo(5f, 3f);
        bezierPath.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezierPath.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor104);
        canvas.drawPath(bezierPath, paint);
        
        // Bezier 2
        RectF bezier2Rect = CacheForParticipantsIcon.bezier2Rect;
        bezier2Rect.set(10f, 3f, 19f, 17f);
        Path bezier2Path = CacheForParticipantsIcon.bezier2Path;
        bezier2Path.reset();
        bezier2Path.moveTo(15f, 3f);
        bezier2Path.lineTo(17f, 5f);
        bezier2Path.lineTo(17f, 9f);
        bezier2Path.lineTo(15f, 11f);
        bezier2Path.lineTo(18f, 13f);
        bezier2Path.lineTo(19f, 15f);
        bezier2Path.lineTo(19f, 17f);
        bezier2Path.lineTo(13f, 17f);
        bezier2Path.lineTo(13f, 14f);
        bezier2Path.lineTo(11f, 12f);
        bezier2Path.lineTo(10f, 10f);
        bezier2Path.lineTo(11f, 7f);
        bezier2Path.lineTo(10f, 4f);
        bezier2Path.lineTo(13f, 3f);
        bezier2Path.lineTo(15f, 3f);
        bezier2Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier2Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor25);
        canvas.drawPath(bezier2Path, paint);
        
        // Bezier 3
        RectF bezier3Rect = CacheForParticipantsIcon.bezier3Rect;
        bezier3Rect.set(0f, 2f, 20f, 18f);
        Path bezier3Path = CacheForParticipantsIcon.bezier3Path;
        bezier3Path.reset();
        bezier3Path.moveTo(14f, 16f);
        bezier3Path.cubicTo(14f, 14.46f, 13.42f, 13.06f, 12.46f, 12f);
        bezier3Path.lineTo(14f, 12f);
        bezier3Path.cubicTo(16.21f, 12f, 18f, 13.79f, 18f, 16f);
        bezier3Path.lineTo(14f, 16f);
        bezier3Path.close();
        bezier3Path.moveTo(2f, 16f);
        bezier3Path.cubicTo(2f, 13.79f, 3.79f, 12f, 6f, 12f);
        bezier3Path.lineTo(8f, 12f);
        bezier3Path.cubicTo(10.21f, 12f, 12f, 13.79f, 12f, 16f);
        bezier3Path.lineTo(2f, 16f);
        bezier3Path.close();
        bezier3Path.moveTo(7f, 4f);
        bezier3Path.cubicTo(8.66f, 4f, 10f, 5.34f, 10f, 7f);
        bezier3Path.cubicTo(10f, 8.66f, 8.66f, 10f, 7f, 10f);
        bezier3Path.cubicTo(5.34f, 10f, 4f, 8.66f, 4f, 7f);
        bezier3Path.cubicTo(4f, 5.34f, 5.34f, 4f, 7f, 4f);
        bezier3Path.lineTo(7f, 4f);
        bezier3Path.close();
        bezier3Path.moveTo(11.32f, 4.52f);
        bezier3Path.cubicTo(11.8f, 4.19f, 12.38f, 4f, 13f, 4f);
        bezier3Path.cubicTo(14.66f, 4f, 16f, 5.34f, 16f, 7f);
        bezier3Path.cubicTo(16f, 8.66f, 14.66f, 10f, 13f, 10f);
        bezier3Path.cubicTo(12.38f, 10f, 11.8f, 9.81f, 11.32f, 9.48f);
        bezier3Path.cubicTo(11.74f, 8.75f, 12f, 7.91f, 12f, 7f);
        bezier3Path.cubicTo(12f, 6.09f, 11.74f, 5.25f, 11.32f, 4.52f);
        bezier3Path.lineTo(11.32f, 4.52f);
        bezier3Path.close();
        bezier3Path.moveTo(16.51f, 10.56f);
        bezier3Path.cubicTo(17.43f, 9.65f, 18f, 8.39f, 18f, 7f);
        bezier3Path.cubicTo(18f, 4.24f, 15.76f, 2f, 13f, 2f);
        bezier3Path.cubicTo(11.87f, 2f, 10.84f, 2.39f, 10f, 3.03f);
        bezier3Path.cubicTo(9.16f, 2.39f, 8.13f, 2f, 7f, 2f);
        bezier3Path.cubicTo(4.24f, 2f, 2f, 4.24f, 2f, 7f);
        bezier3Path.cubicTo(2f, 8.39f, 2.57f, 9.65f, 3.49f, 10.56f);
        bezier3Path.cubicTo(1.43f, 11.5f, 0f, 13.58f, 0f, 16f);
        bezier3Path.cubicTo(0f, 17.11f, 0.9f, 18f, 2f, 18f);
        bezier3Path.lineTo(8f, 18f);
        bezier3Path.lineTo(12f, 18f);
        bezier3Path.lineTo(18f, 18f);
        bezier3Path.cubicTo(19.11f, 18f, 20f, 17.11f, 20f, 16f);
        bezier3Path.cubicTo(20f, 13.58f, 18.57f, 11.5f, 16.51f, 10.56f);
        bezier3Path.lineTo(16.51f, 10.56f);
        bezier3Path.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezier3Path.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor39);
        canvas.drawPath(bezier3Path, paint);
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawChatReplyIcon(Canvas canvas) {
        HabiticaIcons.drawChatReplyIcon(canvas, new RectF(0f, 0f, 17f, 17f), ResizingBehavior.AspectFit);
    }
    
    public static void drawChatReplyIcon(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForChatReplyIcon.paint;
        
        // Local Colors
        int strokeColor15 = Color.argb(255, 195, 192, 199);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForChatReplyIcon.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForChatReplyIcon.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 17f, resizedFrame.height() / 17f);
        
        // Group
        {
            RectF group = CacheForChatReplyIcon.group;
            group.set(-10f, -9f, 27f, 26f);
            canvas.save();
            
            // Clip
            Path clipPath = CacheForChatReplyIcon.clipPath;
            clipPath.reset();
            clipPath.moveTo(-10f, -9f);
            clipPath.lineTo(27f, -9f);
            clipPath.lineTo(27f, 26f);
            clipPath.lineTo(-10f, 26f);
            clipPath.lineTo(-10f, -9f);
            clipPath.close();
            clipPath.moveTo(6.54f, 3f);
            clipPath.lineTo(2f, 7.58f);
            clipPath.lineTo(6.54f, 12.16f);
            clipPath.lineTo(6.54f, 8.72f);
            clipPath.cubicTo(11.46f, 8.24f, 14.24f, 10f, 14.9f, 14f);
            clipPath.cubicTo(15.57f, 8.67f, 12.78f, 6.15f, 6.54f, 6.44f);
            clipPath.lineTo(6.54f, 3f);
            clipPath.close();
            canvas.clipPath(clipPath);
            
            // Bezier
            RectF bezierRect = CacheForChatReplyIcon.bezierRect;
            bezierRect.set(2f, 3f, 15f, 14f);
            Path bezierPath = CacheForChatReplyIcon.bezierPath;
            bezierPath.reset();
            bezierPath.moveTo(6.54f, 3f);
            bezierPath.lineTo(2f, 7.58f);
            bezierPath.lineTo(6.54f, 12.16f);
            bezierPath.lineTo(6.54f, 8.72f);
            bezierPath.cubicTo(11.46f, 8.24f, 14.24f, 10f, 14.9f, 14f);
            bezierPath.cubicTo(15.57f, 8.67f, 12.78f, 6.15f, 6.54f, 6.44f);
            bezierPath.lineTo(6.54f, 3f);
            bezierPath.close();
            
            paint.reset();
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setStrokeWidth(4f);
            paint.setStrokeJoin(Paint.Join.ROUND);
            paint.setStrokeMiter(10f);
            canvas.save();
            paint.setStyle(Paint.Style.STROKE);
            paint.setColor(strokeColor15);
            canvas.drawPath(bezierPath, paint);
            canvas.restore();
            
            canvas.restore();
        }
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawChatCopyIcon(Canvas canvas) {
        HabiticaIcons.drawChatCopyIcon(canvas, new RectF(0f, 0f, 17f, 17f), ResizingBehavior.AspectFit);
    }
    
    public static void drawChatCopyIcon(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForChatCopyIcon.paint;
        
        // Local Colors
        int fillColor35 = Color.argb(255, 195, 192, 199);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForChatCopyIcon.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForChatCopyIcon.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 17f, resizedFrame.height() / 17f);
        
        // Bezier
        RectF bezierRect = CacheForChatCopyIcon.bezierRect;
        bezierRect.set(0f, 1f, 16f, 17f);
        Path bezierPath = CacheForChatCopyIcon.bezierPath;
        bezierPath.reset();
        bezierPath.moveTo(6f, 15f);
        bezierPath.lineTo(14f, 15f);
        bezierPath.lineTo(14f, 5f);
        bezierPath.lineTo(6f, 5f);
        bezierPath.lineTo(6f, 15f);
        bezierPath.close();
        bezierPath.moveTo(2f, 13f);
        bezierPath.lineTo(2f, 3f);
        bezierPath.lineTo(6f, 3f);
        bezierPath.cubicTo(4.89f, 3f, 4f, 3.9f, 4f, 5f);
        bezierPath.lineTo(4f, 13f);
        bezierPath.lineTo(2f, 13f);
        bezierPath.close();
        bezierPath.moveTo(14f, 3f);
        bezierPath.lineTo(12f, 3f);
        bezierPath.cubicTo(12f, 1.9f, 11.11f, 1f, 10f, 1f);
        bezierPath.lineTo(2f, 1f);
        bezierPath.cubicTo(0.9f, 1f, 0f, 1.9f, 0f, 3f);
        bezierPath.lineTo(0f, 13f);
        bezierPath.cubicTo(0f, 14.11f, 0.9f, 15f, 2f, 15f);
        bezierPath.lineTo(4f, 15f);
        bezierPath.cubicTo(4f, 16.11f, 4.89f, 17f, 6f, 17f);
        bezierPath.lineTo(14f, 17f);
        bezierPath.cubicTo(15.11f, 17f, 16f, 16.11f, 16f, 15f);
        bezierPath.lineTo(16f, 5f);
        bezierPath.cubicTo(16f, 3.9f, 15.11f, 3f, 14f, 3f);
        bezierPath.lineTo(14f, 3f);
        bezierPath.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezierPath.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor35);
        canvas.drawPath(bezierPath, paint);
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawChatReportIcon(Canvas canvas) {
        HabiticaIcons.drawChatReportIcon(canvas, new RectF(0f, 0f, 17f, 18f), ResizingBehavior.AspectFit);
    }
    
    public static void drawChatReportIcon(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForChatReportIcon.paint;
        
        // Local Colors
        int fillColor35 = Color.argb(255, 195, 192, 199);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForChatReportIcon.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForChatReportIcon.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 17f, resizedFrame.height() / 18f);
        
        // Bezier
        RectF bezierRect = CacheForChatReportIcon.bezierRect;
        bezierRect.set(0f, 1f, 16f, 17f);
        Path bezierPath = CacheForChatReportIcon.bezierPath;
        bezierPath.reset();
        bezierPath.moveTo(6f, 13f);
        bezierPath.lineTo(14f, 13f);
        bezierPath.lineTo(14f, 7f);
        bezierPath.lineTo(6f, 7f);
        bezierPath.lineTo(6f, 13f);
        bezierPath.close();
        bezierPath.moveTo(4f, 10f);
        bezierPath.lineTo(2f, 10f);
        bezierPath.lineTo(2f, 4f);
        bezierPath.lineTo(9f, 4f);
        bezierPath.lineTo(9f, 5f);
        bezierPath.lineTo(6f, 5f);
        bezierPath.cubicTo(4.89f, 5f, 4f, 5.9f, 4f, 7f);
        bezierPath.lineTo(4f, 10f);
        bezierPath.close();
        bezierPath.moveTo(14f, 5f);
        bezierPath.lineTo(11f, 5f);
        bezierPath.lineTo(11f, 4f);
        bezierPath.cubicTo(11f, 2.9f, 10.11f, 2f, 9f, 2f);
        bezierPath.lineTo(2f, 2f);
        bezierPath.cubicTo(2f, 1.45f, 1.55f, 1f, 1f, 1f);
        bezierPath.cubicTo(0.45f, 1f, 0f, 1.45f, 0f, 2f);
        bezierPath.lineTo(0f, 4f);
        bezierPath.lineTo(0f, 17f);
        bezierPath.lineTo(2f, 17f);
        bezierPath.lineTo(2f, 12f);
        bezierPath.lineTo(4f, 12f);
        bezierPath.lineTo(4f, 13f);
        bezierPath.cubicTo(4f, 14.11f, 4.89f, 15f, 6f, 15f);
        bezierPath.lineTo(14f, 15f);
        bezierPath.cubicTo(15.11f, 15f, 16f, 14.11f, 16f, 13f);
        bezierPath.lineTo(16f, 7f);
        bezierPath.cubicTo(16f, 5.9f, 15.11f, 5f, 14f, 5f);
        bezierPath.lineTo(14f, 5f);
        bezierPath.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezierPath.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor35);
        canvas.drawPath(bezierPath, paint);
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawChatDeleteIcon(Canvas canvas) {
        HabiticaIcons.drawChatDeleteIcon(canvas, new RectF(0f, 0f, 17f, 17f), ResizingBehavior.AspectFit);
    }
    
    public static void drawChatDeleteIcon(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForChatDeleteIcon.paint;
        
        // Local Colors
        int fillColor35 = Color.argb(255, 195, 192, 199);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForChatDeleteIcon.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForChatDeleteIcon.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 17f, resizedFrame.height() / 17f);
        
        // Bezier
        RectF bezierRect = CacheForChatDeleteIcon.bezierRect;
        bezierRect.set(1f, 1f, 15f, 17f);
        Path bezierPath = CacheForChatDeleteIcon.bezierPath;
        bezierPath.reset();
        bezierPath.moveTo(4f, 15f);
        bezierPath.lineTo(12f, 15f);
        bezierPath.lineTo(12f, 5f);
        bezierPath.lineTo(4f, 5f);
        bezierPath.lineTo(4f, 15f);
        bezierPath.close();
        bezierPath.moveTo(15f, 5f);
        bezierPath.lineTo(14f, 5f);
        bezierPath.lineTo(14f, 15f);
        bezierPath.cubicTo(14f, 16.11f, 13.11f, 17f, 12f, 17f);
        bezierPath.lineTo(4f, 17f);
        bezierPath.cubicTo(2.9f, 17f, 2f, 16.11f, 2f, 15f);
        bezierPath.lineTo(2f, 5f);
        bezierPath.lineTo(1f, 5f);
        bezierPath.lineTo(1f, 3f);
        bezierPath.lineTo(2f, 3f);
        bezierPath.lineTo(5f, 3f);
        bezierPath.lineTo(5f, 2f);
        bezierPath.cubicTo(5f, 1.45f, 5.45f, 1f, 6f, 1f);
        bezierPath.lineTo(10f, 1f);
        bezierPath.cubicTo(10.55f, 1f, 11f, 1.45f, 11f, 2f);
        bezierPath.lineTo(11f, 3f);
        bezierPath.lineTo(14f, 3f);
        bezierPath.lineTo(15f, 3f);
        bezierPath.lineTo(15f, 5f);
        bezierPath.close();
        bezierPath.moveTo(9f, 13f);
        bezierPath.lineTo(10f, 13f);
        bezierPath.lineTo(10f, 7f);
        bezierPath.lineTo(9f, 7f);
        bezierPath.lineTo(9f, 13f);
        bezierPath.close();
        bezierPath.moveTo(6f, 13f);
        bezierPath.lineTo(7f, 13f);
        bezierPath.lineTo(7f, 7f);
        bezierPath.lineTo(6f, 7f);
        bezierPath.lineTo(6f, 13f);
        bezierPath.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezierPath.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor35);
        canvas.drawPath(bezierPath, paint);
        
        canvas.restore();
    }
    
    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();
    }
    
    public static void drawAlertIcon(Canvas canvas) {
        HabiticaIcons.drawAlertIcon(canvas, new RectF(0f, 0f, 16f, 16f), ResizingBehavior.AspectFit);
    }
    
    public static void drawAlertIcon(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {
        // General Declarations
        Paint paint = CacheForAlertIcon.paint;
        
        // Local Colors
        int fillColor105 = Color.argb(255, 255, 97, 101);
        
        // Resize to Target Frame
        canvas.save();
        RectF resizedFrame = CacheForAlertIcon.resizedFrame;
        HabiticaIcons.resizingBehaviorApply(resizing, CacheForAlertIcon.originalFrame, targetFrame, resizedFrame);
        canvas.translate(resizedFrame.left, resizedFrame.top);
        canvas.scale(resizedFrame.width() / 16f, resizedFrame.height() / 16f);
        
        // Bezier
        RectF bezierRect = CacheForAlertIcon.bezierRect;
        bezierRect.set(0.01f, 0.05f, 16.01f, 16.05f);
        Path bezierPath = CacheForAlertIcon.bezierPath;
        bezierPath.reset();
        bezierPath.moveTo(0.01f, 2.05f);
        bezierPath.cubicTo(0.01f, 0.95f, 0.9f, 0.05f, 2f, 0.05f);
        bezierPath.lineTo(14.01f, 0.05f);
        bezierPath.cubicTo(15.12f, 0.05f, 16.01f, 0.95f, 16.01f, 2.05f);
        bezierPath.lineTo(16.01f, 14.06f);
        bezierPath.lineTo(16.01f, 14.06f);
        bezierPath.cubicTo(16.01f, 15.16f, 15.11f, 16.05f, 14.01f, 16.05f);
        bezierPath.lineTo(2f, 16.05f);
        bezierPath.lineTo(2f, 16.05f);
        bezierPath.cubicTo(0.9f, 16.05f, 0.01f, 15.16f, 0.01f, 14.06f);
        bezierPath.lineTo(0.01f, 2.05f);
        bezierPath.close();
        bezierPath.moveTo(2.01f, 2.05f);
        bezierPath.lineTo(2.01f, 14.05f);
        bezierPath.lineTo(14.01f, 14.05f);
        bezierPath.lineTo(14.01f, 2.05f);
        bezierPath.lineTo(2.01f, 2.05f);
        bezierPath.close();
        bezierPath.moveTo(7.01f, 4.05f);
        bezierPath.lineTo(9.01f, 4.05f);
        bezierPath.lineTo(9.01f, 9.05f);
        bezierPath.lineTo(7.01f, 9.05f);
        bezierPath.lineTo(7.01f, 4.05f);
        bezierPath.close();
        bezierPath.moveTo(7.01f, 10.05f);
        bezierPath.lineTo(9.01f, 10.05f);
        bezierPath.lineTo(9.01f, 12.05f);
        bezierPath.lineTo(7.01f, 12.05f);
        bezierPath.lineTo(7.01f, 10.05f);
        bezierPath.close();
        
        paint.reset();
        paint.setFlags(Paint.ANTI_ALIAS_FLAG);
        bezierPath.setFillType(Path.FillType.EVEN_ODD);
        paint.setStyle(Paint.Style.FILL);
        paint.setColor(fillColor105);
        canvas.drawPath(bezierPath, paint);
        
        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(40, 40, 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(40, 40, Bitmap.Config.ARGB_8888);
        Canvas canvas = new Canvas(imageOfUnpinItem);
        HabiticaIcons.drawUnpinItem(canvas);
        
        return imageOfUnpinItem;
    }
    
    public static Bitmap imageOfItemIndicatorNumber(int lockColor) {
        Bitmap imageOfItemIndicatorNumber = Bitmap.createBitmap(28, 28, Bitmap.Config.ARGB_8888);
        Canvas canvas = new Canvas(imageOfItemIndicatorNumber);
        HabiticaIcons.drawItemIndicatorNumber(canvas, lockColor);
        
        return imageOfItemIndicatorNumber;
    }
    
    public static Bitmap imageOfItemIndicatorLocked(int lockColor) {
        Bitmap imageOfItemIndicatorLocked = Bitmap.createBitmap(28, 28, Bitmap.Config.ARGB_8888);
        Canvas canvas = new Canvas(imageOfItemIndicatorLocked);
        HabiticaIcons.drawItemIndicatorLocked(canvas, lockColor);
        
        return imageOfItemIndicatorLocked;
    }
    
    public static Bitmap imageOfItemIndicatorLimited(int lockColor) {
        Bitmap imageOfItemIndicatorLimited = Bitmap.createBitmap(28, 28, Bitmap.Config.ARGB_8888);
        Canvas canvas = new Canvas(imageOfItemIndicatorLimited);
        HabiticaIcons.drawItemIndicatorLimited(canvas, lockColor);
        
        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 contributorTier, boolean isNPC) {
        Bitmap imageOfContributorBadge = Bitmap.createBitmap(16, 16, Bitmap.Config.ARGB_8888);
        Canvas canvas = new Canvas(imageOfContributorBadge);
        HabiticaIcons.drawContributorBadge(canvas, contributorTier, 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;
    }
    
    
    // Resizing Behavior
    public static void resizingBehaviorApply(ResizingBehavior behavior, RectF rect, RectF target, RectF result) {
        if (rect.equals(target) || target == null) {
            result.set(rect);
            return;
        }
        
        if (behavior == ResizingBehavior.Stretch) {
            result.set(target);
            return;
        }
        
        float xRatio = Math.abs(target.width() / rect.width());
        float yRatio = Math.abs(target.height() / rect.height());
        float scale = 0f;
        
        switch (behavior) {
            case AspectFit: {
                scale = Math.min(xRatio, yRatio);
                break;
            }
            case AspectFill: {
                scale = Math.max(xRatio, yRatio);
                break;
            }
            case Center: {
                scale = 1f;
                break;
            }
        }
        
        float newWidth = Math.abs(rect.width() * scale);
        float newHeight = Math.abs(rect.height() * scale);
        result.set(target.centerX() - newWidth / 2,
            target.centerY() - newHeight / 2,
            target.centerX() + newWidth / 2,
            target.centerY() + newHeight / 2);
    }
    
    
}

class PaintCodeColor extends Color {
    private static float[] ColorToHSV(int originalColor) {
        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];
    }
    
    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;
    float dx, dy;
    private float radius;
    private BlurMaskFilter blurMaskFilter;
    
    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) {
        this.color = color;
        this.dx = dx;
        this.dy = dy;
        
        if (this.radius != radius) {
            this.blurMaskFilter = null;
            this.radius = radius;
        }
        
        return this;
    }
    
    void setBlurOfPaint(Paint paint) {
        if (this.radius <= 0)
            return;
        
        if (this.blurMaskFilter == null)
            this.blurMaskFilter = new BlurMaskFilter(this.radius, BlurMaskFilter.Blur.NORMAL);
        
        paint.setMaskFilter(this.blurMaskFilter);
    }
}


class PaintCodeBitmap {
    private BitmapShader shader;
    private Bitmap bitmap;
    private RectF bounds;
    private int resource;
    private WeakReference<Context> 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);
        }
        return this;
    }
    
    BitmapShader getShader() {
        return this.shader;
    }
    
    RectF getBounds() {
        return this.bounds;
    }
}


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) {
            this.dash = dash;
            this.gap = gap;
            this.phase = phase;
            this.effect = new DashPathEffect(new float[]{dash, gap}, phase);
        }
        return this.effect;
    }
}


class PaintCodeStaticLayout {
    private StaticLayout layout;
    private int width;
    private Layout.Alignment alignment;
    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)) {
            this.width = width;
            this.alignment = alignment;
            this.source = source;
            this.paint = paint;
            this.layout = new StaticLayout(source, paint, width, alignment, 1, 0, false);
        }
        return this.layout;
    }
}
