Hi,

I'm doing a map creator for a isometric game and I use a zoom (qreal) for scale the QPainter surface for zoom, also I use a QRegion (polygon not rectangle) and need to multiply the area for know the square that is below the cursor. How can I do it?

Thank's bye.

Sample code
Qt Code:
  1. Square *square=map.getSquare(i,j);
  2. QRegion region(square->region());
  3. if(square->region().contains(cursorPos)){
  4. //if(region.contains(cursorPos)){
  5. painter.setPen(Qt::red);
  6. selectedSquarePosX=i; selectedSquarePosY=j;
  7. }
To copy to clipboard, switch view to plain text mode