Skip to content

Instantly share code, notes, and snippets.

@victorbrndls
Created October 14, 2022 11:31
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 victorbrndls/f7f2c1f22463e34810f6a5b1578a8355 to your computer and use it in GitHub Desktop.
Save victorbrndls/f7f2c1f22463e34810f6a5b1578a8355 to your computer and use it in GitHub Desktop.
class SemiOvalShape : Shape by GenericShape(builder = { size, _ ->
lineTo(size.width, 0f)
relativeLineTo(0f, size.height * 0.8f)
cubicTo(
x1 = size.width * .7f,
y1 = size.height,
x2 = size.width * .3f,
y2 = size.height,
x3 = 0f,
y3 = size.height * 0.8f
)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment