Commit fa95723b authored by Igor Demin's avatar Igor Demin

Fix SkiaPanel clipping

parent 0a24e808
...@@ -132,12 +132,13 @@ open class SkiaLayer : HardwareLayer() { ...@@ -132,12 +132,13 @@ open class SkiaLayer : HardwareLayer() {
} }
private fun Canvas.clipRectBy(rectangle: ClipRectangle) { private fun Canvas.clipRectBy(rectangle: ClipRectangle) {
val dpi = contentScale
clipRect( clipRect(
Rect.makeLTRB( Rect.makeLTRB(
rectangle.x, rectangle.x * dpi,
rectangle.y, rectangle.y * dpi,
rectangle.x + rectangle.width, (rectangle.x + rectangle.width) * dpi,
rectangle.y + rectangle.height (rectangle.y + rectangle.height) * dpi
), ),
ClipMode.DIFFERENCE, ClipMode.DIFFERENCE,
true true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment