Menu

Center of rectangles/polygons?

2011-07-20
2012-12-12
  • Software Architektur

    Hi. I'm using your lib for a project and just wondered if you could add getters for the center point to Rectangle2D (or all Polygon2D classes)?

    It would be nice too if there was a constructor for creating rectangles from center point with width and height.

    Thanks in advance.

     
  • David

    David - 2011-07-21

    Hi,

    yes, having the centroid of a polygon would be good thing. I will add it, either as Polygon2D method, or as static method in Polygon2DUtils.

    creating rectangle from center and size should be possible too. I would like to manage also oriented rectangles. I think static factories in Polygon2D or Polygon2DUtils could do the job, I'll try to add them soon !

    Regards

    David

     

Log in to post a comment.