Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
lpe-perspective-envelope.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2#ifndef INKSCAPE_LPE_PERSPECTIVE_ENVELOPE_H
3#define INKSCAPE_LPE_PERSPECTIVE_ENVELOPE_H
4
9/*
10 * Authors:
11 * Jabiertxof Code migration from python extensions envelope and perspective
12 * Aaron Spike, aaron@ekips.org from envelope and perspective python code
13 * Dmitry Platonov, shadowjack@mail.ru, 2006 perspective approach & math
14 * Jose Hevia (freon) Transform algorithm from envelope
15 *
16 * Copyright (C) 2007-2014 Authors
17 *
18 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
19 */
20
22#include "live_effects/effect.h"
25
26namespace Inkscape {
27namespace LivePathEffect {
28
30public:
31
33
35
36 void doEffect(Geom::PathVector &curve) override;
37
39
40 void transform_multiply(Geom::Affine const &postmul, bool set) override;
41
42 virtual Geom::Point projectPoint(Geom::Point p, double m[][3]);
43
45
46 void resetDefaults(SPItem const* item) override;
47
48 virtual void vertical(PointParam &paramA,PointParam &paramB, Geom::Line vert);
49
50 virtual void horizontal(PointParam &paramA,PointParam &paramB,Geom::Line horiz);
51
52 void doBeforeEffect(SPLPEItem const* lpeitem) override;
53
54 Gtk::Widget * newWidget() override;
55
56 virtual void setDefaults();
57
58 virtual void resetGrid();
59
60protected:
61 void addCanvasIndicators(SPLPEItem const */*lpeitem*/, std::vector<Geom::PathVector> &hp_vec) override;
62private:
63
72 std::vector<Geom::Point> handles;
75};
76
77} //namespace LivePathEffect
78} //namespace Inkscape
79
80#endif
3x3 matrix representing an affine transformation.
Definition affine.h:70
Infinite line on a plane.
Definition line.h:53
Sequence of subpaths.
Definition pathvector.h:122
Two-dimensional point that doubles as a vector.
Definition point.h:66
void addCanvasIndicators(SPLPEItem const *, std::vector< Geom::PathVector > &hp_vec) override
Add possible canvas indicators (i.e., helperpaths other than the original path) to hp_vec This functi...
void resetDefaults(SPItem const *item) override
Sets all parameters to their default values and writes them to SVG.
virtual Geom::Point pointAtRatio(Geom::Coord ratio, Geom::Point A, Geom::Point B)
Gtk::Widget * newWidget() override
This creates a managed widget.
LPEPerspectiveEnvelope & operator=(const LPEPerspectiveEnvelope &)=delete
void doBeforeEffect(SPLPEItem const *lpeitem) override
Is performed each time before the effect is updated.
virtual void vertical(PointParam &paramA, PointParam &paramB, Geom::Line vert)
void transform_multiply(Geom::Affine const &postmul, bool set) override
Overridden function to apply transforms for example to powerstroke, jointtype or tapperstroke.
LPEPerspectiveEnvelope(const LPEPerspectiveEnvelope &)=delete
virtual void horizontal(PointParam &paramA, PointParam &paramB, Geom::Line horiz)
Base class for visual SVG elements.
Definition sp-item.h:109
double Coord
Floating point type used to store coordinates.
Definition coord.h:76
SPItem * item
Helper class to stream background task notifications as a series of messages.
Definition curve.h:24