diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2016-10-27 18:59:29 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2016-10-27 18:59:29 (GMT) |
commit | d4d595fa7fb12903db9227d33d48b2b00120dbd1 (patch) | |
tree | 7d18365de0d6d1b29399b6a17c7eb01c2eb3ed49 /tksao/frame/frame.h | |
parent | 949f96e29bfe0bd8710d775ce220e597064e2589 (diff) | |
download | blt-d4d595fa7fb12903db9227d33d48b2b00120dbd1.zip blt-d4d595fa7fb12903db9227d33d48b2b00120dbd1.tar.gz blt-d4d595fa7fb12903db9227d33d48b2b00120dbd1.tar.bz2 |
Initial commit
Diffstat (limited to 'tksao/frame/frame.h')
-rw-r--r-- | tksao/frame/frame.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/tksao/frame/frame.h b/tksao/frame/frame.h new file mode 100644 index 0000000..6359530 --- /dev/null +++ b/tksao/frame/frame.h @@ -0,0 +1,69 @@ +// Copyright (C) 1999-2016 +// Smithsonian Astrophysical Observatory, Cambridge, MA, USA +// For conditions of distribution and use, see copyright notice in "copyright" + +#ifndef __frame_h__ +#define __frame_h__ + +#include "context.h" +#include "framebase.h" +#include "colorscale.h" + +// Frame + +class Frame : public FrameBase { + protected: + int cmapID; // current colormap id + float bias; // current colormap bias + float contrast; // current colormap contrast + + long* colormapData; + + int colorCount; // number of dynamic colors + ColorScale* colorScale; // current color scale + unsigned char* colorCells; // current color values + + private: + unsigned char* blend(unsigned char*, unsigned char*, int, int); + int isIIS(); + void pushMatrices(); + void pushMagnifierMatrices(); + void pushPannerMatrices(); + void pushPSMatrices(float, int, int); + void reset(); + void setKeyFits() {} + void unloadFits(); + + protected: + int isFrame() {return 1;} + + unsigned char* fillImage(int width, int height, Coord::InternalSystem); + unsigned char* fillMask(FitsMask*, int, int, Coord::InternalSystem); + int validColorScale() {return colorScale ? 1 : 0;} + void updateColorCells(unsigned char*, int); + + public: + Frame(Tcl_Interp*, Tk_Canvas, Tk_Item*); + virtual ~Frame(); + + void colormapCmd(int, float, float, int, unsigned char*, int); + void colormapBeginCmd(); + void colormapMotionCmd(int, float, float, int, unsigned char*, int); + void colormapEndCmd(); + + void getColorbarCmd(); + void getRGBChannelCmd(); + void getRGBViewCmd(); + void getRGBSystemCmd(); + void getTypeCmd(); + + void iisCmd(int, int); + void iisEraseCmd(); + void iisGetCmd(char*, int, int, int, int); + void iisSetCmd(const char*, int, int, int, int); + void iisWCSCmd(const Matrix&, const Vector&, int); + + void savePhotoCmd(const char*); +}; + +#endif |