Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef MORPH_TOOOL
Toshihiro Shimizu 890ddd
#define MORPH_TOOOL
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// #include "tstroke.h"
Toshihiro Shimizu 890ddd
#include "tools/tool.h"
Toshihiro Shimizu 890ddd
#include "tvectorimage.h"
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
class MorphTool {
Shinya Kitaoka 120a6e
  TPointD m_lastPos;
Shinya Kitaoka 120a6e
  TPointD m_curPos;
Shinya Kitaoka 120a6e
  TPointD m_firstPos;
Shinya Kitaoka 120a6e
  TAffine m_transformation;
Shinya Kitaoka 120a6e
  TPointD m_delta;
Shinya Kitaoka 120a6e
  TVectorImageP m_vi, m_vi2;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  bool m_active;
Shinya Kitaoka 120a6e
  bool m_dragging;
Shinya Kitaoka 120a6e
  double m_pixelSize;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  MorphTool();
Shinya Kitaoka 120a6e
  ~MorphTool();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void setImage(const TVectorImageP &vi);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void leftButtonDown(const TPointD &pos, const TMouseEvent &e);
Shinya Kitaoka 120a6e
  void leftButtonDrag(const TPointD &pos, const TMouseEvent &e);
Shinya Kitaoka 120a6e
  void leftButtonUp(const TPointD &pos, const TMouseEvent &e);
Toshihiro Shimizu 890ddd
shun-iwasawa 7f1e30
  bool keyDown(QKeyEvent *event);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void draw();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif