00001
00002 #ifndef TRANS_H
00003 #define TRANS_H
00004
00005 #ifdef __GNUG__
00006 #pragma interface
00007 #endif
00008
00009
00010
00011 #define DEFAULT_STRANS_ANGLE 0
00012 #define DEFAULT_STRANS_SCALE 1.0
00013 #define DEFAULT_STRANS_ABS_ANGLE false
00014 #define DEFAULT_STRANS_ABS_SCALE false
00015 #define DEFAULT_STRANS_REFLECTION false
00016
00017 #include "gdsii.h"
00018 #include "gdsdef.h"
00019 class Reference;
00020 class Text;
00021 class Image;
00022
00023 typedef struct gds_strans_bitflags
00024 {
00025 #if wxBYTE_ORDER == wxBIG_ENDIAN
00026 unsigned reflection: 1;
00027 unsigned reserved1 : 7;
00028 unsigned reserved2 : 5;
00029 unsigned abs_scale : 1;
00030 unsigned abs_angle : 1;
00031 unsigned reserved : 1;
00032 #else
00033 unsigned reserved : 1;
00034 unsigned abs_angle : 1;
00035 unsigned abs_scale : 1;
00036 unsigned reserved2 : 5;
00037 unsigned reserved1 : 7;
00038 unsigned reflection: 1;
00039 #endif
00040 } gds_strans_bitflags ;
00041
00042 class Strans
00043 {
00044 public:
00045
00046 Strans(double nw_angle=DEFAULT_STRANS_ANGLE,
00047 double nw_scale=DEFAULT_STRANS_SCALE,
00048 bool nw_abs_angle=DEFAULT_STRANS_ABS_ANGLE,
00049 bool nw_abs_scale=DEFAULT_STRANS_ABS_SCALE,
00050 bool nw_reflection=DEFAULT_STRANS_REFLECTION);
00051
00052 Strans& operator=(Strans& a_strans);
00053
00054 void MakeStrans(Reference* reference);
00055 void MakeStrans(Text* text);
00056 void MakeStrans(Image* image);
00057
00058
00059 bool GetStrans();
00060 void SetAngle(double);
00061 void SetScale(double);
00062 void SetAbsAngle(bool);
00063 void SetAbsScale(bool);
00064 void SetReflection(bool);
00065 double GetAngle();
00066 double GetScale();
00067 bool GetAbsAngle();
00068 bool GetAbsScale();
00069 bool GetReflection();
00070
00071 union {
00072 short int total;
00073 gds_strans_bitflags bits;
00074 } _stransflags;
00075
00076 protected:
00077 double _angle;
00078 double _scale;
00079 bool _strans_need;
00080 };
00081
00082 #endif
trans.h Source File -- Thu Nov 28 21:24:56 2002 -- 28 Nov 2002 -- 1.2.18 -- -- . --