@@ -249,8 +249,7 @@ bool NodeUIManagerDrawer::IsConnectionVisible (NodeUIDrawingEnvironment& drawing
249249
250250bool NodeUIManagerDrawer::IsNodeVisible (NodeUIDrawingEnvironment& drawingEnv, const NodeUIScaleIndependentData& scaleIndependentData, const NodeDrawingModifier* drawModifier, const UINodeConstPtr& uiNode) const
251251{
252- Rect boundingRect = GetNodeRect (drawingEnv, drawModifier, uiNode);
253- boundingRect = ExtendNodeRect (drawingEnv, boundingRect);
252+ Rect boundingRect = GetExtendedNodeRect (drawingEnv, drawModifier, uiNode);
254253
255254 double selectionThickness = scaleIndependentData.GetSelectionThickness ();
256255 boundingRect = boundingRect.Expand (Size (selectionThickness * 2.0 , selectionThickness * 2.0 ));
@@ -271,6 +270,12 @@ Rect NodeUIManagerDrawer::GetNodeRect (NodeUIDrawingEnvironment& drawingEnv, con
271270 return nodeRect.Offset (drawModifier->GetNodeOffset (uiNode->GetId ()));
272271}
273272
273+ Rect NodeUIManagerDrawer::GetExtendedNodeRect (NodeUIDrawingEnvironment& drawingEnv, const NodeDrawingModifier* drawModifier, const UINodeConstPtr& uiNode) const
274+ {
275+ Rect nodeRect = uiNode->GetExtendedRect (drawingEnv);
276+ return nodeRect.Offset (drawModifier->GetNodeOffset (uiNode->GetId ()));
277+ }
278+
274279Point NodeUIManagerDrawer::GetOutputSlotConnPosition (NodeUIDrawingEnvironment& drawingEnv, const NodeDrawingModifier* drawModifier, const UINodeConstPtr& uiNode, const NE::SlotId& slotId) const
275280{
276281 Point position = uiNode->GetOutputSlotConnPosition (drawingEnv, slotId);
@@ -283,23 +288,4 @@ Point NodeUIManagerDrawer::GetInputSlotConnPosition (NodeUIDrawingEnvironment& d
283288 return position + drawModifier->GetNodeOffset (uiNode->GetId ());
284289}
285290
286- Rect ExtendNodeRect (NodeUIDrawingEnvironment& drawingEnv, const Rect& originalRect)
287- {
288- const SkinParams& skinParams = drawingEnv.GetSkinParams ();
289- const Size& slotMarkerSize = skinParams.GetSlotMarkerSize ();
290- double extendSize = 0.0 ;
291- if (skinParams.GetHiddenSlotMarker () != SkinParams::HiddenSlotMarker::None) {
292- extendSize = slotMarkerSize.GetWidth () + slotMarkerSize.GetWidth () / 2.0 ;
293- } else if (skinParams.GetSlotMarker () != SkinParams::SlotMarker::None) {
294- extendSize = slotMarkerSize.GetWidth () / 2.0 ;
295- }
296- return originalRect.ExpandHorizontally (extendSize, extendSize);
297- }
298-
299- Rect GetNodeExtendedRect (NodeUIDrawingEnvironment& drawingEnv, const UINodeConstPtr& uiNode)
300- {
301- Rect nodeRect = uiNode->GetRect (drawingEnv);
302- return ExtendNodeRect (drawingEnv, nodeRect);
303- }
304-
305291}
0 commit comments