Jump to content

How to create rounded corner rectangle?

Recommended Posts

I'm pretty new in js games & phaser.io so my question may be little bit silly, but ..  

Whats the best way to create rounded rectangle?

There is no way to create curves or arcs with Graphics class. Or there is a way?
Only way I can think is to load high res. tilesprite with all rectangles and then downscale depending on screen resolution.


Link to post
Share on other sites
  • 2 years later...
  • 7 months later...
On 25. 7. 2016 at 11:11 PM, Adibas03 said:

I know this is old now.

I just wanted to give update.

Function now exists for graphics in Phaserjs as from version 2.5.0



it's actually a method that is inherited from Pixi.Graphics.  It has been changed to graphics.drawRoundedRect(x, y, width, height, radius)

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...