#ifndef TEXT_H #define TEXT_H #include #include #include #include "Forma.h" #include "Sentido.h" #define TEXT_OBJECT_CODE 4 class Text: public Forma { public: Text(); Text(ifstream & inFile); virtual void write(void); virtual void mag(int x, int y, double f); virtual void trans(int x, int y); virtual void rot(int x, int y, Sentido s); static const int object_code= TEXT_OBJECT_CODE; //(always 4) private: string readText(ifstream &infile); // read input until it finds /001 int sub_type; /* (0: Left justified 1: Center justified 2: Right justified) */ int color; //(enumeration type) int depth; //(enumeration type) int pen_style; //(enumeration , not used) int font; //(enumeration type) float font_size; //(font size in points) float angle; //(radians, the angle of the text) int font_flags; //(bit vector) float height; //(Fig units) float length; //(Fig units) int x, y; /* (Fig units, coordinate of the origin of the string. If sub_type = 0, it is the lower left corner of the string. If sub_type = 1, it is the lower center. Otherwise it is the lower right corner of the string.) */ string stringText; /*(ASCII characters; starts after a blank character following the last number and ends before the sequence '\001'. This sequence is not part of the string. Characters above octal 177 are represented by \xxx where xxx is the octal value. This permits fig files to be edited with 7-bit editors and sent by e-mail without data loss. Note that the string may contain '\n'.) */ }; #endif