summaryrefslogtreecommitdiffstats
path: root/tksao/frame/basepolygon.h
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2016-10-27 18:59:29 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2016-10-27 18:59:29 (GMT)
commitd4d595fa7fb12903db9227d33d48b2b00120dbd1 (patch)
tree7d18365de0d6d1b29399b6a17c7eb01c2eb3ed49 /tksao/frame/basepolygon.h
parent949f96e29bfe0bd8710d775ce220e597064e2589 (diff)
downloadblt-d4d595fa7fb12903db9227d33d48b2b00120dbd1.zip
blt-d4d595fa7fb12903db9227d33d48b2b00120dbd1.tar.gz
blt-d4d595fa7fb12903db9227d33d48b2b00120dbd1.tar.bz2
Initial commit
Diffstat (limited to 'tksao/frame/basepolygon.h')
-rw-r--r--tksao/frame/basepolygon.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/tksao/frame/basepolygon.h b/tksao/frame/basepolygon.h
new file mode 100644
index 0000000..c7a90f8
--- /dev/null
+++ b/tksao/frame/basepolygon.h
@@ -0,0 +1,59 @@
+// Copyright (C) 1999-2016
+// Smithsonian Astrophysical Observatory, Cambridge, MA, USA
+// For conditions of distribution and use, see copyright notice in "copyright"
+
+#ifndef __basepolygon_h__
+#define __basepolygon_h__
+
+#include "marker.h"
+#include "list.h"
+
+class BasePolygon : public Marker {
+ protected:
+ List<Vertex> vertex;
+
+ protected:
+ void moveVertex(const Vector&, int);
+ void recalcCenter();
+ virtual void renderX(Drawable, Coord::InternalSystem, RenderMode) =0;
+ virtual void renderPS(int) =0;
+#ifdef MAC_OSX_TK
+ virtual void renderMACOSX() =0;
+#endif
+#ifdef __WIN32
+ virtual void renderWIN32() =0;
+#endif
+ void updateHandles();
+
+ void listBase(FitsImage*, ostream&, Coord::CoordSystem,
+ Coord::SkyFrame, Coord::SkyFormat);
+ void listBaseNonCel(FitsImage*, ostream&, Matrix&, Coord::CoordSystem);
+
+public:
+ BasePolygon(Base* p, const Vector& ctr,
+ const Vector& b);
+ BasePolygon(Base* p, const Vector& ctr,
+ const Vector& b,
+ const char* clr, int* dsh,
+ int wth, const char* fnt, const char* txt,
+ unsigned short prop, const char* cmt,
+ const List<Tag>& tg, const List<CallBack>& cb);
+ BasePolygon(Base* p, const List<Vertex>& v,
+ const char* clr, int* dsh,
+ int wth, const char* fnt, const char* txt,
+ unsigned short prop, const char* cmt,
+ const List<Tag>& tg, const List<CallBack>& cb);
+ BasePolygon(const BasePolygon&);
+
+ void createVertex(int, const Vector&);
+ void deleteVertex(int);
+ void edit(const Vector&, int);
+ virtual int getSegment(const Vector&) =0;
+ virtual void reset(const Vector&) =0;
+ void rotate(const Vector&, int);
+ void updateCoords(const Matrix&);
+
+ void listXML(ostream&, Coord::CoordSystem, Coord::SkyFrame, Coord::SkyFormat);
+};
+
+#endif