예제 #1
0
void GLWidget::mouseMoveEvent(QMouseEvent *event)
{

    if (isPointSelected && (event->buttons() & Qt::LeftButton)) {
        float x = (float)event->x();
        int y = (float)event->y();
        moveControlPoint(selectedPointIndex, x, y, 0.0f);
        isPointMoving = true;
    }
}
예제 #2
0
파일: Spline.cpp 프로젝트: katja/FunnyGears
void Spline::moveControlPoint(uint index, QPointF newPosition) {
    moveControlPoint(index, vec2(newPosition.x(), newPosition.y()));
}