X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdesigner%2Fslopetool.h;fp=source%2Fdesigner%2Fslopetool.h;h=b3b5e2b461e22d38e9a0689bd54c749d9e03e9b6;hb=678982e7ddb22bb5fd44ce448d1c5cbf646b2573;hp=0000000000000000000000000000000000000000;hpb=a5e1363ceac1ab552849640c9021fcda362c4416;p=r2c2.git diff --git a/source/designer/slopetool.h b/source/designer/slopetool.h new file mode 100644 index 0000000..b3b5e2b --- /dev/null +++ b/source/designer/slopetool.h @@ -0,0 +1,31 @@ +#ifndef SLOPETOOL_H_ +#define SLOPETOOL_H_ + +#include "tool.h" +#include "libr2c2/track.h" + +class SlopeTool: public Tool +{ +private: + struct TrackOrder + { + R2C2::Track *track; + bool rev; + + TrackOrder(R2C2::Track *t, bool r): track(t), rev(r) { } + }; + + std::list neighbors; + std::list tracks; + float total_length; + +public: + SlopeTool(Designer &, Msp::Input::Mouse &, const std::set &); + + void even_slope(bool =false); + void flatten(); +private: + void set_slope(TrackOrder &, float, const R2C2::Angle &); +}; + +#endif