// Set up sizes
sizeTPBM.rx() = img.width(), sizeTPBM.ry() = img.height();
- sizeStamp.rx() = sizeTPBM.x() / 4, sizeStamp.ry() = sizeTPBM.y() / 2;
+ sizeStamp.rx() = sizeTPBM.x() / 5, sizeStamp.ry() = sizeTPBM.y() / 2;
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
setVisible(false);
{
//need ul corner of bitmap, ul corner of dest, width/height
p.setCompositionMode(QPainter::RasterOp_NotSource);
- QPoint pt(sizeStamp.x() * (prevTool & 0x03), sizeStamp.y() * (prevTool >> 2));
+// QPoint pt(sizeStamp.x() * (prevTool & 0x03), sizeStamp.y() * (prevTool >> 2));
+ QPoint pt(sizeStamp.x() * (prevTool % 5), sizeStamp.y() * (prevTool / 5));
p.drawImage(pt.x(), pt.y(), img, pt.x(), pt.y(), sizeStamp.x(), sizeStamp.y());
}
}
ToolType newTool = TOOLNone;
// NOTE: This works because x and y are UNSIGNED
- if (x < 4 && y < 2)
- newTool = (ToolType)((y * 4) + x);
+ if (x < 5 && y < 2)
+ newTool = (ToolType)((y * 5) + x);
+
+ // We don't have 10 yet, so fix this if the user selected the blank space
+ if (newTool == 9)
+ newTool = TOOLNone;
return newTool;
}