00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00020 #ifndef _TEXT_H_
00021 #define _TEXT_H_
00022
00023 struct Glyph {
00024 long index;
00025 long xAdvance;
00026 long code;
00027 };
00028
00029 struct TextRecord {
00030
00031
00032 Glyph *glyphs;
00033 long nbGlyphs;
00034
00035
00036 TextFlags flags;
00037 SwfFont *font;
00038 long fontHeight;
00039 Color color;
00040 long xOffset;
00041 long yOffset;
00042
00043 TextRecord *next;
00044
00045 TextRecord();
00046 ~TextRecord();
00047
00048 char *getText();
00049 };
00050
00051 class Text : public Character {
00052
00053 Rect boundary;
00054 Matrix textMatrix;
00055 TextRecord *textRecords;
00056
00057 public:
00058 Text(long id);
00059 ~Text();
00060
00061 void setTextBoundary(Rect rect);
00062 void setTextMatrix(Matrix m);
00063 void addTextRecord(TextRecord *tr);
00064 int execute(GraphicDevice *gd, Matrix *matrix, Cxform *cxform);
00065 void getRegion(GraphicDevice *gd, Matrix *matrix,
00066 void *id, ScanLineFunc scan_line_func);
00067 int doText(GraphicDevice *gd, Matrix *matrix, Cxform *cxform, ShapeAction action,
00068 void *id, ScanLineFunc scan_line_func);
00069 void getBoundingBox(Rect *bb, DisplayListEntry *e);
00070 TextRecord *getTextRecords();
00071
00072 #ifdef DUMP
00073 void dump(BitStream *bs);
00074 #endif
00075 };
00076
00077 #endif