ui: Increased graph edge drawing performance

* only draw lines within the redrawn rectangle
* cache polygon points
This commit is contained in:
Eberhard Graether
2016-04-01 15:26:44 +02:00
parent 2be3b541a6
commit 31f366ab8f
5 changed files with 198 additions and 75 deletions
@@ -15,17 +15,22 @@
#include "qt/view/graphElements/QtGraphNode.h"
QtGraphEdge::QtGraphEdge(
const std::weak_ptr<QtGraphNode>& owner, const std::weak_ptr<QtGraphNode>& target, const Edge* data, size_t weight
const std::weak_ptr<QtGraphNode>& owner,
const std::weak_ptr<QtGraphNode>& target,
const Edge* data,
size_t weight,
bool isActive,
TokenComponentAggregation::Direction direction
)
: m_data(data)
, m_owner(owner)
, m_target(target)
, m_child(nullptr)
, m_isActive(false)
, m_isActive(isActive)
, m_fromActive(false)
, m_toActive(false)
, m_weight(weight)
, m_direction(TokenComponentAggregation::DIRECTION_NONE)
, m_direction(direction)
, m_mousePos(0.0f, 0.0f)
, m_mouseMoved(false)
{