Jump to content

Jigsaw puzzle: draw an irregular shape and fill it with image


InsaLili
 Share

Recommended Posts

Hello everyone,

 

I am very new to phaser. I am trying to make a jigsaw puzzle with it.

 

Firstly I wanted to use "Graphics" to draw a irregular pieces of the puzzle. But it doesn't support "graphics.quadraticCurveTo( )".

 

So I turn to use "bitmapdata" to draw the pieces. 

 

The problem is,  I can't fill in the irregular shape with image. The image is filled in the whole bitmapdata space, overpasses the shape i drew. 

 

post-8791-0-82225200-1400764423.png

 

Is there any methods that can let me draw an irregular shape and fill it with image?

 

Thanks in advance for any help!  :) 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...