Jump to content

Drawing with the Polygon class


Recommended Posts

I'm writing a program that will have a large number of simple polygons which users can click on to select. I thought Pixi would be a great place to start because it includes a Polygon class and a function to see if points (mouseclicks) are inside the Polygon. Unfortunately, I haven't figured out a convenient way to draw Polygons to the stage -- it looks like the stage is expecting an object which inherits from the DisplayObject class, and the Polygon class does not. Is there an easy way to do this that I have overlooked?


If there isn't already an easy way then I am thinking about extending Pixi to do what I want. Maybe if I'm happy with the results I could even have my first open source contribution. :) If anyone is already working on this would you please let me know so that we don't duplicate effort?



Link to comment
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...