MeVisLabToolboxReference
|
00001 #ifndef __SoView2DOverlayDecoration_H 00002 #define __SoView2DOverlayDecoration_H 00003 //---------------------------------------------------------------------------------- 00004 // **InsertLicense** code 00005 //---------------------------------------------------------------------------------- 00007 00013 //---------------------------------------------------------------------------------- 00014 00015 #include "XVEnterScope.h" 00016 00017 #include <Inventor/fields/SoFields.h> 00018 00019 #include "XVLeaveScope.h" 00020 00021 #ifndef __SoView2DCallback_H 00022 #include "SoView2DCallback.h" 00023 #endif 00024 #ifndef __SoSFMLImage_H 00025 #include "SoSFMLImage.h" 00026 #endif 00027 00028 class SoView2D; 00029 00030 00032 00036 class SOVIEW2D_API SoView2DOverlayDecoration : public SoView2DCallback { 00037 00038 SO_NODE_HEADER(SoView2DOverlayDecoration); 00039 00040 public: 00042 00044 SoSFMLImage image; 00045 00047 SoSFFloat magnifyFactor; 00048 00049 SoSFBool border; 00050 SoSFColor borderColor; 00051 SoSFFloat borderBlend; 00052 SoSFBool leftRuler; 00053 SoSFBool rightRuler; 00054 SoSFBool topRuler; 00055 SoSFBool bottomRuler; 00056 SoSFColor rulerColor; 00057 SoSFBool rulerShadow; 00058 SoSFColor rulerShadowColor; 00059 SoSFFloat rulerBlend; 00060 SoSFFloat rulerMarkLength; 00061 SoSFFloat rulerLongMarkLength; 00062 00064 00065 enum Position { 00066 TOP, BOTTOM, LEFT, RIGHT 00067 }; 00068 00070 static void initClass(); 00071 00073 SoView2DOverlayDecoration(); 00074 00076 virtual void draw(View2DSliceList *dsl, View2DSlice* dslice, int slice); 00077 00078 protected: 00079 00081 bool isImageParallel (View2DSliceList *dsl); 00082 00084 void drawRuler(float mmToPixel,float x1, float y1, float x2, float y2, SoView2DOverlayDecoration::Position pos); 00085 00087 virtual ~SoView2DOverlayDecoration(); 00088 }; 00089 #endif