casa
$Rev:20696$
|
#include <Polygon.h>
Public Types | |
typedef std::pair< double, double > | pt |
typedef std::vector< pt > | point_list |
Public Member Functions | |
Polygon (WorldCanvas *wc, QtRegionDock *d, double x1, double y1) | |
Polygon (WorldCanvas *wc, QtRegionDock *d, const std::vector< std::pair< double, double > > &pts) | |
Polygon (QtRegionSourceKernel *, WorldCanvas *wc, const std::vector< std::pair< double, double > > &pts, bool hold_signals=false) | |
carry over from QtRegion... | |
Polygon (QtRegionSourceKernel *rs, WorldCanvas *wc, double x1, double y1, bool hold_signals=false) | |
~Polygon () | |
bool | clickWithin (double x, double y) const |
int | clickHandle (double x, double y) const |
int | moveHandle (int handle, double x, double y) |
for rectangles, resizing can change the handle... | |
void | move (double dx, double dy) |
void | resize (double, double) |
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) | |
unsigned int | mouseMovement (double x, double y, bool other_selected) |
returns mouse state (Region::MouseState) | |
void | linearCenter (double &x, double &y) const |
void | pixelCenter (double &x, double &y) const |
void | closeFigure (bool signal_complete=true) |
void | polygonComplete () |
void | addVertex (double x, double y, bool rewrite_last_point=false) |
AnnotationBase * | annotation () const |
void | boundingRectangle (double &blcx, double &blcy, double &trcx, double &trcy) const |
return the drawing bounding rectangle... | |
int | numVertices () const |
void | output (ds9writer &out) const |
region::RegionTypes | type () const |
fetch region type... | |
Protected Types | |
enum | YScaleTo { ScaleTop, ScaleBottom } |
enum | XScaleTo { ScaleLeft, ScaleRight } |
enum | Tranformations { FLIP_X, FLIP_Y } |
Protected Member Functions | |
unsigned int | check_handle (double x, double y) const |
std::list < std::tr1::shared_ptr < RegionInfo > > * | generate_dds_centers () |
ImageRegion * | get_image_region (DisplayData *) const |
void | drawRegion (bool) |
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 |
const point_list & | drawing_points () const |
Private Member Functions | |
bool | within_vertex_handle (double x, double y) const |
int | move_sizing_rectangle_handle (int handle, double x, double y) |
int | move_vertex (int handle, double x, double y) |
void | update_drawing_bounds_rectangle () |
void | update_reference_bounds_rectangle () |
void | update_drawing_state () |
void | update_reference_state (int transformations, int handle, int new_handle) |
virtual void | setCenter (double &x, double &y, double &deltx, double &delty) |
Private Attributes | |
double | handle_delta_x |
double | handle_delta_y |
point_list | _ref_points_ |
double | _ref_blc_x_ |
double | _ref_blc_y_ |
double | _ref_trc_x_ |
double | _ref_trc_y_ |
double | _ref_width_ |
double | _ref_height_ |
point_list | _drawing_points_ |
double | _drawing_blc_x_ |
double | _drawing_blc_y_ |
double | _drawing_trc_x_ |
double | _drawing_trc_y_ |
double | _drawing_width_ |
double | _drawing_height_ |
double | _center_x |
double | _center_y |
double | _center_delta_x |
double | _center_delta_y |
XScaleTo | _x_origin_ |
YScaleTo | _y_origin_ |
typedef std::vector<pt> casa::viewer::Polygon::point_list |
typedef std::pair<double,double> casa::viewer::Polygon::pt |
enum casa::viewer::Polygon::Tranformations [protected] |
enum casa::viewer::Polygon::XScaleTo [protected] |
enum casa::viewer::Polygon::YScaleTo [protected] |
casa::viewer::Polygon::Polygon | ( | WorldCanvas * | wc, |
QtRegionDock * | d, | ||
double | x1, | ||
double | y1 | ||
) |
casa::viewer::Polygon::Polygon | ( | WorldCanvas * | wc, |
QtRegionDock * | d, | ||
const std::vector< std::pair< double, double > > & | pts | ||
) |
casa::viewer::Polygon::Polygon | ( | QtRegionSourceKernel * | , |
WorldCanvas * | wc, | ||
const std::vector< std::pair< double, double > > & | pts, | ||
bool | hold_signals = false |
||
) |
carry over from QtRegion...
hopefully, removed soon...
casa::viewer::Polygon::Polygon | ( | QtRegionSourceKernel * | rs, |
WorldCanvas * | wc, | ||
double | x1, | ||
double | y1, | ||
bool | hold_signals = false |
||
) |
casa::viewer::Polygon::~Polygon | ( | ) | [inline] |
void casa::viewer::Polygon::addVertex | ( | double | x, |
double | y, | ||
bool | rewrite_last_point = false |
||
) |
AnnotationBase* casa::viewer::Polygon::annotation | ( | ) | const |
void casa::viewer::Polygon::boundingRectangle | ( | double & | blcx, |
double & | blcy, | ||
double & | trcx, | ||
double & | trcy | ||
) | const |
return the drawing bounding rectangle...
in "linear" coordinates...
unsigned int casa::viewer::Polygon::check_handle | ( | double | x, |
double | y | ||
) | const [protected] |
region::PointInfo casa::viewer::Polygon::checkPoint | ( | double | x, |
double | y | ||
) | const [virtual] |
returns point state (Region::PointLocation)
Implements casa::viewer::Region.
int casa::viewer::Polygon::clickHandle | ( | double | x, |
double | y | ||
) | const |
bool casa::viewer::Polygon::clickWithin | ( | double | x, |
double | y | ||
) | const |
void casa::viewer::Polygon::closeFigure | ( | bool | signal_complete = true | ) |
const point_list& casa::viewer::Polygon::drawing_points | ( | ) | const [inline, protected] |
void casa::viewer::Polygon::drawRegion | ( | bool | ) | [protected, virtual] |
Implements casa::viewer::Region.
virtual void casa::viewer::Polygon::fetch_region_details | ( | region::RegionTypes & | type, |
std::vector< std::pair< int, int > > & | pixel_pts, | ||
std::vector< std::pair< double, double > > & | world_pts | ||
) | const [protected, virtual] |
Reimplemented from casa::viewer::Region.
std::list<std::tr1::shared_ptr<RegionInfo> >* casa::viewer::Polygon::generate_dds_centers | ( | ) | [protected, virtual] |
Implements casa::viewer::Region.
ImageRegion* casa::viewer::Polygon::get_image_region | ( | DisplayData * | ) | const [protected] |
void casa::viewer::Polygon::linearCenter | ( | double & | x, |
double & | y | ||
) | const |
unsigned int casa::viewer::Polygon::mouseMovement | ( | double | x, |
double | y, | ||
bool | other_selected | ||
) |
returns mouse state (Region::MouseState)
void casa::viewer::Polygon::move | ( | double | dx, |
double | dy | ||
) |
int casa::viewer::Polygon::move_sizing_rectangle_handle | ( | int | handle, |
double | x, | ||
double | y | ||
) | [private] |
int casa::viewer::Polygon::move_vertex | ( | int | handle, |
double | x, | ||
double | y | ||
) | [private] |
int casa::viewer::Polygon::moveHandle | ( | int | handle, |
double | x, | ||
double | y | ||
) |
for rectangles, resizing can change the handle...
for rectangles, moving a handle is resizing...
int casa::viewer::Polygon::numVertices | ( | ) | const [inline] |
Definition at line 93 of file Polygon.h.
References drawing_points().
void casa::viewer::Polygon::output | ( | ds9writer & | out | ) | const |
void casa::viewer::Polygon::pixelCenter | ( | double & | x, |
double & | y | ||
) | const [virtual] |
Implements casa::viewer::Region.
void casa::viewer::Polygon::resize | ( | double | , |
double | |||
) |
virtual void casa::viewer::Polygon::setCenter | ( | double & | x, |
double & | y, | ||
double & | deltx, | ||
double & | delty | ||
) | [inline, private, virtual] |
Definition at line 134 of file Polygon.h.
References _center_delta_x, _center_delta_y, _center_x, and _center_y.
region::RegionTypes casa::viewer::Polygon::type | ( | ) | const [inline, virtual] |
fetch region type...
Implements casa::viewer::Region.
Definition at line 100 of file Polygon.h.
References casa::viewer::region::PolyRegion.
void casa::viewer::Polygon::update_drawing_bounds_rectangle | ( | ) | [private] |
void casa::viewer::Polygon::update_drawing_state | ( | ) | [private] |
void casa::viewer::Polygon::update_reference_bounds_rectangle | ( | ) | [private] |
void casa::viewer::Polygon::update_reference_state | ( | int | transformations, |
int | handle, | ||
int | new_handle | ||
) | [private] |
bool casa::viewer::Polygon::valid_translation | ( | double | dx, |
double | dy, | ||
double | width_delta, | ||
double | height_delta | ||
) | [virtual] |
Implements casa::viewer::Region.
bool casa::viewer::Polygon::within_vertex_handle | ( | double | x, |
double | y | ||
) | const [private] |
double casa::viewer::Polygon::_center_delta_x [private] |
Definition at line 154 of file Polygon.h.
Referenced by setCenter().
double casa::viewer::Polygon::_center_delta_y [private] |
Definition at line 154 of file Polygon.h.
Referenced by setCenter().
double casa::viewer::Polygon::_center_x [private] |
Definition at line 153 of file Polygon.h.
Referenced by setCenter().
double casa::viewer::Polygon::_center_y [private] |
Definition at line 153 of file Polygon.h.
Referenced by setCenter().
double casa::viewer::Polygon::_drawing_blc_x_ [private] |
double casa::viewer::Polygon::_drawing_blc_y_ [private] |
double casa::viewer::Polygon::_drawing_height_ [private] |
Definition at line 148 of file Polygon.h.
Referenced by drawing_points().
double casa::viewer::Polygon::_drawing_trc_x_ [private] |
double casa::viewer::Polygon::_drawing_trc_y_ [private] |
double casa::viewer::Polygon::_drawing_width_ [private] |
double casa::viewer::Polygon::_ref_blc_x_ [private] |
double casa::viewer::Polygon::_ref_blc_y_ [private] |
double casa::viewer::Polygon::_ref_height_ [private] |
double casa::viewer::Polygon::_ref_trc_x_ [private] |
double casa::viewer::Polygon::_ref_trc_y_ [private] |
double casa::viewer::Polygon::_ref_width_ [private] |
XScaleTo casa::viewer::Polygon::_x_origin_ [private] |
YScaleTo casa::viewer::Polygon::_y_origin_ [private] |
double casa::viewer::Polygon::handle_delta_x [private] |
double casa::viewer::Polygon::handle_delta_y [private] |