Quantcast
Channel: Pixi.js Latest Topics
Viewing all articles
Browse latest Browse all 3981

How to draw rectangle with 1 round corner?

$
0
0

Good morning!

How to draw rectangle with 1 rounded corner and fill it with color please?

I am trying to use the method arcTo with the following code:

                this.bgGraphics.beginFill(0xFFCC00, 1);
                this.bgGraphics.moveTo(0, 0);
                this.bgGraphics.lineTo(45, 0);
                this.bgGraphics.arcTo(45, 0, 60, 15, 15);
                this.bgGraphics.lineTo(60, 60);
                this.bgGraphics.lineTo(0, 60);
                this.bgGraphics.endFill();

But instead of the rounded corner on the right top it cuts it off:

Screen Shot 2016-08-17 at 09.24.25.png

Regards
Alex


Viewing all articles
Browse latest Browse all 3981

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>