mirror of
https://github.com/msfjarvis/compose-lobsters.git
synced 2024-06-03 04:18:58 +05:30
refactor(common): remove Aurora SVG transcoder plugin for now
The snapshot repository that needs to be added for this has been a constant thorn in the side with CC invalidation and Renovate trying to resolve _every_ dependency from the snapshots repo
This commit is contained in:
parent
fb62ec71ff
commit
4db02f4f93
1
.gitattributes
vendored
1
.gitattributes
vendored
|
@ -1,2 +1,3 @@
|
|||
* text=auto eol=lf
|
||||
**/dependencies/** linguist-generated
|
||||
**/clawicons/** linguist-generated
|
||||
|
|
|
@ -1,26 +1,13 @@
|
|||
@file:Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
|
||||
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
import org.pushingpixels.aurora.tools.svgtranscoder.gradle.TranscodeTask
|
||||
|
||||
plugins {
|
||||
kotlin("android")
|
||||
id("dev.msfjarvis.claw.kotlin-common")
|
||||
id("dev.msfjarvis.claw.android-library")
|
||||
alias(libs.plugins.aurora.svg.transcoder)
|
||||
}
|
||||
|
||||
androidComponents { beforeVariants { it.enableUnitTest = false } }
|
||||
|
||||
val transcodeTask =
|
||||
tasks.register<TranscodeTask>("transcodeSvgs") {
|
||||
inputDirectory = file("svgs")
|
||||
outputDirectory = file("src/gen/kotlin/dev/msfjarvis/claw/common/res/clawicons")
|
||||
outputPackageName = "dev.msfjarvis.claw.common.res.clawicons"
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile>().configureEach { dependsOn(transcodeTask) }
|
||||
|
||||
dependencies {
|
||||
api(libs.napier)
|
||||
implementation(libs.androidx.compose.animation)
|
||||
|
@ -53,5 +40,4 @@ android {
|
|||
kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get()
|
||||
}
|
||||
namespace = "dev.msfjarvis.claw.common"
|
||||
sourceSets { getByName("main") { kotlin.srcDir("src/gen/kotlin") } }
|
||||
}
|
||||
|
|
204
common/src/main/kotlin/dev/msfjarvis/claw/common/res/clawicons/account_circle_black_24dp.kt
generated
Normal file
204
common/src/main/kotlin/dev/msfjarvis/claw/common/res/clawicons/account_circle_black_24dp.kt
generated
Normal file
|
@ -0,0 +1,204 @@
|
|||
package dev.msfjarvis.claw.common.res.clawicons
|
||||
|
||||
import androidx.compose.ui.geometry.*
|
||||
import androidx.compose.ui.graphics.*
|
||||
import androidx.compose.ui.graphics.drawscope.DrawScope
|
||||
import androidx.compose.ui.graphics.drawscope.Fill
|
||||
import androidx.compose.ui.graphics.drawscope.Stroke
|
||||
import androidx.compose.ui.graphics.drawscope.clipRect
|
||||
import androidx.compose.ui.graphics.drawscope.translate
|
||||
import androidx.compose.ui.graphics.drawscope.withTransform
|
||||
import androidx.compose.ui.graphics.painter.Painter
|
||||
import java.util.*
|
||||
import kotlin.math.min
|
||||
|
||||
/**
|
||||
* This class has been automatically generated using <a
|
||||
* href="https://github.com/kirill-grouchnikov/aurora">Aurora SVG transcoder</a>.
|
||||
*/
|
||||
class account_circle_black_24dp : Painter() {
|
||||
@Suppress("UNUSED_VARIABLE") private var shape: Outline? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var generalPath: Path? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var brush: Brush? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var stroke: Stroke? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var clip: Shape? = null
|
||||
private var alpha = 1.0f
|
||||
private var blendMode = DrawScope.DefaultBlendMode
|
||||
private var alphaStack = mutableListOf(1.0f)
|
||||
private var blendModeStack = mutableListOf(DrawScope.DefaultBlendMode)
|
||||
|
||||
private fun _paint0(drawScope: DrawScope) {
|
||||
@Suppress("UNUSED_VARIABLE") var shapeText: Outline?
|
||||
@Suppress("UNUSED_VARIABLE") var generalPathText: Path? = null
|
||||
@Suppress("UNUSED_VARIABLE") var alphaText = 0.0f
|
||||
@Suppress("UNUSED_VARIABLE") var blendModeText = DrawScope.DefaultBlendMode
|
||||
with(drawScope) {
|
||||
//
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0_0
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0_0_0
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0_1
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0_1_0
|
||||
if (generalPath == null) {
|
||||
generalPath = Path()
|
||||
} else {
|
||||
generalPath!!.reset()
|
||||
}
|
||||
generalPath?.run {
|
||||
moveTo(12.0f, 2.0f)
|
||||
cubicTo(6.48f, 2.0f, 2.0f, 6.48f, 2.0f, 12.0f)
|
||||
cubicTo(2.0f, 17.52f, 6.48f, 22.0f, 12.0f, 22.0f)
|
||||
cubicTo(17.52f, 22.0f, 22.0f, 17.52f, 22.0f, 12.0f)
|
||||
cubicTo(22.0f, 6.4799995f, 17.52f, 2.0f, 12.0f, 2.0f)
|
||||
close()
|
||||
moveTo(12.0f, 6.0f)
|
||||
cubicTo(13.93f, 6.0f, 15.5f, 7.57f, 15.5f, 9.5f)
|
||||
cubicTo(15.5f, 11.43f, 13.93f, 13.0f, 12.0f, 13.0f)
|
||||
cubicTo(10.07f, 13.0f, 8.5f, 11.43f, 8.5f, 9.5f)
|
||||
cubicTo(8.5f, 7.5699997f, 10.07f, 6.0f, 12.0f, 6.0f)
|
||||
close()
|
||||
moveTo(12.0f, 20.0f)
|
||||
cubicTo(9.97f, 20.0f, 7.57f, 19.18f, 5.86f, 17.119999f)
|
||||
cubicTo(7.55f, 15.8f, 9.68f, 15.0f, 12.0f, 15.0f)
|
||||
cubicTo(14.32f, 15.0f, 16.45f, 15.8f, 18.14f, 17.119999f)
|
||||
cubicTo(16.43f, 19.18f, 14.03f, 20.0f, 12.0f, 20.0f)
|
||||
close()
|
||||
}
|
||||
shape = Outline.Generic(generalPath!!)
|
||||
brush = SolidColor(Color(0, 0, 0, 255))
|
||||
drawOutline(
|
||||
outline = shape!!,
|
||||
style = Fill,
|
||||
brush = brush!!,
|
||||
alpha = alpha,
|
||||
blendMode = blendMode
|
||||
)
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
}
|
||||
}
|
||||
|
||||
private fun innerPaint(drawScope: DrawScope) {
|
||||
_paint0(drawScope)
|
||||
|
||||
shape = null
|
||||
generalPath = null
|
||||
brush = null
|
||||
stroke = null
|
||||
clip = null
|
||||
alpha = 1.0f
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Returns the X of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The X of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigX(): Double {
|
||||
return 2.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Y of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The Y of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigY(): Double {
|
||||
return 2.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the width of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The width of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigWidth(): Double {
|
||||
return 20.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the height of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The height of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigHeight(): Double {
|
||||
return 20.0
|
||||
}
|
||||
}
|
||||
|
||||
override val intrinsicSize: Size
|
||||
get() = Size.Unspecified
|
||||
|
||||
override fun DrawScope.onDraw() {
|
||||
clipRect {
|
||||
// Use the original icon bounding box and the current icon dimension to compute
|
||||
// the scaling factor
|
||||
val fullOrigWidth = getOrigX() + getOrigWidth()
|
||||
val fullOrigHeight = getOrigY() + getOrigHeight()
|
||||
val coef1 = size.width / fullOrigWidth
|
||||
val coef2 = size.height / fullOrigHeight
|
||||
val coef = min(coef1, coef2).toFloat()
|
||||
|
||||
// Use the original icon bounding box and the current icon dimension to compute
|
||||
// the offset pivot for the scaling
|
||||
var translateX = -getOrigX()
|
||||
var translateY = -getOrigY()
|
||||
if (coef1 != coef2) {
|
||||
if (coef1 < coef2) {
|
||||
val extraDy = ((fullOrigWidth - fullOrigHeight) / 2.0f).toFloat()
|
||||
translateY += extraDy
|
||||
} else {
|
||||
val extraDx = ((fullOrigHeight - fullOrigWidth) / 2.0f).toFloat()
|
||||
translateX += extraDx
|
||||
}
|
||||
}
|
||||
val translateXDp = translateX.toFloat().toDp().value
|
||||
val translateYDp = translateY.toFloat().toDp().value
|
||||
|
||||
// Create a combined scale + translate + clip transform before calling the transcoded painting
|
||||
// instructions
|
||||
withTransform({
|
||||
scale(scaleX = coef, scaleY = coef, pivot = Offset.Zero)
|
||||
translate(translateXDp, translateYDp)
|
||||
clipRect(
|
||||
left = 0.0f,
|
||||
top = 0.0f,
|
||||
right = fullOrigWidth.toFloat(),
|
||||
bottom = fullOrigHeight.toFloat(),
|
||||
clipOp = ClipOp.Intersect
|
||||
)
|
||||
}) {
|
||||
innerPaint(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
183
common/src/main/kotlin/dev/msfjarvis/claw/common/res/clawicons/arrow_back_black_24dp.kt
generated
Normal file
183
common/src/main/kotlin/dev/msfjarvis/claw/common/res/clawicons/arrow_back_black_24dp.kt
generated
Normal file
|
@ -0,0 +1,183 @@
|
|||
package dev.msfjarvis.claw.common.res.clawicons
|
||||
|
||||
import androidx.compose.ui.geometry.*
|
||||
import androidx.compose.ui.graphics.*
|
||||
import androidx.compose.ui.graphics.drawscope.DrawScope
|
||||
import androidx.compose.ui.graphics.drawscope.Fill
|
||||
import androidx.compose.ui.graphics.drawscope.Stroke
|
||||
import androidx.compose.ui.graphics.drawscope.clipRect
|
||||
import androidx.compose.ui.graphics.drawscope.translate
|
||||
import androidx.compose.ui.graphics.drawscope.withTransform
|
||||
import androidx.compose.ui.graphics.painter.Painter
|
||||
import java.util.*
|
||||
import kotlin.math.min
|
||||
|
||||
/**
|
||||
* This class has been automatically generated using <a
|
||||
* href="https://github.com/kirill-grouchnikov/aurora">Aurora SVG transcoder</a>.
|
||||
*/
|
||||
class arrow_back_black_24dp : Painter() {
|
||||
@Suppress("UNUSED_VARIABLE") private var shape: Outline? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var generalPath: Path? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var brush: Brush? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var stroke: Stroke? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var clip: Shape? = null
|
||||
private var alpha = 1.0f
|
||||
private var blendMode = DrawScope.DefaultBlendMode
|
||||
private var alphaStack = mutableListOf(1.0f)
|
||||
private var blendModeStack = mutableListOf(DrawScope.DefaultBlendMode)
|
||||
|
||||
private fun _paint0(drawScope: DrawScope) {
|
||||
@Suppress("UNUSED_VARIABLE") var shapeText: Outline?
|
||||
@Suppress("UNUSED_VARIABLE") var generalPathText: Path? = null
|
||||
@Suppress("UNUSED_VARIABLE") var alphaText = 0.0f
|
||||
@Suppress("UNUSED_VARIABLE") var blendModeText = DrawScope.DefaultBlendMode
|
||||
with(drawScope) {
|
||||
//
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0_0
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0_1
|
||||
if (generalPath == null) {
|
||||
generalPath = Path()
|
||||
} else {
|
||||
generalPath!!.reset()
|
||||
}
|
||||
generalPath?.run {
|
||||
moveTo(20.0f, 11.0f)
|
||||
lineTo(7.83f, 11.0f)
|
||||
lineTo(13.42f, 5.41f)
|
||||
lineTo(12.0f, 4.0f)
|
||||
lineTo(4.0f, 12.0f)
|
||||
lineTo(12.0f, 20.0f)
|
||||
lineTo(13.41f, 18.59f)
|
||||
lineTo(7.83f, 13.0f)
|
||||
lineTo(20.0f, 13.0f)
|
||||
lineTo(20.0f, 11.0f)
|
||||
close()
|
||||
}
|
||||
shape = Outline.Generic(generalPath!!)
|
||||
brush = SolidColor(Color(0, 0, 0, 255))
|
||||
drawOutline(
|
||||
outline = shape!!,
|
||||
style = Fill,
|
||||
brush = brush!!,
|
||||
alpha = alpha,
|
||||
blendMode = blendMode
|
||||
)
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
}
|
||||
}
|
||||
|
||||
private fun innerPaint(drawScope: DrawScope) {
|
||||
_paint0(drawScope)
|
||||
|
||||
shape = null
|
||||
generalPath = null
|
||||
brush = null
|
||||
stroke = null
|
||||
clip = null
|
||||
alpha = 1.0f
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Returns the X of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The X of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigX(): Double {
|
||||
return 4.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Y of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The Y of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigY(): Double {
|
||||
return 4.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the width of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The width of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigWidth(): Double {
|
||||
return 16.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the height of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The height of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigHeight(): Double {
|
||||
return 16.0
|
||||
}
|
||||
}
|
||||
|
||||
override val intrinsicSize: Size
|
||||
get() = Size.Unspecified
|
||||
|
||||
override fun DrawScope.onDraw() {
|
||||
clipRect {
|
||||
// Use the original icon bounding box and the current icon dimension to compute
|
||||
// the scaling factor
|
||||
val fullOrigWidth = getOrigX() + getOrigWidth()
|
||||
val fullOrigHeight = getOrigY() + getOrigHeight()
|
||||
val coef1 = size.width / fullOrigWidth
|
||||
val coef2 = size.height / fullOrigHeight
|
||||
val coef = min(coef1, coef2).toFloat()
|
||||
|
||||
// Use the original icon bounding box and the current icon dimension to compute
|
||||
// the offset pivot for the scaling
|
||||
var translateX = -getOrigX()
|
||||
var translateY = -getOrigY()
|
||||
if (coef1 != coef2) {
|
||||
if (coef1 < coef2) {
|
||||
val extraDy = ((fullOrigWidth - fullOrigHeight) / 2.0f).toFloat()
|
||||
translateY += extraDy
|
||||
} else {
|
||||
val extraDx = ((fullOrigHeight - fullOrigWidth) / 2.0f).toFloat()
|
||||
translateX += extraDx
|
||||
}
|
||||
}
|
||||
val translateXDp = translateX.toFloat().toDp().value
|
||||
val translateYDp = translateY.toFloat().toDp().value
|
||||
|
||||
// Create a combined scale + translate + clip transform before calling the transcoded painting
|
||||
// instructions
|
||||
withTransform({
|
||||
scale(scaleX = coef, scaleY = coef, pivot = Offset.Zero)
|
||||
translate(translateXDp, translateYDp)
|
||||
clipRect(
|
||||
left = 0.0f,
|
||||
top = 0.0f,
|
||||
right = fullOrigWidth.toFloat(),
|
||||
bottom = fullOrigHeight.toFloat(),
|
||||
clipOp = ClipOp.Intersect
|
||||
)
|
||||
}) {
|
||||
innerPaint(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
204
common/src/main/kotlin/dev/msfjarvis/claw/common/res/clawicons/comment_black_24dp.kt
generated
Normal file
204
common/src/main/kotlin/dev/msfjarvis/claw/common/res/clawicons/comment_black_24dp.kt
generated
Normal file
|
@ -0,0 +1,204 @@
|
|||
package dev.msfjarvis.claw.common.res.clawicons
|
||||
|
||||
import androidx.compose.ui.geometry.*
|
||||
import androidx.compose.ui.graphics.*
|
||||
import androidx.compose.ui.graphics.drawscope.DrawScope
|
||||
import androidx.compose.ui.graphics.drawscope.Fill
|
||||
import androidx.compose.ui.graphics.drawscope.Stroke
|
||||
import androidx.compose.ui.graphics.drawscope.clipRect
|
||||
import androidx.compose.ui.graphics.drawscope.translate
|
||||
import androidx.compose.ui.graphics.drawscope.withTransform
|
||||
import androidx.compose.ui.graphics.painter.Painter
|
||||
import java.util.*
|
||||
import kotlin.math.min
|
||||
|
||||
/**
|
||||
* This class has been automatically generated using <a
|
||||
* href="https://github.com/kirill-grouchnikov/aurora">Aurora SVG transcoder</a>.
|
||||
*/
|
||||
class comment_black_24dp : Painter() {
|
||||
@Suppress("UNUSED_VARIABLE") private var shape: Outline? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var generalPath: Path? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var brush: Brush? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var stroke: Stroke? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var clip: Shape? = null
|
||||
private var alpha = 1.0f
|
||||
private var blendMode = DrawScope.DefaultBlendMode
|
||||
private var alphaStack = mutableListOf(1.0f)
|
||||
private var blendModeStack = mutableListOf(DrawScope.DefaultBlendMode)
|
||||
|
||||
private fun _paint0(drawScope: DrawScope) {
|
||||
@Suppress("UNUSED_VARIABLE") var shapeText: Outline?
|
||||
@Suppress("UNUSED_VARIABLE") var generalPathText: Path? = null
|
||||
@Suppress("UNUSED_VARIABLE") var alphaText = 0.0f
|
||||
@Suppress("UNUSED_VARIABLE") var blendModeText = DrawScope.DefaultBlendMode
|
||||
with(drawScope) {
|
||||
//
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0_0
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0_1
|
||||
if (generalPath == null) {
|
||||
generalPath = Path()
|
||||
} else {
|
||||
generalPath!!.reset()
|
||||
}
|
||||
generalPath?.run {
|
||||
moveTo(21.99f, 4.0f)
|
||||
cubicTo(21.99f, 2.9f, 21.1f, 2.0f, 20.0f, 2.0f)
|
||||
lineTo(4.0f, 2.0f)
|
||||
cubicTo(2.9f, 2.0f, 2.0f, 2.9f, 2.0f, 4.0f)
|
||||
lineTo(2.0f, 16.0f)
|
||||
cubicTo(2.0f, 17.1f, 2.9f, 18.0f, 4.0f, 18.0f)
|
||||
lineTo(18.0f, 18.0f)
|
||||
lineTo(22.0f, 22.0f)
|
||||
lineTo(21.99f, 4.0f)
|
||||
close()
|
||||
moveTo(20.0f, 4.0f)
|
||||
lineTo(20.0f, 17.17f)
|
||||
lineTo(18.83f, 16.0f)
|
||||
lineTo(4.0f, 16.0f)
|
||||
lineTo(4.0f, 4.0f)
|
||||
lineTo(20.0f, 4.0f)
|
||||
close()
|
||||
moveTo(6.0f, 12.0f)
|
||||
lineTo(18.0f, 12.0f)
|
||||
lineTo(18.0f, 14.0f)
|
||||
lineTo(6.0f, 14.0f)
|
||||
close()
|
||||
moveTo(6.0f, 9.0f)
|
||||
lineTo(18.0f, 9.0f)
|
||||
lineTo(18.0f, 11.0f)
|
||||
lineTo(6.0f, 11.0f)
|
||||
close()
|
||||
moveTo(6.0f, 6.0f)
|
||||
lineTo(18.0f, 6.0f)
|
||||
lineTo(18.0f, 8.0f)
|
||||
lineTo(6.0f, 8.0f)
|
||||
close()
|
||||
}
|
||||
shape = Outline.Generic(generalPath!!)
|
||||
brush = SolidColor(Color(0, 0, 0, 255))
|
||||
drawOutline(
|
||||
outline = shape!!,
|
||||
style = Fill,
|
||||
brush = brush!!,
|
||||
alpha = alpha,
|
||||
blendMode = blendMode
|
||||
)
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
}
|
||||
}
|
||||
|
||||
private fun innerPaint(drawScope: DrawScope) {
|
||||
_paint0(drawScope)
|
||||
|
||||
shape = null
|
||||
generalPath = null
|
||||
brush = null
|
||||
stroke = null
|
||||
clip = null
|
||||
alpha = 1.0f
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Returns the X of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The X of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigX(): Double {
|
||||
return 2.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Y of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The Y of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigY(): Double {
|
||||
return 2.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the width of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The width of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigWidth(): Double {
|
||||
return 20.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the height of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The height of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigHeight(): Double {
|
||||
return 20.0
|
||||
}
|
||||
}
|
||||
|
||||
override val intrinsicSize: Size
|
||||
get() = Size.Unspecified
|
||||
|
||||
override fun DrawScope.onDraw() {
|
||||
clipRect {
|
||||
// Use the original icon bounding box and the current icon dimension to compute
|
||||
// the scaling factor
|
||||
val fullOrigWidth = getOrigX() + getOrigWidth()
|
||||
val fullOrigHeight = getOrigY() + getOrigHeight()
|
||||
val coef1 = size.width / fullOrigWidth
|
||||
val coef2 = size.height / fullOrigHeight
|
||||
val coef = min(coef1, coef2).toFloat()
|
||||
|
||||
// Use the original icon bounding box and the current icon dimension to compute
|
||||
// the offset pivot for the scaling
|
||||
var translateX = -getOrigX()
|
||||
var translateY = -getOrigY()
|
||||
if (coef1 != coef2) {
|
||||
if (coef1 < coef2) {
|
||||
val extraDy = ((fullOrigWidth - fullOrigHeight) / 2.0f).toFloat()
|
||||
translateY += extraDy
|
||||
} else {
|
||||
val extraDx = ((fullOrigHeight - fullOrigWidth) / 2.0f).toFloat()
|
||||
translateX += extraDx
|
||||
}
|
||||
}
|
||||
val translateXDp = translateX.toFloat().toDp().value
|
||||
val translateYDp = translateY.toFloat().toDp().value
|
||||
|
||||
// Create a combined scale + translate + clip transform before calling the transcoded painting
|
||||
// instructions
|
||||
withTransform({
|
||||
scale(scaleX = coef, scaleY = coef, pivot = Offset.Zero)
|
||||
translate(translateXDp, translateYDp)
|
||||
clipRect(
|
||||
left = 0.0f,
|
||||
top = 0.0f,
|
||||
right = fullOrigWidth.toFloat(),
|
||||
bottom = fullOrigHeight.toFloat(),
|
||||
clipOp = ClipOp.Intersect
|
||||
)
|
||||
}) {
|
||||
innerPaint(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
182
common/src/main/kotlin/dev/msfjarvis/claw/common/res/clawicons/favorite_black_24dp.kt
generated
Normal file
182
common/src/main/kotlin/dev/msfjarvis/claw/common/res/clawicons/favorite_black_24dp.kt
generated
Normal file
|
@ -0,0 +1,182 @@
|
|||
package dev.msfjarvis.claw.common.res.clawicons
|
||||
|
||||
import androidx.compose.ui.geometry.*
|
||||
import androidx.compose.ui.graphics.*
|
||||
import androidx.compose.ui.graphics.drawscope.DrawScope
|
||||
import androidx.compose.ui.graphics.drawscope.Fill
|
||||
import androidx.compose.ui.graphics.drawscope.Stroke
|
||||
import androidx.compose.ui.graphics.drawscope.clipRect
|
||||
import androidx.compose.ui.graphics.drawscope.translate
|
||||
import androidx.compose.ui.graphics.drawscope.withTransform
|
||||
import androidx.compose.ui.graphics.painter.Painter
|
||||
import java.util.*
|
||||
import kotlin.math.min
|
||||
|
||||
/**
|
||||
* This class has been automatically generated using <a
|
||||
* href="https://github.com/kirill-grouchnikov/aurora">Aurora SVG transcoder</a>.
|
||||
*/
|
||||
class favorite_black_24dp : Painter() {
|
||||
@Suppress("UNUSED_VARIABLE") private var shape: Outline? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var generalPath: Path? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var brush: Brush? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var stroke: Stroke? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var clip: Shape? = null
|
||||
private var alpha = 1.0f
|
||||
private var blendMode = DrawScope.DefaultBlendMode
|
||||
private var alphaStack = mutableListOf(1.0f)
|
||||
private var blendModeStack = mutableListOf(DrawScope.DefaultBlendMode)
|
||||
|
||||
private fun _paint0(drawScope: DrawScope) {
|
||||
@Suppress("UNUSED_VARIABLE") var shapeText: Outline?
|
||||
@Suppress("UNUSED_VARIABLE") var generalPathText: Path? = null
|
||||
@Suppress("UNUSED_VARIABLE") var alphaText = 0.0f
|
||||
@Suppress("UNUSED_VARIABLE") var blendModeText = DrawScope.DefaultBlendMode
|
||||
with(drawScope) {
|
||||
//
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0_0
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0_1
|
||||
if (generalPath == null) {
|
||||
generalPath = Path()
|
||||
} else {
|
||||
generalPath!!.reset()
|
||||
}
|
||||
generalPath?.run {
|
||||
moveTo(12.0f, 21.35f)
|
||||
lineTo(10.55f, 20.03f)
|
||||
cubicTo(5.4f, 15.36f, 2.0f, 12.28f, 2.0f, 8.5f)
|
||||
cubicTo(2.0f, 5.42f, 4.42f, 3.0f, 7.5f, 3.0f)
|
||||
cubicTo(9.24f, 3.0f, 10.91f, 3.81f, 12.0f, 5.09f)
|
||||
cubicTo(13.09f, 3.81f, 14.76f, 3.0f, 16.5f, 3.0f)
|
||||
cubicTo(19.58f, 3.0f, 22.0f, 5.42f, 22.0f, 8.5f)
|
||||
cubicTo(22.0f, 12.28f, 18.6f, 15.360001f, 13.45f, 20.04f)
|
||||
lineTo(12.0f, 21.35f)
|
||||
close()
|
||||
}
|
||||
shape = Outline.Generic(generalPath!!)
|
||||
brush = SolidColor(Color(0, 0, 0, 255))
|
||||
drawOutline(
|
||||
outline = shape!!,
|
||||
style = Fill,
|
||||
brush = brush!!,
|
||||
alpha = alpha,
|
||||
blendMode = blendMode
|
||||
)
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
}
|
||||
}
|
||||
|
||||
private fun innerPaint(drawScope: DrawScope) {
|
||||
_paint0(drawScope)
|
||||
|
||||
shape = null
|
||||
generalPath = null
|
||||
brush = null
|
||||
stroke = null
|
||||
clip = null
|
||||
alpha = 1.0f
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Returns the X of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The X of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigX(): Double {
|
||||
return 2.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Y of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The Y of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigY(): Double {
|
||||
return 3.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the width of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The width of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigWidth(): Double {
|
||||
return 20.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the height of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The height of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigHeight(): Double {
|
||||
return 18.350000381469727
|
||||
}
|
||||
}
|
||||
|
||||
override val intrinsicSize: Size
|
||||
get() = Size.Unspecified
|
||||
|
||||
override fun DrawScope.onDraw() {
|
||||
clipRect {
|
||||
// Use the original icon bounding box and the current icon dimension to compute
|
||||
// the scaling factor
|
||||
val fullOrigWidth = getOrigX() + getOrigWidth()
|
||||
val fullOrigHeight = getOrigY() + getOrigHeight()
|
||||
val coef1 = size.width / fullOrigWidth
|
||||
val coef2 = size.height / fullOrigHeight
|
||||
val coef = min(coef1, coef2).toFloat()
|
||||
|
||||
// Use the original icon bounding box and the current icon dimension to compute
|
||||
// the offset pivot for the scaling
|
||||
var translateX = -getOrigX()
|
||||
var translateY = -getOrigY()
|
||||
if (coef1 != coef2) {
|
||||
if (coef1 < coef2) {
|
||||
val extraDy = ((fullOrigWidth - fullOrigHeight) / 2.0f).toFloat()
|
||||
translateY += extraDy
|
||||
} else {
|
||||
val extraDx = ((fullOrigHeight - fullOrigWidth) / 2.0f).toFloat()
|
||||
translateX += extraDx
|
||||
}
|
||||
}
|
||||
val translateXDp = translateX.toFloat().toDp().value
|
||||
val translateYDp = translateY.toFloat().toDp().value
|
||||
|
||||
// Create a combined scale + translate + clip transform before calling the transcoded painting
|
||||
// instructions
|
||||
withTransform({
|
||||
scale(scaleX = coef, scaleY = coef, pivot = Offset.Zero)
|
||||
translate(translateXDp, translateYDp)
|
||||
clipRect(
|
||||
left = 0.0f,
|
||||
top = 0.0f,
|
||||
right = fullOrigWidth.toFloat(),
|
||||
bottom = fullOrigHeight.toFloat(),
|
||||
clipOp = ClipOp.Intersect
|
||||
)
|
||||
}) {
|
||||
innerPaint(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
193
common/src/main/kotlin/dev/msfjarvis/claw/common/res/clawicons/favorite_border_black_24dp.kt
generated
Normal file
193
common/src/main/kotlin/dev/msfjarvis/claw/common/res/clawicons/favorite_border_black_24dp.kt
generated
Normal file
|
@ -0,0 +1,193 @@
|
|||
package dev.msfjarvis.claw.common.res.clawicons
|
||||
|
||||
import androidx.compose.ui.geometry.*
|
||||
import androidx.compose.ui.graphics.*
|
||||
import androidx.compose.ui.graphics.drawscope.DrawScope
|
||||
import androidx.compose.ui.graphics.drawscope.Fill
|
||||
import androidx.compose.ui.graphics.drawscope.Stroke
|
||||
import androidx.compose.ui.graphics.drawscope.clipRect
|
||||
import androidx.compose.ui.graphics.drawscope.translate
|
||||
import androidx.compose.ui.graphics.drawscope.withTransform
|
||||
import androidx.compose.ui.graphics.painter.Painter
|
||||
import java.util.*
|
||||
import kotlin.math.min
|
||||
|
||||
/**
|
||||
* This class has been automatically generated using <a
|
||||
* href="https://github.com/kirill-grouchnikov/aurora">Aurora SVG transcoder</a>.
|
||||
*/
|
||||
class favorite_border_black_24dp : Painter() {
|
||||
@Suppress("UNUSED_VARIABLE") private var shape: Outline? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var generalPath: Path? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var brush: Brush? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var stroke: Stroke? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var clip: Shape? = null
|
||||
private var alpha = 1.0f
|
||||
private var blendMode = DrawScope.DefaultBlendMode
|
||||
private var alphaStack = mutableListOf(1.0f)
|
||||
private var blendModeStack = mutableListOf(DrawScope.DefaultBlendMode)
|
||||
|
||||
private fun _paint0(drawScope: DrawScope) {
|
||||
@Suppress("UNUSED_VARIABLE") var shapeText: Outline?
|
||||
@Suppress("UNUSED_VARIABLE") var generalPathText: Path? = null
|
||||
@Suppress("UNUSED_VARIABLE") var alphaText = 0.0f
|
||||
@Suppress("UNUSED_VARIABLE") var blendModeText = DrawScope.DefaultBlendMode
|
||||
with(drawScope) {
|
||||
//
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0_0
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0_1
|
||||
if (generalPath == null) {
|
||||
generalPath = Path()
|
||||
} else {
|
||||
generalPath!!.reset()
|
||||
}
|
||||
generalPath?.run {
|
||||
moveTo(16.5f, 3.0f)
|
||||
cubicTo(14.76f, 3.0f, 13.09f, 3.81f, 12.0f, 5.09f)
|
||||
cubicTo(10.91f, 3.81f, 9.24f, 3.0f, 7.5f, 3.0f)
|
||||
cubicTo(4.42f, 3.0f, 2.0f, 5.42f, 2.0f, 8.5f)
|
||||
cubicTo(2.0f, 12.28f, 5.4f, 15.360001f, 10.55f, 20.04f)
|
||||
lineTo(12.0f, 21.35f)
|
||||
lineTo(13.45f, 20.03f)
|
||||
cubicTo(18.6f, 15.36f, 22.0f, 12.28f, 22.0f, 8.5f)
|
||||
cubicTo(22.0f, 5.42f, 19.58f, 3.0f, 16.5f, 3.0f)
|
||||
close()
|
||||
moveTo(12.1f, 18.55f)
|
||||
lineTo(12.0f, 18.65f)
|
||||
lineTo(11.9f, 18.55f)
|
||||
cubicTo(7.14f, 14.24f, 4.0f, 11.39f, 4.0f, 8.5f)
|
||||
cubicTo(4.0f, 6.5f, 5.5f, 5.0f, 7.5f, 5.0f)
|
||||
cubicTo(9.04f, 5.0f, 10.54f, 5.99f, 11.07f, 7.3599997f)
|
||||
lineTo(12.94f, 7.3599997f)
|
||||
cubicTo(13.46f, 5.99f, 14.96f, 5.0f, 16.5f, 5.0f)
|
||||
cubicTo(18.5f, 5.0f, 20.0f, 6.5f, 20.0f, 8.5f)
|
||||
cubicTo(20.0f, 11.39f, 16.86f, 14.24f, 12.1f, 18.55f)
|
||||
close()
|
||||
}
|
||||
shape = Outline.Generic(generalPath!!)
|
||||
brush = SolidColor(Color(0, 0, 0, 255))
|
||||
drawOutline(
|
||||
outline = shape!!,
|
||||
style = Fill,
|
||||
brush = brush!!,
|
||||
alpha = alpha,
|
||||
blendMode = blendMode
|
||||
)
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
}
|
||||
}
|
||||
|
||||
private fun innerPaint(drawScope: DrawScope) {
|
||||
_paint0(drawScope)
|
||||
|
||||
shape = null
|
||||
generalPath = null
|
||||
brush = null
|
||||
stroke = null
|
||||
clip = null
|
||||
alpha = 1.0f
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Returns the X of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The X of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigX(): Double {
|
||||
return 2.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Y of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The Y of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigY(): Double {
|
||||
return 3.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the width of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The width of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigWidth(): Double {
|
||||
return 20.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the height of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The height of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigHeight(): Double {
|
||||
return 18.350000381469727
|
||||
}
|
||||
}
|
||||
|
||||
override val intrinsicSize: Size
|
||||
get() = Size.Unspecified
|
||||
|
||||
override fun DrawScope.onDraw() {
|
||||
clipRect {
|
||||
// Use the original icon bounding box and the current icon dimension to compute
|
||||
// the scaling factor
|
||||
val fullOrigWidth = getOrigX() + getOrigWidth()
|
||||
val fullOrigHeight = getOrigY() + getOrigHeight()
|
||||
val coef1 = size.width / fullOrigWidth
|
||||
val coef2 = size.height / fullOrigHeight
|
||||
val coef = min(coef1, coef2).toFloat()
|
||||
|
||||
// Use the original icon bounding box and the current icon dimension to compute
|
||||
// the offset pivot for the scaling
|
||||
var translateX = -getOrigX()
|
||||
var translateY = -getOrigY()
|
||||
if (coef1 != coef2) {
|
||||
if (coef1 < coef2) {
|
||||
val extraDy = ((fullOrigWidth - fullOrigHeight) / 2.0f).toFloat()
|
||||
translateY += extraDy
|
||||
} else {
|
||||
val extraDx = ((fullOrigHeight - fullOrigWidth) / 2.0f).toFloat()
|
||||
translateX += extraDx
|
||||
}
|
||||
}
|
||||
val translateXDp = translateX.toFloat().toDp().value
|
||||
val translateYDp = translateY.toFloat().toDp().value
|
||||
|
||||
// Create a combined scale + translate + clip transform before calling the transcoded painting
|
||||
// instructions
|
||||
withTransform({
|
||||
scale(scaleX = coef, scaleY = coef, pivot = Offset.Zero)
|
||||
translate(translateXDp, translateYDp)
|
||||
clipRect(
|
||||
left = 0.0f,
|
||||
top = 0.0f,
|
||||
right = fullOrigWidth.toFloat(),
|
||||
bottom = fullOrigHeight.toFloat(),
|
||||
clipOp = ClipOp.Intersect
|
||||
)
|
||||
}) {
|
||||
innerPaint(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
226
common/src/main/kotlin/dev/msfjarvis/claw/common/res/clawicons/new_releases_black_24dp.kt
generated
Normal file
226
common/src/main/kotlin/dev/msfjarvis/claw/common/res/clawicons/new_releases_black_24dp.kt
generated
Normal file
|
@ -0,0 +1,226 @@
|
|||
package dev.msfjarvis.claw.common.res.clawicons
|
||||
|
||||
import androidx.compose.ui.geometry.*
|
||||
import androidx.compose.ui.graphics.*
|
||||
import androidx.compose.ui.graphics.drawscope.DrawScope
|
||||
import androidx.compose.ui.graphics.drawscope.Fill
|
||||
import androidx.compose.ui.graphics.drawscope.Stroke
|
||||
import androidx.compose.ui.graphics.drawscope.clipRect
|
||||
import androidx.compose.ui.graphics.drawscope.translate
|
||||
import androidx.compose.ui.graphics.drawscope.withTransform
|
||||
import androidx.compose.ui.graphics.painter.Painter
|
||||
import java.util.*
|
||||
import kotlin.math.min
|
||||
|
||||
/**
|
||||
* This class has been automatically generated using <a
|
||||
* href="https://github.com/kirill-grouchnikov/aurora">Aurora SVG transcoder</a>.
|
||||
*/
|
||||
class new_releases_black_24dp : Painter() {
|
||||
@Suppress("UNUSED_VARIABLE") private var shape: Outline? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var generalPath: Path? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var brush: Brush? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var stroke: Stroke? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var clip: Shape? = null
|
||||
private var alpha = 1.0f
|
||||
private var blendMode = DrawScope.DefaultBlendMode
|
||||
private var alphaStack = mutableListOf(1.0f)
|
||||
private var blendModeStack = mutableListOf(DrawScope.DefaultBlendMode)
|
||||
|
||||
private fun _paint0(drawScope: DrawScope) {
|
||||
@Suppress("UNUSED_VARIABLE") var shapeText: Outline?
|
||||
@Suppress("UNUSED_VARIABLE") var generalPathText: Path? = null
|
||||
@Suppress("UNUSED_VARIABLE") var alphaText = 0.0f
|
||||
@Suppress("UNUSED_VARIABLE") var blendModeText = DrawScope.DefaultBlendMode
|
||||
with(drawScope) {
|
||||
//
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0_0
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0_1
|
||||
if (generalPath == null) {
|
||||
generalPath = Path()
|
||||
} else {
|
||||
generalPath!!.reset()
|
||||
}
|
||||
generalPath?.run {
|
||||
moveTo(23.0f, 12.0f)
|
||||
lineTo(20.56f, 9.22f)
|
||||
lineTo(20.9f, 5.54f)
|
||||
lineTo(17.289999f, 4.72f)
|
||||
lineTo(15.399999f, 1.5399997f)
|
||||
lineTo(12.0f, 3.0f)
|
||||
lineTo(8.6f, 1.54f)
|
||||
lineTo(6.71f, 4.72f)
|
||||
lineTo(3.1000001f, 5.5299997f)
|
||||
lineTo(3.44f, 9.21f)
|
||||
lineTo(1.0f, 12.0f)
|
||||
lineTo(3.44f, 14.78f)
|
||||
lineTo(3.1000001f, 18.47f)
|
||||
lineTo(6.71f, 19.289999f)
|
||||
lineTo(8.6f, 22.47f)
|
||||
lineTo(12.0f, 21.0f)
|
||||
lineTo(15.4f, 22.46f)
|
||||
lineTo(17.289999f, 19.279999f)
|
||||
lineTo(20.9f, 18.46f)
|
||||
lineTo(20.56f, 14.779999f)
|
||||
lineTo(23.0f, 12.0f)
|
||||
close()
|
||||
moveTo(18.49f, 14.11f)
|
||||
lineTo(18.75f, 16.9f)
|
||||
lineTo(16.01f, 17.52f)
|
||||
lineTo(14.58f, 19.93f)
|
||||
lineTo(12.0f, 18.82f)
|
||||
lineTo(9.42f, 19.93f)
|
||||
lineTo(7.9900002f, 17.52f)
|
||||
lineTo(5.25f, 16.9f)
|
||||
lineTo(5.51f, 14.099999f)
|
||||
lineTo(3.66f, 12.0f)
|
||||
lineTo(5.51f, 9.88f)
|
||||
lineTo(5.25f, 7.1000004f)
|
||||
lineTo(7.99f, 6.4900002f)
|
||||
lineTo(9.42f, 4.08f)
|
||||
lineTo(12.0f, 5.18f)
|
||||
lineTo(14.58f, 4.0699997f)
|
||||
lineTo(16.01f, 6.4799995f)
|
||||
lineTo(18.75f, 7.0999994f)
|
||||
lineTo(18.49f, 9.889999f)
|
||||
lineTo(20.34f, 12.0f)
|
||||
lineTo(18.49f, 14.11f)
|
||||
close()
|
||||
moveTo(11.0f, 15.0f)
|
||||
lineTo(13.0f, 15.0f)
|
||||
lineTo(13.0f, 17.0f)
|
||||
lineTo(11.0f, 17.0f)
|
||||
close()
|
||||
moveTo(11.0f, 7.0f)
|
||||
lineTo(13.0f, 7.0f)
|
||||
lineTo(13.0f, 13.0f)
|
||||
lineTo(11.0f, 13.0f)
|
||||
close()
|
||||
}
|
||||
shape = Outline.Generic(generalPath!!)
|
||||
brush = SolidColor(Color(0, 0, 0, 255))
|
||||
drawOutline(
|
||||
outline = shape!!,
|
||||
style = Fill,
|
||||
brush = brush!!,
|
||||
alpha = alpha,
|
||||
blendMode = blendMode
|
||||
)
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
}
|
||||
}
|
||||
|
||||
private fun innerPaint(drawScope: DrawScope) {
|
||||
_paint0(drawScope)
|
||||
|
||||
shape = null
|
||||
generalPath = null
|
||||
brush = null
|
||||
stroke = null
|
||||
clip = null
|
||||
alpha = 1.0f
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Returns the X of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The X of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigX(): Double {
|
||||
return 1.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Y of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The Y of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigY(): Double {
|
||||
return 1.5399997234344482
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the width of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The width of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigWidth(): Double {
|
||||
return 22.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the height of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The height of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigHeight(): Double {
|
||||
return 20.93000030517578
|
||||
}
|
||||
}
|
||||
|
||||
override val intrinsicSize: Size
|
||||
get() = Size.Unspecified
|
||||
|
||||
override fun DrawScope.onDraw() {
|
||||
clipRect {
|
||||
// Use the original icon bounding box and the current icon dimension to compute
|
||||
// the scaling factor
|
||||
val fullOrigWidth = getOrigX() + getOrigWidth()
|
||||
val fullOrigHeight = getOrigY() + getOrigHeight()
|
||||
val coef1 = size.width / fullOrigWidth
|
||||
val coef2 = size.height / fullOrigHeight
|
||||
val coef = min(coef1, coef2).toFloat()
|
||||
|
||||
// Use the original icon bounding box and the current icon dimension to compute
|
||||
// the offset pivot for the scaling
|
||||
var translateX = -getOrigX()
|
||||
var translateY = -getOrigY()
|
||||
if (coef1 != coef2) {
|
||||
if (coef1 < coef2) {
|
||||
val extraDy = ((fullOrigWidth - fullOrigHeight) / 2.0f).toFloat()
|
||||
translateY += extraDy
|
||||
} else {
|
||||
val extraDx = ((fullOrigHeight - fullOrigWidth) / 2.0f).toFloat()
|
||||
translateX += extraDx
|
||||
}
|
||||
}
|
||||
val translateXDp = translateX.toFloat().toDp().value
|
||||
val translateYDp = translateY.toFloat().toDp().value
|
||||
|
||||
// Create a combined scale + translate + clip transform before calling the transcoded painting
|
||||
// instructions
|
||||
withTransform({
|
||||
scale(scaleX = coef, scaleY = coef, pivot = Offset.Zero)
|
||||
translate(translateXDp, translateYDp)
|
||||
clipRect(
|
||||
left = 0.0f,
|
||||
top = 0.0f,
|
||||
right = fullOrigWidth.toFloat(),
|
||||
bottom = fullOrigHeight.toFloat(),
|
||||
clipOp = ClipOp.Intersect
|
||||
)
|
||||
}) {
|
||||
innerPaint(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
206
common/src/main/kotlin/dev/msfjarvis/claw/common/res/clawicons/new_releases_filled_black_24dp.kt
generated
Normal file
206
common/src/main/kotlin/dev/msfjarvis/claw/common/res/clawicons/new_releases_filled_black_24dp.kt
generated
Normal file
|
@ -0,0 +1,206 @@
|
|||
package dev.msfjarvis.claw.common.res.clawicons
|
||||
|
||||
import androidx.compose.ui.geometry.*
|
||||
import androidx.compose.ui.graphics.*
|
||||
import androidx.compose.ui.graphics.drawscope.DrawScope
|
||||
import androidx.compose.ui.graphics.drawscope.Fill
|
||||
import androidx.compose.ui.graphics.drawscope.Stroke
|
||||
import androidx.compose.ui.graphics.drawscope.clipRect
|
||||
import androidx.compose.ui.graphics.drawscope.translate
|
||||
import androidx.compose.ui.graphics.drawscope.withTransform
|
||||
import androidx.compose.ui.graphics.painter.Painter
|
||||
import java.util.*
|
||||
import kotlin.math.min
|
||||
|
||||
/**
|
||||
* This class has been automatically generated using <a
|
||||
* href="https://github.com/kirill-grouchnikov/aurora">Aurora SVG transcoder</a>.
|
||||
*/
|
||||
class new_releases_filled_black_24dp : Painter() {
|
||||
@Suppress("UNUSED_VARIABLE") private var shape: Outline? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var generalPath: Path? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var brush: Brush? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var stroke: Stroke? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var clip: Shape? = null
|
||||
private var alpha = 1.0f
|
||||
private var blendMode = DrawScope.DefaultBlendMode
|
||||
private var alphaStack = mutableListOf(1.0f)
|
||||
private var blendModeStack = mutableListOf(DrawScope.DefaultBlendMode)
|
||||
|
||||
private fun _paint0(drawScope: DrawScope) {
|
||||
@Suppress("UNUSED_VARIABLE") var shapeText: Outline?
|
||||
@Suppress("UNUSED_VARIABLE") var generalPathText: Path? = null
|
||||
@Suppress("UNUSED_VARIABLE") var alphaText = 0.0f
|
||||
@Suppress("UNUSED_VARIABLE") var blendModeText = DrawScope.DefaultBlendMode
|
||||
with(drawScope) {
|
||||
//
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0_0
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0_1
|
||||
if (generalPath == null) {
|
||||
generalPath = Path()
|
||||
} else {
|
||||
generalPath!!.reset()
|
||||
}
|
||||
generalPath?.run {
|
||||
moveTo(23.0f, 12.0f)
|
||||
lineTo(20.56f, 9.22f)
|
||||
lineTo(20.9f, 5.54f)
|
||||
lineTo(17.289999f, 4.72f)
|
||||
lineTo(15.399999f, 1.5399997f)
|
||||
lineTo(12.0f, 3.0f)
|
||||
lineTo(8.6f, 1.54f)
|
||||
lineTo(6.71f, 4.72f)
|
||||
lineTo(3.1000001f, 5.5299997f)
|
||||
lineTo(3.44f, 9.21f)
|
||||
lineTo(1.0f, 12.0f)
|
||||
lineTo(3.44f, 14.78f)
|
||||
lineTo(3.1000001f, 18.47f)
|
||||
lineTo(6.71f, 19.289999f)
|
||||
lineTo(8.6f, 22.47f)
|
||||
lineTo(12.0f, 21.0f)
|
||||
lineTo(15.4f, 22.46f)
|
||||
lineTo(17.289999f, 19.279999f)
|
||||
lineTo(20.9f, 18.46f)
|
||||
lineTo(20.56f, 14.779999f)
|
||||
lineTo(23.0f, 12.0f)
|
||||
close()
|
||||
moveTo(13.0f, 17.0f)
|
||||
lineTo(11.0f, 17.0f)
|
||||
lineTo(11.0f, 15.0f)
|
||||
lineTo(13.0f, 15.0f)
|
||||
lineTo(13.0f, 17.0f)
|
||||
close()
|
||||
moveTo(13.0f, 13.0f)
|
||||
lineTo(11.0f, 13.0f)
|
||||
lineTo(11.0f, 7.0f)
|
||||
lineTo(13.0f, 7.0f)
|
||||
lineTo(13.0f, 13.0f)
|
||||
close()
|
||||
}
|
||||
shape = Outline.Generic(generalPath!!)
|
||||
brush = SolidColor(Color(0, 0, 0, 255))
|
||||
drawOutline(
|
||||
outline = shape!!,
|
||||
style = Fill,
|
||||
brush = brush!!,
|
||||
alpha = alpha,
|
||||
blendMode = blendMode
|
||||
)
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
}
|
||||
}
|
||||
|
||||
private fun innerPaint(drawScope: DrawScope) {
|
||||
_paint0(drawScope)
|
||||
|
||||
shape = null
|
||||
generalPath = null
|
||||
brush = null
|
||||
stroke = null
|
||||
clip = null
|
||||
alpha = 1.0f
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Returns the X of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The X of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigX(): Double {
|
||||
return 1.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Y of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The Y of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigY(): Double {
|
||||
return 1.5399997234344482
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the width of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The width of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigWidth(): Double {
|
||||
return 22.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the height of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The height of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigHeight(): Double {
|
||||
return 20.93000030517578
|
||||
}
|
||||
}
|
||||
|
||||
override val intrinsicSize: Size
|
||||
get() = Size.Unspecified
|
||||
|
||||
override fun DrawScope.onDraw() {
|
||||
clipRect {
|
||||
// Use the original icon bounding box and the current icon dimension to compute
|
||||
// the scaling factor
|
||||
val fullOrigWidth = getOrigX() + getOrigWidth()
|
||||
val fullOrigHeight = getOrigY() + getOrigHeight()
|
||||
val coef1 = size.width / fullOrigWidth
|
||||
val coef2 = size.height / fullOrigHeight
|
||||
val coef = min(coef1, coef2).toFloat()
|
||||
|
||||
// Use the original icon bounding box and the current icon dimension to compute
|
||||
// the offset pivot for the scaling
|
||||
var translateX = -getOrigX()
|
||||
var translateY = -getOrigY()
|
||||
if (coef1 != coef2) {
|
||||
if (coef1 < coef2) {
|
||||
val extraDy = ((fullOrigWidth - fullOrigHeight) / 2.0f).toFloat()
|
||||
translateY += extraDy
|
||||
} else {
|
||||
val extraDx = ((fullOrigHeight - fullOrigWidth) / 2.0f).toFloat()
|
||||
translateX += extraDx
|
||||
}
|
||||
}
|
||||
val translateXDp = translateX.toFloat().toDp().value
|
||||
val translateYDp = translateY.toFloat().toDp().value
|
||||
|
||||
// Create a combined scale + translate + clip transform before calling the transcoded painting
|
||||
// instructions
|
||||
withTransform({
|
||||
scale(scaleX = coef, scaleY = coef, pivot = Offset.Zero)
|
||||
translate(translateXDp, translateYDp)
|
||||
clipRect(
|
||||
left = 0.0f,
|
||||
top = 0.0f,
|
||||
right = fullOrigWidth.toFloat(),
|
||||
bottom = fullOrigHeight.toFloat(),
|
||||
clipOp = ClipOp.Intersect
|
||||
)
|
||||
}) {
|
||||
innerPaint(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
202
common/src/main/kotlin/dev/msfjarvis/claw/common/res/clawicons/public_black_24dp.kt
generated
Normal file
202
common/src/main/kotlin/dev/msfjarvis/claw/common/res/clawicons/public_black_24dp.kt
generated
Normal file
|
@ -0,0 +1,202 @@
|
|||
package dev.msfjarvis.claw.common.res.clawicons
|
||||
|
||||
import androidx.compose.ui.geometry.*
|
||||
import androidx.compose.ui.graphics.*
|
||||
import androidx.compose.ui.graphics.drawscope.DrawScope
|
||||
import androidx.compose.ui.graphics.drawscope.Fill
|
||||
import androidx.compose.ui.graphics.drawscope.Stroke
|
||||
import androidx.compose.ui.graphics.drawscope.clipRect
|
||||
import androidx.compose.ui.graphics.drawscope.translate
|
||||
import androidx.compose.ui.graphics.drawscope.withTransform
|
||||
import androidx.compose.ui.graphics.painter.Painter
|
||||
import java.util.*
|
||||
import kotlin.math.min
|
||||
|
||||
/**
|
||||
* This class has been automatically generated using <a
|
||||
* href="https://github.com/kirill-grouchnikov/aurora">Aurora SVG transcoder</a>.
|
||||
*/
|
||||
class public_black_24dp : Painter() {
|
||||
@Suppress("UNUSED_VARIABLE") private var shape: Outline? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var generalPath: Path? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var brush: Brush? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var stroke: Stroke? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var clip: Shape? = null
|
||||
private var alpha = 1.0f
|
||||
private var blendMode = DrawScope.DefaultBlendMode
|
||||
private var alphaStack = mutableListOf(1.0f)
|
||||
private var blendModeStack = mutableListOf(DrawScope.DefaultBlendMode)
|
||||
|
||||
private fun _paint0(drawScope: DrawScope) {
|
||||
@Suppress("UNUSED_VARIABLE") var shapeText: Outline?
|
||||
@Suppress("UNUSED_VARIABLE") var generalPathText: Path? = null
|
||||
@Suppress("UNUSED_VARIABLE") var alphaText = 0.0f
|
||||
@Suppress("UNUSED_VARIABLE") var blendModeText = DrawScope.DefaultBlendMode
|
||||
with(drawScope) {
|
||||
//
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0_0
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0_1
|
||||
if (generalPath == null) {
|
||||
generalPath = Path()
|
||||
} else {
|
||||
generalPath!!.reset()
|
||||
}
|
||||
generalPath?.run {
|
||||
moveTo(12.0f, 2.0f)
|
||||
cubicTo(6.48f, 2.0f, 2.0f, 6.48f, 2.0f, 12.0f)
|
||||
cubicTo(2.0f, 17.52f, 6.48f, 22.0f, 12.0f, 22.0f)
|
||||
cubicTo(17.52f, 22.0f, 22.0f, 17.52f, 22.0f, 12.0f)
|
||||
cubicTo(22.0f, 6.4799995f, 17.52f, 2.0f, 12.0f, 2.0f)
|
||||
close()
|
||||
moveTo(4.0f, 12.0f)
|
||||
cubicTo(4.0f, 11.39f, 4.08f, 10.79f, 4.21f, 10.22f)
|
||||
lineTo(8.99f, 15.0f)
|
||||
lineTo(8.99f, 16.0f)
|
||||
cubicTo(8.99f, 17.1f, 9.889999f, 18.0f, 10.99f, 18.0f)
|
||||
lineTo(10.99f, 19.93f)
|
||||
cubicTo(7.06f, 19.43f, 4.0f, 16.07f, 4.0f, 12.0f)
|
||||
close()
|
||||
moveTo(17.89f, 17.4f)
|
||||
cubicTo(17.63f, 16.59f, 16.89f, 16.0f, 15.99f, 16.0f)
|
||||
lineTo(14.99f, 16.0f)
|
||||
lineTo(14.99f, 13.0f)
|
||||
cubicTo(14.99f, 12.45f, 14.54f, 12.0f, 13.99f, 12.0f)
|
||||
lineTo(7.99f, 12.0f)
|
||||
lineTo(7.99f, 10.0f)
|
||||
lineTo(9.99f, 10.0f)
|
||||
cubicTo(10.54f, 10.0f, 10.99f, 9.55f, 10.99f, 9.0f)
|
||||
lineTo(10.99f, 7.0f)
|
||||
lineTo(12.99f, 7.0f)
|
||||
cubicTo(14.09f, 7.0f, 14.99f, 6.1f, 14.99f, 5.0f)
|
||||
lineTo(14.99f, 4.59f)
|
||||
cubicTo(17.92f, 5.77f, 20.0f, 8.65f, 20.0f, 12.0f)
|
||||
cubicTo(20.0f, 14.08f, 19.19f, 15.98f, 17.89f, 17.4f)
|
||||
close()
|
||||
}
|
||||
shape = Outline.Generic(generalPath!!)
|
||||
brush = SolidColor(Color(0, 0, 0, 255))
|
||||
drawOutline(
|
||||
outline = shape!!,
|
||||
style = Fill,
|
||||
brush = brush!!,
|
||||
alpha = alpha,
|
||||
blendMode = blendMode
|
||||
)
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
}
|
||||
}
|
||||
|
||||
private fun innerPaint(drawScope: DrawScope) {
|
||||
_paint0(drawScope)
|
||||
|
||||
shape = null
|
||||
generalPath = null
|
||||
brush = null
|
||||
stroke = null
|
||||
clip = null
|
||||
alpha = 1.0f
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Returns the X of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The X of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigX(): Double {
|
||||
return 2.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Y of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The Y of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigY(): Double {
|
||||
return 2.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the width of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The width of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigWidth(): Double {
|
||||
return 20.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the height of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The height of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigHeight(): Double {
|
||||
return 20.0
|
||||
}
|
||||
}
|
||||
|
||||
override val intrinsicSize: Size
|
||||
get() = Size.Unspecified
|
||||
|
||||
override fun DrawScope.onDraw() {
|
||||
clipRect {
|
||||
// Use the original icon bounding box and the current icon dimension to compute
|
||||
// the scaling factor
|
||||
val fullOrigWidth = getOrigX() + getOrigWidth()
|
||||
val fullOrigHeight = getOrigY() + getOrigHeight()
|
||||
val coef1 = size.width / fullOrigWidth
|
||||
val coef2 = size.height / fullOrigHeight
|
||||
val coef = min(coef1, coef2).toFloat()
|
||||
|
||||
// Use the original icon bounding box and the current icon dimension to compute
|
||||
// the offset pivot for the scaling
|
||||
var translateX = -getOrigX()
|
||||
var translateY = -getOrigY()
|
||||
if (coef1 != coef2) {
|
||||
if (coef1 < coef2) {
|
||||
val extraDy = ((fullOrigWidth - fullOrigHeight) / 2.0f).toFloat()
|
||||
translateY += extraDy
|
||||
} else {
|
||||
val extraDx = ((fullOrigHeight - fullOrigWidth) / 2.0f).toFloat()
|
||||
translateX += extraDx
|
||||
}
|
||||
}
|
||||
val translateXDp = translateX.toFloat().toDp().value
|
||||
val translateYDp = translateY.toFloat().toDp().value
|
||||
|
||||
// Create a combined scale + translate + clip transform before calling the transcoded painting
|
||||
// instructions
|
||||
withTransform({
|
||||
scale(scaleX = coef, scaleY = coef, pivot = Offset.Zero)
|
||||
translate(translateXDp, translateYDp)
|
||||
clipRect(
|
||||
left = 0.0f,
|
||||
top = 0.0f,
|
||||
right = fullOrigWidth.toFloat(),
|
||||
bottom = fullOrigHeight.toFloat(),
|
||||
clipOp = ClipOp.Intersect
|
||||
)
|
||||
}) {
|
||||
innerPaint(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
197
common/src/main/kotlin/dev/msfjarvis/claw/common/res/clawicons/whatshot_black_24dp.kt
generated
Normal file
197
common/src/main/kotlin/dev/msfjarvis/claw/common/res/clawicons/whatshot_black_24dp.kt
generated
Normal file
|
@ -0,0 +1,197 @@
|
|||
package dev.msfjarvis.claw.common.res.clawicons
|
||||
|
||||
import androidx.compose.ui.geometry.*
|
||||
import androidx.compose.ui.graphics.*
|
||||
import androidx.compose.ui.graphics.drawscope.DrawScope
|
||||
import androidx.compose.ui.graphics.drawscope.Fill
|
||||
import androidx.compose.ui.graphics.drawscope.Stroke
|
||||
import androidx.compose.ui.graphics.drawscope.clipRect
|
||||
import androidx.compose.ui.graphics.drawscope.translate
|
||||
import androidx.compose.ui.graphics.drawscope.withTransform
|
||||
import androidx.compose.ui.graphics.painter.Painter
|
||||
import java.util.*
|
||||
import kotlin.math.min
|
||||
|
||||
/**
|
||||
* This class has been automatically generated using <a
|
||||
* href="https://github.com/kirill-grouchnikov/aurora">Aurora SVG transcoder</a>.
|
||||
*/
|
||||
class whatshot_black_24dp : Painter() {
|
||||
@Suppress("UNUSED_VARIABLE") private var shape: Outline? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var generalPath: Path? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var brush: Brush? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var stroke: Stroke? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var clip: Shape? = null
|
||||
private var alpha = 1.0f
|
||||
private var blendMode = DrawScope.DefaultBlendMode
|
||||
private var alphaStack = mutableListOf(1.0f)
|
||||
private var blendModeStack = mutableListOf(DrawScope.DefaultBlendMode)
|
||||
|
||||
private fun _paint0(drawScope: DrawScope) {
|
||||
@Suppress("UNUSED_VARIABLE") var shapeText: Outline?
|
||||
@Suppress("UNUSED_VARIABLE") var generalPathText: Path? = null
|
||||
@Suppress("UNUSED_VARIABLE") var alphaText = 0.0f
|
||||
@Suppress("UNUSED_VARIABLE") var blendModeText = DrawScope.DefaultBlendMode
|
||||
with(drawScope) {
|
||||
//
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0_0
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0_1
|
||||
if (generalPath == null) {
|
||||
generalPath = Path()
|
||||
} else {
|
||||
generalPath!!.reset()
|
||||
}
|
||||
generalPath?.run {
|
||||
moveTo(11.57f, 13.16f)
|
||||
cubicTo(10.21f, 13.44f, 9.4f, 14.32f, 9.4f, 15.57f)
|
||||
cubicTo(9.4f, 16.91f, 10.509999f, 17.99f, 11.889999f, 17.99f)
|
||||
cubicTo(13.94f, 17.99f, 15.599999f, 16.33f, 15.599999f, 14.28f)
|
||||
cubicTo(15.599999f, 13.21f, 15.45f, 12.16f, 15.139999f, 11.16f)
|
||||
cubicTo(14.349999f, 12.23f, 12.94f, 12.88f, 11.57f, 13.16f)
|
||||
close()
|
||||
moveTo(13.5f, 0.67f)
|
||||
cubicTo(13.5f, 0.67f, 14.24f, 3.3200002f, 14.24f, 5.4700003f)
|
||||
cubicTo(14.24f, 7.53f, 12.889999f, 9.200001f, 10.83f, 9.200001f)
|
||||
cubicTo(8.76f, 9.200001f, 7.2f, 7.5300007f, 7.2f, 5.4700007f)
|
||||
lineTo(7.23f, 5.1100006f)
|
||||
cubicTo(5.21f, 7.51f, 4.0f, 10.62f, 4.0f, 14.0f)
|
||||
cubicTo(4.0f, 18.42f, 7.58f, 22.0f, 12.0f, 22.0f)
|
||||
cubicTo(16.42f, 22.0f, 20.0f, 18.42f, 20.0f, 14.0f)
|
||||
cubicTo(20.0f, 8.61f, 17.41f, 3.8f, 13.5f, 0.67f)
|
||||
close()
|
||||
moveTo(12.0f, 20.0f)
|
||||
cubicTo(8.690001f, 20.0f, 6.0f, 17.31f, 6.0f, 14.0f)
|
||||
cubicTo(6.0f, 12.47f, 6.3f, 10.96f, 6.86f, 9.57f)
|
||||
cubicTo(7.87f, 10.58f, 9.27f, 11.2f, 10.83f, 11.2f)
|
||||
cubicTo(13.49f, 11.2f, 15.58f, 9.37f, 16.11f, 6.77f)
|
||||
cubicTo(17.34f, 8.97f, 18.0f, 11.44f, 18.0f, 14.0f)
|
||||
cubicTo(18.0f, 17.31f, 15.309999f, 20.0f, 12.0f, 20.0f)
|
||||
close()
|
||||
}
|
||||
shape = Outline.Generic(generalPath!!)
|
||||
brush = SolidColor(Color(0, 0, 0, 255))
|
||||
drawOutline(
|
||||
outline = shape!!,
|
||||
style = Fill,
|
||||
brush = brush!!,
|
||||
alpha = alpha,
|
||||
blendMode = blendMode
|
||||
)
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
}
|
||||
}
|
||||
|
||||
private fun innerPaint(drawScope: DrawScope) {
|
||||
_paint0(drawScope)
|
||||
|
||||
shape = null
|
||||
generalPath = null
|
||||
brush = null
|
||||
stroke = null
|
||||
clip = null
|
||||
alpha = 1.0f
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Returns the X of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The X of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigX(): Double {
|
||||
return 4.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Y of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The Y of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigY(): Double {
|
||||
return 0.6700000166893005
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the width of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The width of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigWidth(): Double {
|
||||
return 16.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the height of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The height of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigHeight(): Double {
|
||||
return 21.329999923706055
|
||||
}
|
||||
}
|
||||
|
||||
override val intrinsicSize: Size
|
||||
get() = Size.Unspecified
|
||||
|
||||
override fun DrawScope.onDraw() {
|
||||
clipRect {
|
||||
// Use the original icon bounding box and the current icon dimension to compute
|
||||
// the scaling factor
|
||||
val fullOrigWidth = getOrigX() + getOrigWidth()
|
||||
val fullOrigHeight = getOrigY() + getOrigHeight()
|
||||
val coef1 = size.width / fullOrigWidth
|
||||
val coef2 = size.height / fullOrigHeight
|
||||
val coef = min(coef1, coef2).toFloat()
|
||||
|
||||
// Use the original icon bounding box and the current icon dimension to compute
|
||||
// the offset pivot for the scaling
|
||||
var translateX = -getOrigX()
|
||||
var translateY = -getOrigY()
|
||||
if (coef1 != coef2) {
|
||||
if (coef1 < coef2) {
|
||||
val extraDy = ((fullOrigWidth - fullOrigHeight) / 2.0f).toFloat()
|
||||
translateY += extraDy
|
||||
} else {
|
||||
val extraDx = ((fullOrigHeight - fullOrigWidth) / 2.0f).toFloat()
|
||||
translateX += extraDx
|
||||
}
|
||||
}
|
||||
val translateXDp = translateX.toFloat().toDp().value
|
||||
val translateYDp = translateY.toFloat().toDp().value
|
||||
|
||||
// Create a combined scale + translate + clip transform before calling the transcoded painting
|
||||
// instructions
|
||||
withTransform({
|
||||
scale(scaleX = coef, scaleY = coef, pivot = Offset.Zero)
|
||||
translate(translateXDp, translateYDp)
|
||||
clipRect(
|
||||
left = 0.0f,
|
||||
top = 0.0f,
|
||||
right = fullOrigWidth.toFloat(),
|
||||
bottom = fullOrigHeight.toFloat(),
|
||||
clipOp = ClipOp.Intersect
|
||||
)
|
||||
}) {
|
||||
innerPaint(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
189
common/src/main/kotlin/dev/msfjarvis/claw/common/res/clawicons/whatshot_filled_black_24dp.kt
generated
Normal file
189
common/src/main/kotlin/dev/msfjarvis/claw/common/res/clawicons/whatshot_filled_black_24dp.kt
generated
Normal file
|
@ -0,0 +1,189 @@
|
|||
package dev.msfjarvis.claw.common.res.clawicons
|
||||
|
||||
import androidx.compose.ui.geometry.*
|
||||
import androidx.compose.ui.graphics.*
|
||||
import androidx.compose.ui.graphics.drawscope.DrawScope
|
||||
import androidx.compose.ui.graphics.drawscope.Fill
|
||||
import androidx.compose.ui.graphics.drawscope.Stroke
|
||||
import androidx.compose.ui.graphics.drawscope.clipRect
|
||||
import androidx.compose.ui.graphics.drawscope.translate
|
||||
import androidx.compose.ui.graphics.drawscope.withTransform
|
||||
import androidx.compose.ui.graphics.painter.Painter
|
||||
import java.util.*
|
||||
import kotlin.math.min
|
||||
|
||||
/**
|
||||
* This class has been automatically generated using <a
|
||||
* href="https://github.com/kirill-grouchnikov/aurora">Aurora SVG transcoder</a>.
|
||||
*/
|
||||
class whatshot_filled_black_24dp : Painter() {
|
||||
@Suppress("UNUSED_VARIABLE") private var shape: Outline? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var generalPath: Path? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var brush: Brush? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var stroke: Stroke? = null
|
||||
@Suppress("UNUSED_VARIABLE") private var clip: Shape? = null
|
||||
private var alpha = 1.0f
|
||||
private var blendMode = DrawScope.DefaultBlendMode
|
||||
private var alphaStack = mutableListOf(1.0f)
|
||||
private var blendModeStack = mutableListOf(DrawScope.DefaultBlendMode)
|
||||
|
||||
private fun _paint0(drawScope: DrawScope) {
|
||||
@Suppress("UNUSED_VARIABLE") var shapeText: Outline?
|
||||
@Suppress("UNUSED_VARIABLE") var generalPathText: Path? = null
|
||||
@Suppress("UNUSED_VARIABLE") var alphaText = 0.0f
|
||||
@Suppress("UNUSED_VARIABLE") var blendModeText = DrawScope.DefaultBlendMode
|
||||
with(drawScope) {
|
||||
//
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0_0
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
alphaStack.add(0, alpha)
|
||||
alpha *= 1.0f
|
||||
blendModeStack.add(0, BlendMode.SrcOver)
|
||||
blendMode = BlendMode.SrcOver
|
||||
// _0_1
|
||||
if (generalPath == null) {
|
||||
generalPath = Path()
|
||||
} else {
|
||||
generalPath!!.reset()
|
||||
}
|
||||
generalPath?.run {
|
||||
moveTo(13.5f, 0.67f)
|
||||
cubicTo(13.5f, 0.67f, 14.24f, 3.3200002f, 14.24f, 5.4700003f)
|
||||
cubicTo(14.24f, 7.53f, 12.889999f, 9.200001f, 10.83f, 9.200001f)
|
||||
cubicTo(8.76f, 9.200001f, 7.2f, 7.5300007f, 7.2f, 5.4700007f)
|
||||
lineTo(7.23f, 5.1100006f)
|
||||
cubicTo(5.21f, 7.51f, 4.0f, 10.62f, 4.0f, 14.0f)
|
||||
cubicTo(4.0f, 18.42f, 7.58f, 22.0f, 12.0f, 22.0f)
|
||||
cubicTo(16.42f, 22.0f, 20.0f, 18.42f, 20.0f, 14.0f)
|
||||
cubicTo(20.0f, 8.61f, 17.41f, 3.8f, 13.5f, 0.67f)
|
||||
close()
|
||||
moveTo(11.71f, 19.0f)
|
||||
cubicTo(9.93f, 19.0f, 8.49f, 17.6f, 8.49f, 15.86f)
|
||||
cubicTo(8.49f, 14.24f, 9.54f, 13.099999f, 11.299999f, 12.74f)
|
||||
cubicTo(13.07f, 12.38f, 14.9f, 11.53f, 15.919999f, 10.16f)
|
||||
cubicTo(16.31f, 11.45f, 16.509998f, 12.809999f, 16.509998f, 14.2f)
|
||||
cubicTo(16.509998f, 16.85f, 14.359999f, 19.0f, 11.709998f, 19.0f)
|
||||
close()
|
||||
}
|
||||
shape = Outline.Generic(generalPath!!)
|
||||
brush = SolidColor(Color(0, 0, 0, 255))
|
||||
drawOutline(
|
||||
outline = shape!!,
|
||||
style = Fill,
|
||||
brush = brush!!,
|
||||
alpha = alpha,
|
||||
blendMode = blendMode
|
||||
)
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
alpha = alphaStack.removeAt(0)
|
||||
blendMode = blendModeStack.removeAt(0)
|
||||
}
|
||||
}
|
||||
|
||||
private fun innerPaint(drawScope: DrawScope) {
|
||||
_paint0(drawScope)
|
||||
|
||||
shape = null
|
||||
generalPath = null
|
||||
brush = null
|
||||
stroke = null
|
||||
clip = null
|
||||
alpha = 1.0f
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Returns the X of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The X of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigX(): Double {
|
||||
return 4.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Y of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The Y of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigY(): Double {
|
||||
return 0.6700000166893005
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the width of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The width of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigWidth(): Double {
|
||||
return 16.0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the height of the bounding box of the original SVG image.
|
||||
*
|
||||
* @return The height of the bounding box of the original SVG image.
|
||||
*/
|
||||
fun getOrigHeight(): Double {
|
||||
return 21.329999923706055
|
||||
}
|
||||
}
|
||||
|
||||
override val intrinsicSize: Size
|
||||
get() = Size.Unspecified
|
||||
|
||||
override fun DrawScope.onDraw() {
|
||||
clipRect {
|
||||
// Use the original icon bounding box and the current icon dimension to compute
|
||||
// the scaling factor
|
||||
val fullOrigWidth = getOrigX() + getOrigWidth()
|
||||
val fullOrigHeight = getOrigY() + getOrigHeight()
|
||||
val coef1 = size.width / fullOrigWidth
|
||||
val coef2 = size.height / fullOrigHeight
|
||||
val coef = min(coef1, coef2).toFloat()
|
||||
|
||||
// Use the original icon bounding box and the current icon dimension to compute
|
||||
// the offset pivot for the scaling
|
||||
var translateX = -getOrigX()
|
||||
var translateY = -getOrigY()
|
||||
if (coef1 != coef2) {
|
||||
if (coef1 < coef2) {
|
||||
val extraDy = ((fullOrigWidth - fullOrigHeight) / 2.0f).toFloat()
|
||||
translateY += extraDy
|
||||
} else {
|
||||
val extraDx = ((fullOrigHeight - fullOrigWidth) / 2.0f).toFloat()
|
||||
translateX += extraDx
|
||||
}
|
||||
}
|
||||
val translateXDp = translateX.toFloat().toDp().value
|
||||
val translateYDp = translateY.toFloat().toDp().value
|
||||
|
||||
// Create a combined scale + translate + clip transform before calling the transcoded painting
|
||||
// instructions
|
||||
withTransform({
|
||||
scale(scaleX = coef, scaleY = coef, pivot = Offset.Zero)
|
||||
translate(translateXDp, translateYDp)
|
||||
clipRect(
|
||||
left = 0.0f,
|
||||
top = 0.0f,
|
||||
right = fullOrigWidth.toFloat(),
|
||||
bottom = fullOrigHeight.toFloat(),
|
||||
clipOp = ClipOp.Intersect
|
||||
)
|
||||
}) {
|
||||
innerPaint(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -35,14 +35,6 @@ pluginManagement {
|
|||
includeModule("gradle.plugin.org.gradle.android", "android-cache-fix-gradle-plugin")
|
||||
}
|
||||
}
|
||||
exclusiveContent {
|
||||
forRepository { maven("https://oss.sonatype.org/content/repositories/snapshots/") }
|
||||
filter {
|
||||
includeGroup("org.pushing-pixels")
|
||||
includeGroup("org.pushing-pixels.aurora.tools.svgtranscoder.gradle")
|
||||
/*includeGroup("app.cash.paparazzi")*/
|
||||
}
|
||||
}
|
||||
includeBuild("build-logic")
|
||||
mavenCentral()
|
||||
}
|
||||
|
@ -85,14 +77,6 @@ dependencyResolutionManagement {
|
|||
includeModule("gradle.plugin.org.gradle.android", "android-cache-fix-gradle-plugin")
|
||||
}
|
||||
}
|
||||
exclusiveContent {
|
||||
forRepository { maven("https://oss.sonatype.org/content/repositories/snapshots/") }
|
||||
filter {
|
||||
includeGroup("org.pushing-pixels")
|
||||
/*includeModule("app.cash.paparazzi", "paparazzi")*/
|
||||
/*includeModule("app.cash.paparazzi", "paparazzi-agent")*/
|
||||
}
|
||||
}
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user