Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++
889 B
Raw Blame
/*
 * SPDX-FileCopyrightText: 2025 Wolthera van Hövell tot Westerflier <[email protected]>
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 */
#ifndef SVGTEXTPATHINFOCHANGECOMMAND_H
#define SVGTEXTPATHINFOCHANGECOMMAND_H

#include <kundo2command.h>
#include "kritaflake_export.h"

#include <KoSvgTextShape.h>
#include <KoSvgText.h>

class KRITAFLAKE_EXPORT KoSvgTextPathInfoChangeCommand : public KUndo2Command
{
public:
    KoSvgTextPathInfoChangeCommand(KoSvgTextShape *shape, int pos, KoSvgText::TextOnPathInfo textPathInfo, KUndo2Command *parent = nullptr);

    void redo() override;
    void undo() override;

    int id() const override;
    bool mergeWith(const KUndo2Command *other) override;

private:
    KoSvgTextShape *m_shape;
    KoSvgTextShapeMementoSP m_textData;
    int m_pos;
    KoSvgText::TextOnPathInfo m_newInfo;
};

#endif // SVGTEXTPATHINFOCHANGECOMMAND_H