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 / Properties / center
Property

center

View Markdown Open in ChatGPT Open in Claude

Returns the Offset of the center of the rect from the point of [0, 0] with this Size.

CodeRabbit

CodeRabbit

AI writes the code. CodeRabbit catches the slop.

Ad Try CodeRabbit for Free
Source set: Common
public val Size.center: Offset

Returns the Offset of the center of the rect from the point of 0, 0 with this Size.

Source set: Common
public val RoundRect.center: Offset

The offset to the point halfway between the left and right and the top and bottom edges of this rectangle.

Content updated: 2026-09-24

boundingRect ← Previous isCircle Next →

On this page

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.