Ejemplo n.º 1
0
PoseMeshScene::PoseMeshScene(QObject *parent)
: QGraphicsScene(parent)
{    
   double graphicsWidth  = 512;
   double graphicsHeight = 1024;   

   // This rectangle will be a visual representation 
   // of the bounds that the map can be dragged in  
   mCanvasRect.setLeft(0);
   mCanvasRect.setTop(0);
   mCanvasRect.setWidth(graphicsWidth);
   mCanvasRect.setHeight(graphicsHeight);   

   mVerticalMeshOffset = mCanvasRect.y() + 64;

   QBrush canvasBrush(QColor(192, 192, 255));

   QGraphicsRectItem *canvasItem = addRect(mCanvasRect, QPen(), canvasBrush);  
   canvasItem->setZValue(-100.0f);
   canvasItem->setEnabled(false);

   QBrush backgroundBrush(QPixmap(":/images/checker.png"));  
   setBackgroundBrush(backgroundBrush);

   CreateTest();
}