platf-android/src/androidMain/kotlin/org/jetbrains/letsPlot/android/canvas/CanvasView.kt [143:158]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - val desiredWidth = (figureWidthInDp * density).toInt() val desiredHeight = (figureHeightInDp * density).toInt() val finalWidth = when (MeasureSpec.getMode(widthMeasureSpec)) { MeasureSpec.EXACTLY -> MeasureSpec.getSize(widthMeasureSpec) MeasureSpec.AT_MOST -> minOf(desiredWidth, MeasureSpec.getSize(widthMeasureSpec)) else -> desiredWidth } val finalHeight = when (MeasureSpec.getMode(heightMeasureSpec)) { MeasureSpec.EXACTLY -> MeasureSpec.getSize(heightMeasureSpec) MeasureSpec.AT_MOST -> minOf(desiredHeight, MeasureSpec.getSize(heightMeasureSpec)) else -> desiredHeight } setMeasuredDimension(finalWidth, finalHeight) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - platf-android/src/androidMain/kotlin/org/jetbrains/letsPlot/android/canvas/CanvasView2.kt [94:109]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - val desiredWidth = (figureWidthInDp * density).toInt() val desiredHeight = (figureHeightInDp * density).toInt() val finalWidth = when (MeasureSpec.getMode(widthMeasureSpec)) { MeasureSpec.EXACTLY -> MeasureSpec.getSize(widthMeasureSpec) MeasureSpec.AT_MOST -> minOf(desiredWidth, MeasureSpec.getSize(widthMeasureSpec)) else -> desiredWidth } val finalHeight = when (MeasureSpec.getMode(heightMeasureSpec)) { MeasureSpec.EXACTLY -> MeasureSpec.getSize(heightMeasureSpec) MeasureSpec.AT_MOST -> minOf(desiredHeight, MeasureSpec.getSize(heightMeasureSpec)) else -> desiredHeight } setMeasuredDimension(finalWidth, finalHeight) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -