@@ -288,7 +288,6 @@ private class CashBillGeometry(width: Dp, height: Dp) : Geometry(width, height)
288288 fontSize = 40 .nonScaledSp
289289 )
290290 }
291-
292291}
293292
294293@SuppressLint(" UnusedBoxWithConstraintsScope" )
@@ -364,32 +363,7 @@ internal fun CashBill(
364363 topLeft = Offset (
365364 x = geometry.gridPosition.x,
366365 y = geometry.gridPosition.y,
367- ),
368- alpha = 0.5f ,
369- )
370-
371-
372- // Waves
373- Image (
374- modifier = Modifier
375- .requiredWidth(geometry.globeWidth)
376- .fillMaxHeight()
377- .offset { IntOffset (x = geometry.wavesPosition.x.toInt(), y = 0 ) }
378- .drawWithGradient(
379- brush = { startY, endY ->
380- CashBillDefaults .billColor(
381- token,
382- alpha = CashBillDefaults .CodeBackgroundOpacity ,
383- startY = startY,
384- endY = endY
385- )
386- },
387- startY = { it / 2f },
388- blendMode = BlendMode .DstIn
389- ),
390- contentDescription = null ,
391- contentScale = ContentScale .FillBounds ,
392- painter = painterResource(R .drawable.ic_bill_waves),
366+ )
393367 )
394368 }
395369
@@ -403,11 +377,24 @@ internal fun CashBill(
403377 x = geometry.globePosition.x.toInt(),
404378 y = geometry.globePosition.y.toInt()
405379 )
406- }.zIndex( 99f ) ,
380+ },
407381 painter = painterResource(R .drawable.ic_bill_globe),
408382 contentDescription = null
409383 )
410384
385+ if (! hasCustomTexture) {
386+ // Waves
387+ Image (
388+ modifier = Modifier
389+ .requiredWidth(geometry.globeWidth)
390+ .fillMaxHeight()
391+ .offset { IntOffset (x = geometry.wavesPosition.x.toInt(), y = 0 ) },
392+ contentDescription = null ,
393+ contentScale = ContentScale .FillBounds ,
394+ painter = painterResource(R .drawable.ic_bill_waves),
395+ )
396+ }
397+
411398 // Security strip
412399 SecurityStrip (geometry = geometry, token = token)
413400
@@ -523,7 +510,7 @@ private fun SecurityStrip(
523510 .offset(geometry.securityStripPosition.x, geometry.securityStripPosition.y)
524511 .punchRectangle(CashBillDefaults .punchBrushIn(punch = Punch .SecurityStrip , token)),
525512 ) {
526- for (i in 0 until CashBillDefaults .SecurityStripCount ) {
513+ repeat( CashBillDefaults .SecurityStripCount ) {
527514 Image (
528515 modifier = Modifier
529516 .weight(1f )
@@ -543,7 +530,7 @@ private fun Lines(
543530 spacing : Dp ,
544531) {
545532 Row (modifier = modifier, horizontalArrangement = Arrangement .spacedBy(spacing)) {
546- for (i in 0 until count) {
533+ repeat( count) {
547534 Box (
548535 modifier = Modifier
549536 .rotate(- 18f )
@@ -567,7 +554,6 @@ private fun BillDecorImage(
567554 Canvas (
568555 modifier = modifier,
569556 ) {
570- // Hexagons
571557 image?.let {
572558 drawImage(
573559 image = it,
@@ -594,7 +580,7 @@ private fun BillCode(
594580 modifier = modifier
595581 .punchCircle(
596582 brush = CashBillDefaults .punchBrushIn(punch = Punch .Code , token),
597- blendMode = BlendMode .SrcOver ,
583+ // blendMode = BlendMode.SrcOver,
598584 ),
599585 contentAlignment = Alignment .Center
600586 ) {
0 commit comments