Skip to content

Instantly share code, notes, and snippets.

@IslamBesto
Last active March 16, 2024 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IslamBesto/1f84b4392581df7ea8ad3769899aa438 to your computer and use it in GitHub Desktop.
Save IslamBesto/1f84b4392581df7ea8ad3769899aa438 to your computer and use it in GitHub Desktop.
Penalty area
drawRect(
color = Color.White,
topLeft = Offset(size.width.div(2).minus(100f), 50f),
size = Size(200f, 100f),
style = Stroke(3.dp.toPx())
)
drawRect(
color = Color.White,
topLeft = Offset(size.width.div(2).minus(300f), 50f),
size = Size(600f, 300f),
style = Stroke(3.dp.toPx())
)
drawRect(
color = Color.White,
topLeft = Offset(
size.width.div(2) - 100f,
size.height - 150f
), // Adjusted to ensure positive size
size = Size(200f, 100f),
style = Stroke(3.dp.toPx())
)
drawRect(
color = Color.White,
topLeft = Offset(
size.width.div(2) - 300f,
size.height - 350f
), // Adjusted to ensure positive size
size = Size(600f, 300f),
style = Stroke(3.dp.toPx())
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment