Beispiel #1
0
void PointPort::changeScalingPointState(qreal x, qreal y)
{
	QRectF itemBoundingRect = boundingRect().adjusted(scalingDrift, scalingDrift, -scalingDrift, -scalingDrift);
	qreal x1= itemBoundingRect.left();
	qreal x2 = itemBoundingRect.right();
	qreal y1 = itemBoundingRect.top();
	qreal y2 = itemBoundingRect.bottom();
	int correction = step;
	calcForChangeScalingState(QPointF(x, y), QPointF(x1, y1), QPointF(x2, y2), correction);
}
Beispiel #2
0
void Item::changeScalingPointState(qreal x, qreal y)
{
	QRectF itemBoundingRect = calcNecessaryBoundingRect();
	qreal x1= itemBoundingRect.left();
	qreal x2 = itemBoundingRect.right();
	qreal y1 = itemBoundingRect.top();
	qreal y2 = itemBoundingRect.bottom();
	int correction = 0;
	calcForChangeScalingState(QPointF(x, y), QPointF(x1, y1), QPointF(x2, y2), correction);
}
Beispiel #3
0
void Line::changeScalingPointState(qreal x, qreal y)
{
	qreal x1= (boundingRect().adjusted(drift, drift, -drift, -drift)).left();
	qreal x2 = (boundingRect().adjusted(drift, drift, -drift, -drift)).right();
	qreal y1 = (boundingRect().adjusted(drift, drift, -drift, -drift)).top();
	qreal y2 = (boundingRect().adjusted(drift, drift, -drift, -drift)).bottom();
	int correction = step;
	calcForChangeScalingState(QPointF(x, y), QPointF(x1, y1), QPointF(x2, y2), correction);
	if (mScalingState == topRightX || mScalingState == topRightY || mScalingState == bottomLeftX || mScalingState == bottomLeftY)
		mDragState = None;
}