00001 // Copyright (c) 1998-2014 by Tech Soft 3D, Inc. 00002 // 00003 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc., 00004 // and considered a trade secret as defined under civil and criminal statutes. 00005 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of 00006 // unauthorized use or misappropriation of its trade secrets. Use of this information 00007 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under 00008 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use. 00009 00010 #ifndef _HUtilityAntialiasing_H 00011 #define _HUtilityAntialiasing_H 00012 00013 #ifdef H_PACK_8 00014 #pragma pack(push) 00015 #pragma pack(8) 00016 #endif 00017 00018 00019 #include "HTools.h" 00020 #include "hic_types.h" 00021 00022 00023 class HBaseView; 00024 00026 00030 class MVO_API HUtilityAntialiasing 00031 { 00032 public: 00033 00035 HUtilityAntialiasing(HBaseView *view); 00036 ~HUtilityAntialiasing(); 00037 00038 00042 bool GetShowState(); 00043 00048 bool CreateImage(); 00049 00054 void Show(int factor = 4); 00055 00059 void Hide(); 00060 00066 static void RegisterCallbacks(); 00068 static void skip_segment_tree (HIC_Rendition *rendition, HIC_Segment_Info *seg); 00070 static void draw_thick_polylines (HIC_Rendition *rendition, int count, HIC_DC_Point poi3[]); 00072 static void draw_thick_polyedges (HIC_Rendition *rendition, int count, HIC_DC_Point points[]); 00073 00074 00075 00076 protected: 00077 00083 void GetWindowSize(int &xmax, int &ymax); 00084 00085 private: 00086 HBaseView *m_pHView; 00087 HPixelRGB *m_pAAImageData; 00088 HC_KEY m_AntialisedImageSegmentKey; 00089 int m_width; 00090 int m_height; 00091 bool m_bIsShown; 00092 int m_factor; 00093 00094 char m_drawsegmenttree_callback_name[MVO_BUFFER_SIZE]; 00095 char m_drawwindow_callback_name[MVO_BUFFER_SIZE]; 00096 bool m_bFirst; 00097 char largeImageSegment[MVO_BUFFER_SIZE]; 00098 char imagedriver[MVO_BUFFER_SIZE]; 00099 00100 bool m_bFirstFirst; 00101 HC_KEY image_key; 00102 00103 }; 00104 00105 00106 #ifdef H_PACK_8 00107 #pragma pack(pop) 00108 #endif 00109 00110 #endif 00111 00112 00113 00114 00115