include brush setting in gizmo handle draw function

This commit is contained in:
itsmattkc
2022-01-24 14:51:12 -08:00
parent 7436c1e213
commit 1e7d5a1751
4 changed files with 3 additions and 7 deletions
@@ -108,8 +108,6 @@ void CropDistortNode::DrawGizmos(const NodeValueRow &row, const NodeGlobals &glo
gizmo_resize_handle_[kGizmoScaleCenterLeft] = CreateGizmoHandleRect(QPointF(left_pt, center_y_pt), handle_radius);
gizmo_resize_handle_[kGizmoScaleCenterRight] = CreateGizmoHandleRect(QPointF(right_pt, center_y_pt), handle_radius);
p->setPen(Qt::NoPen);
p->setBrush(Qt::white);
DrawAndExpandGizmoHandles(p, handle_radius, gizmo_resize_handle_, kGizmoScaleCount);
}
@@ -473,9 +473,6 @@ void TransformDistortNode::DrawGizmos(const NodeValueRow &row, const NodeGlobals
anchor_pt.x(), anchor_pt.y() + anchor_pt_radius)});
// Draw scale handles
p->setPen(Qt::NoPen);
p->setBrush(Qt::white);
gizmo_resize_handle_[kGizmoScaleTopLeft] = CreateGizmoHandleRect(CreateScalePoint(-1, -1, sequence_half_res_pt, rectangle_matrix), resize_handle_rad);
gizmo_resize_handle_[kGizmoScaleTopCenter] = CreateGizmoHandleRect(CreateScalePoint( 0, -1, sequence_half_res_pt, rectangle_matrix), resize_handle_rad);
gizmo_resize_handle_[kGizmoScaleTopRight] = CreateGizmoHandleRect(CreateScalePoint( 1, -1, sequence_half_res_pt, rectangle_matrix), resize_handle_rad);
@@ -85,8 +85,6 @@ void ShapeNodeBase::DrawGizmos(const NodeValueRow &row, const NodeGlobals &globa
gizmo_resize_handle_[kGizmoScaleCenterLeft] = CreateGizmoHandleRect(QPointF(left_pt, center_y_pt), handle_radius);
gizmo_resize_handle_[kGizmoScaleCenterRight] = CreateGizmoHandleRect(QPointF(right_pt, center_y_pt), handle_radius);
p->setPen(Qt::NoPen);
p->setBrush(Qt::white);
DrawAndExpandGizmoHandles(p, handle_radius, gizmo_resize_handle_, kGizmoScaleCount);
}
+3
View File
@@ -1779,6 +1779,9 @@ double Node::GetGizmoHandleRadius(const QTransform &transform)
void Node::DrawAndExpandGizmoHandles(QPainter *p, int handle_radius, QRectF *rects, int count)
{
p->setPen(Qt::NoPen);
p->setBrush(Qt::white);
for (int i=0; i<count; i++) {
QRectF& r = rects[i];