29 #ifndef REGION_POLYGON_H_
30 #define REGION_POLYGON_H_
45 class QtRegionSourceKernel;
49 typedef std::pair<double,double>
pt;
56 const std::vector<std::pair<double,double> > &pts,
68 int moveHandle(
int handle,
double x,
double y );
69 void move(
double dx,
double dy );
70 void resize(
double ,
double );
71 bool valid_translation(
double dx,
double dy,
double width_delta,
double height_delta );
77 unsigned int mouseMovement(
double x,
double y,
bool other_selected );
85 void addVertex(
double x,
double y,
bool rewrite_last_point=
false );
91 void boundingRectangle(
double &blcx,
double &blcy,
double &trcx,
double &trcy )
const;
116 std::vector<std::pair<double,double> > &world_pts )
const;
134 virtual void setCenter(
double &x,
double &y,
double &deltx,
double &delty) {
AnnotationBase * annotation() const
Base class for annotations.
bool clickWithin(double x, double y) const
virtual void fetch_region_details(region::RegionTypes &type, std::vector< std::pair< int, int > > &pixel_pts, std::vector< std::pair< double, double > > &world_pts) const
void update_reference_bounds_rectangle()
void output(ds9writer &out) const
int clickHandle(double x, double y) const
void linearCenter(double &x, double &y) const
void update_drawing_state()
void boundingRectangle(double &blcx, double &blcy, double &trcx, double &trcy) const
return the drawing bounding rectangle...
region::RegionTypes type() const
fetch region type...
Polygon(WorldCanvas *wc, QtRegionDock *d, double x1, double y1)
const point_list & drawing_points() const
void addVertex(double x, double y, bool rewrite_last_point=false)
std::list< std::shared_ptr< RegionInfo > > * generate_dds_centers()
unsigned int check_handle(double x, double y) const
void update_reference_state(int transformations, int handle, int new_handle)
All regions are specified in "linear coordinates", not "pixel coordinates".
bool valid_translation(double dx, double dy, double width_delta, double height_delta)
region::PointInfo checkPoint(double x, double y) const
returns point state (Region::PointLocation)
void resize(double, double)
unsigned int mouseMovement(double x, double y, bool other_selected)
returns mouse state (Region::MouseState)
Class to hold a region of interest in an image.
std::vector< pt > point_list
casacore::ImageRegion * get_image_region(DisplayData *) const
void pixelCenter(double &x, double &y) const
int moveHandle(int handle, double x, double y)
for rectangles, resizing can change the handle...
point_list _drawing_points_
Implementation of drawing in world coordinates on top of a PixelCanvas.
void closeFigure(bool signal_complete=true)
std::pair< double, double > pt
int move_vertex(int handle, double x, double y)
Base class for display objects.
int move_sizing_rectangle_handle(int handle, double x, double y)
bool within_vertex_handle(double x, double y) const
virtual void setCenter(double &x, double &y, double &deltx, double &delty)
void move(double dx, double dy)
void update_drawing_bounds_rectangle()