![]() |
【转帖】gitextstyle
gitextstyle
gitextstyle hi, i need to retrieve underline,strikeout etc for mtext and text entity.in version 1.11 gitextstyle was member of oddbtextstyletablerecord but in 1.12 it is not a member of oddbtextstyletablerecord.how can i retrieve this data underline,strikeout etc for mtext using 1.12 libraries?how can i get gitextstyle in attached code?is strikeout same as overlined? class oddbmtext_dumper : public oddbentity_dumper { public: oddbmtext_dumper() {} void dump(oddbentity* pent) const { oddbmtextptr pmtext = pent; logfont lf; oddbtextstyletablerecordptr ptextstyle = pmtext->textstyle().safeopenobject(); odgitextstyle gistyle; bool bold,italic; int charset, pitchandfamily; odstring typeface; ptextstyle->font(typeface,bold,italic,charset, pitchandfamily); ptextstyle->gitextstyle(gistyle); // getting error lf.lfitalic = (byte)( gistyle.ttfdecriptor().isitalic()); lf.lfunderline = (byte)(gistyle.isunderlined()); lf.lfstrikeout = (byte)(gistyle.isoverlined());///lfstrikeout = 0; lf.lfweight = gistyle.ttfdecriptor().isbold() ? fw_bold : fw_dontcare; lf.lfwidth=0; lf.lfpitchandfamily=gistyle.ttfdecriptor().pitchan dfamily(); lf.lfcharset=(unsigned char)gistyle.ttfdecriptor().charset(); ........... ................ } thanks 1. dbtextstyletablerecord does not store underline/overline flags. ttf properties can be get using font() method. 2. underlining/overlining, font etc. can be switched inside mtext by special formatting characters. you can use oddbmtext::explodefragments() to get separate fragments each having the same properties. sergey slezkin |
所有的时间均为北京时间。 现在的时间是 11:32 PM. |