FuncDoodle
Loading...
Searching...
No Matches
FuncDoodle::RotateSelectionAction Class Reference

Rotates a selection by a fixed angle in degrees. More...

#include <Selection.h>

Inheritance diagram for FuncDoodle::RotateSelectionAction:
FuncDoodle::Action

Public Member Functions

 RotateSelectionAction (unsigned long frameIndex, WeakPtr< Selection > sel, int32_t deg, const SharedPtr< ProjectFile > &proj)
 Constructs a rotation action.
void Undo () override
 Undoes the rotation.
void Redo () override
 Reapplies the rotation.
int32_t Deg () const
 Returns rotation amount in degrees.
WeakPtr< SelectionSel () const
 Returns the affected selection.
Public Member Functions inherited from FuncDoodle::Action
virtual ~Action ()=default
 Virtual destructor for safe polymorphic destruction.

Private Attributes

unsigned long m_FrameIndex
 Frame index where action occurred.
WeakPtr< Selectionm_Sel
 Target selection.
int32_t m_Deg
 Rotation in degrees.
WeakPtr< ProjectFilem_Proj
 Owning project.

Detailed Description

Rotates a selection by a fixed angle in degrees.

Constructor & Destructor Documentation

◆ RotateSelectionAction()

FuncDoodle::RotateSelectionAction::RotateSelectionAction ( unsigned long frameIndex,
WeakPtr< Selection > sel,
int32_t deg,
const SharedPtr< ProjectFile > & proj )
inline

Constructs a rotation action.

Parameters
frameIndexFrame in which the rotation occurs.
selSelection to rotate.
degRotation amount in degrees.
projOwning project reference.

Member Function Documentation

◆ Deg()

int32_t FuncDoodle::RotateSelectionAction::Deg ( ) const
inlinenodiscard

Returns rotation amount in degrees.

◆ Redo()

void FuncDoodle::RotateSelectionAction::Redo ( )
overridevirtual

Reapplies the rotation.

Implements FuncDoodle::Action.

◆ Sel()

WeakPtr< Selection > FuncDoodle::RotateSelectionAction::Sel ( ) const
inlinenodiscard

Returns the affected selection.

◆ Undo()

void FuncDoodle::RotateSelectionAction::Undo ( )
overridevirtual

Undoes the rotation.

Implements FuncDoodle::Action.

Member Data Documentation

◆ m_Deg

int32_t FuncDoodle::RotateSelectionAction::m_Deg
private

Rotation in degrees.

◆ m_FrameIndex

unsigned long FuncDoodle::RotateSelectionAction::m_FrameIndex
private

Frame index where action occurred.

◆ m_Proj

WeakPtr<ProjectFile> FuncDoodle::RotateSelectionAction::m_Proj
private

Owning project.

◆ m_Sel

WeakPtr<Selection> FuncDoodle::RotateSelectionAction::m_Sel
private

Target selection.


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