File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
common/src/main/kotlin/com/lambda/graphics/renderer/gui/rect/filled Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -31,15 +31,16 @@ class FilledRectEntry(
3131 val pos2 = position.rightBottom
3232
3333 val size = pos2 - pos1
34+ if (leftTop.alpha < MIN_ALPHA && rightTop.alpha < MIN_ALPHA && rightBottom.alpha < MIN_ALPHA && leftBottom.alpha < MIN_ALPHA ) return @use
3435 if (size.x < MIN_SIZE || size.y < MIN_SIZE ) return @use
3536
3637 val halfSize = size * 0.5
3738 val maxRadius = min(halfSize.x, halfSize.y)
3839
3940 val round = min(roundRadius, maxRadius)
4041
41- val p1 = pos1 - 0.75
42- val p2 = pos2 + 0.75
42+ val p1 = pos1 - 0.25
43+ val p2 = pos2 + 0.25
4344 val s = shade.toInt().toDouble()
4445
4546 grow(4 )
@@ -54,5 +55,6 @@ class FilledRectEntry(
5455
5556 companion object {
5657 private const val MIN_SIZE = 0.5
58+ private const val MIN_ALPHA = 3
5759 }
5860}
You can’t perform that action at this time.
0 commit comments