title: why DrawScope dimensions don't match up with Canvas?
body: <p>I want to draw on <code>Canvas</code> based on its layout dimension, but the dimensions received from <code>DrawScope</code> don't match with the <code>Canvas</code></p>
  <pre class="lang-kotlin prettyprint-override"><code>@Preview
  @Composable
  fun Circle() {
  
      val modifier = Modifier
          .fillMaxSize()
          .border(1.dp, color = Color.Magenta)
          .layout { measurable, constraints -&gt;
              val placeable = measurable.measure(constraints)
              val minDimension = min(placeable.width, placeable.height)
              Log.d(&quot;Canvas layout&quot;, &quot;$minDimension&quot;)
              layout(minDimension, minDimension) {
                  placeable.placeRelative(0, 0)
              }
          }
  
      Canvas(modifier) {
          Log.d(&quot;Canvas drawCircle&quot;, &quot;${size.width}, ${size.height}&quot;)
          drawCircle(
              color = Color.White,
              center = Offset(size.minDimension/2, size.minDimension/2),
              radius = size.minDimension/2
          )
      }
  }
  </code></pre>
  <p>Logcat:</p>
  <pre><code>D/Canvas layout: 1080
  D/Canvas drawCircle: 1080.0, 1987.0
  </code></pre>
  <p>values are the same either calling <code>fillMaxSize()</code> at the beginning or at the end of the modifier builder, but it is 0 when not calling <code>fillMaxSize()</code> .</p>
  <p>From the <a href="https://ibb.co/m5mgRpS" rel="nofollow noreferrer">screenshot</a> you can see from the border that the width and height of <code>Canvas</code>  match but why they don't in the <code>DrawScope</code>, and how can I get it to match</p>