Examples of QPolygonF


Examples of com.trolltech.qt.gui.QPolygonF

      }
     
      addHMTile(tile, tileX, tileY, tilesWithSLICEM.contains(tile), tile.equals(anchorTile));
    }

    QPolygonF hmPolygon = createOutline(hmTileMap);
    this.setPolygon(hmPolygon);
    this.moveBy(minCol * scene.tileSize, minRow * scene.tileSize);
    this.hideGuts();
    this.setAnchorOffset();
    this.setToolTip(moduleInstance.getName()+"\n"+moduleInstance.getModule().getName());
 
View Full Code Here

Examples of com.trolltech.qt.gui.QPolygonF

      }
    }while(changed);   
   
   
    int tileSize = scene.tileSize;
    QPolygonF hmPolygon = new QPolygonF();
    // Go down right side, adding profile points
    for (int i = 0; i < height; i++) {
      for (int j = 0; j < width; j++) {
        if (hmTileMap[i][j]
            && (j + 1 > width - 1 || !hmTileMap[i][j + 1])) {
          QPointF pTR = new QPointF((j + 1) * tileSize - 1, i
              * tileSize - 1);
          hmPolygon.add(this.pos().add(pTR));
          QPointF pBR = new QPointF((j + 1) * tileSize - 1, (i + 1)
              * tileSize - 1);
          hmPolygon.add(this.pos().add(pBR));
          break;
        }
      }
    }
    // Go up left side, adding profile points
    for (int i = height - 1; i >= 0; i--) {
      for (int j = width - 1; j >= 0; j--) {
        if (hmTileMap[i][j] && (j - 1 < 0 || !hmTileMap[i][j - 1])) {
          QPointF pBL = new QPointF((j) * tileSize - 1, (i + 1)
              * tileSize - 1);
          hmPolygon.add(this.pos().add(pBL));
          QPointF pTL = new QPointF((j) * tileSize - 1, (i)
              * tileSize - 1);
          hmPolygon.add(this.pos().add(pTL));
          break;
        }
      }
    }
    return hmPolygon;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.