Jetpack Compose Reference
ui-geometry
Functions
  • CornerRadius
  • MutableRect
  • Offset
  • Rect
  • RoundRect
  • Size
  • lerp
  • takeOrElse
  • times
  • toRect
  • translate
Classes
  • CornerRadius
  • MutableRect
  • Offset
  • Rect
  • RoundRect
  • Size
Properties
  • boundingRect
  • center
  • isCircle
  • isEllipse
  • isEmpty
  • isFinite
  • isRect
  • isSimple
  • isSpecified
  • isUnspecified
  • maxDimension
  • minDimension
  • safeInnerRect
Jetpack Compose / Compose UI / ui-geometry / Functions / toRect
Function

toRect

View Markdown Open in ChatGPT Open in Claude
CodeRabbit

CodeRabbit

AI writes the code. CodeRabbit catches the slop.

Ad Try CodeRabbit for Free

toRect

Source set: Common
public fun MutableRect.toRect(): Rect

toRect

Source set: Common
@Stable public fun Size.toRect(): Rect

Convert a Size to a Rect.

Content updated: 2026-09-24

times ← Previous translate Next →

On this page

  • toRect
  • toRect
Reach Android developers Put your product in front of engineers building Android and KMP apps. Sponsor Composables
Composables

Keep up to date

Subscribe for Composables product updates: new components, icons, Compose tools, and library releases.

Free Tools

  • SVG to Compose
  • Android Distribution Chart

Resources

  • Compose Unstyled
  • Compose Gradients
  • Compose Examples
  • Components
  • Icons
  • Reference

Explore

  • Documentation
  • Blog

Company

  • About
  • Partners
  • Contact us

Copyright © 2026 Composables.