Krita Source Code Documentation
Loading...
Searching...
No Matches
KisTransformUtils::AnchorHolder Struct Reference

#include <kis_transform_utils.h>

Public Member Functions

 AnchorHolder (bool enabled, ToolTransformArgs *config)
 
 ~AnchorHolder ()
 

Private Attributes

ToolTransformArgsm_config
 
bool m_enabled
 
QPointF m_oldStaticPointInView
 
QPointF m_staticPoint
 

Detailed Description

A special class that ensures that the view position of the anchor point of the transformation is unchanged during the lifetime of the object. On destruction of the keeper the position of the anchor point will be restored.

Definition at line 150 of file kis_transform_utils.h.

Constructor & Destructor Documentation

◆ AnchorHolder()

◆ ~AnchorHolder()

KisTransformUtils::AnchorHolder::~AnchorHolder ( )

Definition at line 465 of file kis_transform_utils.cpp.

465 {
466 if (!m_enabled) return;
467
469 const QPointF newStaticPointInView = m.finalTransform().map(m_staticPoint);
470
471 const QPointF diff = m_oldStaticPointInView - newStaticPointInView;
472
474}
QPointF transformedCenter() const
void setTransformedCenter(QPointF transformedCenter)

References KisTransformUtils::MatricesPack::finalTransform().

Member Data Documentation

◆ m_config

ToolTransformArgs* KisTransformUtils::AnchorHolder::m_config
private

Definition at line 156 of file kis_transform_utils.h.

◆ m_enabled

bool KisTransformUtils::AnchorHolder::m_enabled
private

Definition at line 155 of file kis_transform_utils.h.

◆ m_oldStaticPointInView

QPointF KisTransformUtils::AnchorHolder::m_oldStaticPointInView
private

Definition at line 158 of file kis_transform_utils.h.

◆ m_staticPoint

QPointF KisTransformUtils::AnchorHolder::m_staticPoint
private

Definition at line 157 of file kis_transform_utils.h.


The documentation for this struct was generated from the following files: