Пример #1
0
void MainWindow::mousePressEvent(QMouseEvent* e)
{
    QPoint pixel;
    pixel = e->pos() - colorImgPos;
    if(INSIDEIMG(pixel.y(), pixel.x()))
        CheckPixel(pixel);
    pixel = e->pos() - depthImgPos;
    if(INSIDEIMG(pixel.y(), pixel.x()))
        CheckPixel(pixel);
}
Пример #2
0
bool Control::MouseIsOver (int x, int y)
{
  if ((x >= this->x) && (y >= this->y) && (x < this->x + this->width)
      && (y < this->y + this->height))
      {

        return CheckPixel (x - this->x, y - this->y);
      }
  return false;
}