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

Represents a multi-pixel stroke operation for undo/redo. More...

#include <Core.h>

Inheritance diagram for FuncDoodle::StrokeAction:
FuncDoodle::Action

Classes

struct  PixelChange
 Represents a single pixel modification in a stroke. More...

Public Member Functions

 StrokeAction (unsigned long frameI, const SharedPtr< ProjectFile > &proj, std::vector< PixelChange > changes)
 Creates a stroke action from a list of pixel changes.
void Undo () override
 Reverts all pixel changes in the stroke.
void Redo () override
 Reapplies all pixel changes in the stroke.
Public Member Functions inherited from FuncDoodle::Action
virtual ~Action ()=default
 Virtual destructor for safe polymorphic destruction.

Private Attributes

unsigned long m_FrameIndex
WeakPtr< ProjectFilem_Proj
std::vector< PixelChangem_Changes

Detailed Description

Represents a multi-pixel stroke operation for undo/redo.

Stores a list of pixel changes applied during a brush stroke.

Constructor & Destructor Documentation

◆ StrokeAction()

FuncDoodle::StrokeAction::StrokeAction ( unsigned long frameI,
const SharedPtr< ProjectFile > & proj,
std::vector< PixelChange > changes )
inline

Creates a stroke action from a list of pixel changes.

Member Function Documentation

◆ Redo()

void FuncDoodle::StrokeAction::Redo ( )
overridevirtual

Reapplies all pixel changes in the stroke.

Implements FuncDoodle::Action.

◆ Undo()

void FuncDoodle::StrokeAction::Undo ( )
overridevirtual

Reverts all pixel changes in the stroke.

Implements FuncDoodle::Action.

Member Data Documentation

◆ m_Changes

std::vector<PixelChange> FuncDoodle::StrokeAction::m_Changes
private

◆ m_FrameIndex

unsigned long FuncDoodle::StrokeAction::m_FrameIndex
private

◆ m_Proj

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

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