class align_elements: public bist_plugin{
public:
  align_elements(immagine* image, string libpath);
  virtual ~align_elements();
  
  virtual bool act(int e);
  
  
  virtual void register_plugin();
  virtual bool time_to_act();
  

  virtual bool need_atom();
  virtual bool need_leg();

  virtual string libpath();
  void inizialize();

  virtual std::string menu_path();
protected:

  void patch_w_arrows(float center_x, float center_y, float nw_rad);

  float get_new_radius(float center_x, vector< pair < int, pair<int,int> > >::iterator eliniz);

  void align_circ(bool clockwise, bool add_arrow);

  void align_hor_vert(bool horiz_align);

  bool bb_intersect();

  void scale_circle(float center_x, float center_y ,float radius);

  void scale_circle_proc(procedura* proc , float center_x, float center_y);

  void scale_circle_etichetta(etichetta* labl , float center_x, float center_y);

  bool _has_to_act;
  bool _has_acted;

};



int scale_circle_atom(atomo* from , void* data, void* data2, void* data3);


extern "C" bist_plugin* create_plugin(immagine* imm, string libpath);
extern "C"  void destroy_plugin(bist_plugin* j);

