lokeen Posted August 3, 2018 Share Posted August 3, 2018 let grahpic = this.add.grahpics() .fillRoundedRect(0, 0, 300, 200, 10) .generateTexture('box', 300, 200) this.add.image(100, 100, 'box') I was trying to create modals using a new scene and phaser graphics to create a menu when I encountered a issue where generating the texture would cause the texture 'box' to get cut off at the bottom left corner. Increasing the width and height params in the generateTexture didn't help either. Was wondering if anyone encountered similar problems. Link to comment Share on other sites More sharing options...
Keisha Posted August 27, 2018 Share Posted August 27, 2018 I am also facing the same issue.. Link to comment Share on other sites More sharing options...
YuPi Posted August 28, 2018 Share Posted August 28, 2018 Where are you testing? Which browser, which Phaser version? I've tried it with the dev version and it looks fine. Now you are drawing the rectangle with center on the position 100, 100. If you want to draw the top left corner at that position then change to this.add.image(100, 100, 'box').setOrigin(0) Link to comment Share on other sites More sharing options...
Keisha Posted August 28, 2018 Share Posted August 28, 2018 With Firefox and Chrome. Phaser version 3.11.0 Actually problem is not with the rectangle. It occurs when i trying to generateTexture() from graphic.fillRoundRect(). Link to comment Share on other sites More sharing options...
YuPi Posted August 28, 2018 Share Posted August 28, 2018 This should be already fixed in the current dev version. Link to comment Share on other sites More sharing options...
Keisha Posted August 29, 2018 Share Posted August 29, 2018 @YuPi Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts