📄 static_text_def.c.svn-base
字号:
#include "static_text_def.h"#include "shape_def.h"#include "swf_file_pub.h"#include "base_types.h"#include "font_def.h"void stx_to_shape(swf_file_t *swf_p, struct DefineText *Text) { struct DefineFont *font_p = NULL; struct TextRecord *TextRecordP; long x = 0; long y = 0; long FontHeight=0; long i; TextRecordP=Text->TextRecordsP; while (TextRecordP) { font_p = (struct DefineFont*)(swf_p->dict_p->dict[TextRecordP->FontID]); if (TextRecordP->Flags&StyleFlagsHasXOffset) { x=TextRecordP->XOffset; } if (TextRecordP->Flags&StyleFlagsHasYOffset) { y=TextRecordP->YOffset; } FontHeight=TextRecordP->TextHeight; for (i=0;i<TextRecordP->GlyphCount;i++) { struct GlyphEntry *g_p = &(TextRecordP->GlyphEntries[i]); mat_new(&(g_p->GlyphMatrix)); g_p->GlyphMatrix.TranslateX = x; g_p->GlyphMatrix.TranslateY = y; g_p->GlyphMatrix.ScaleX = FontHeight/1024.0; g_p->GlyphMatrix.ScaleY = FontHeight/1024.0; g_p->Shape.CharacterType = CharShape; g_p->Shape.ShapeBounds = font_p->GlyphShape[g_p->GlyphIndex].FontBounds; g_p->Shape.ShapeRecordsP = font_p->GlyphShape[g_p->GlyphIndex].ShapeRecordP; x+=g_p->GlyphAdvance; } TextRecordP=TextRecordP->NextP; }};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -