CFont pointers can be obtained by ieikonenv -> *** font (). There are 5 types of TitleFont (), DenseFont (), DenseFont (), AnnotationFont (), Font (). Painted underline
Font = ikonenv-> legendfont ();
TEXTPOINT.IY = (all () / kmiddletexttwovertalign; gc.usefont (font); // Using LegendFont
gc.setpencolor (colorblue); // Defines the CLOR of GC
gc.setunderlineStyle (Eunderlineon); // Painting Unders
gc.drawtext (text, textpoint); gc.setunderLinesTyle (EunderLineoff); // End of Underline
gc.discardfont (); // Release DISCARD used in memory
Draw deletion line:
Font = ieikonenv-> symbolfont ();
TEXTPOINT.SETXY (all () / kmiddletextonehorizalign, all hight () / kmiddletextonevertAlign;
GC.USEFONT (FONT);
GC.SetPencolor (Colorgreen);
gc.setstrikethroughstyle (estrikethrough); // Start
gc.drawtext (text, textpoint);
gc.setstrikethroughstyle (estrikethroughoff); // End
gc.discardfont ();
Definition of GC's color AKN_LAF_COLOR (Tint Color); you can use this macro to define. Returns TRGB.
CWSSCREENDEVICE () can be obtained by screenDeevice in ICoEenv (CCoEenv) (screen software device can set this class or query screen parameter) TypeFaceSupport () This method can be obtained, the font type supported by the mobile phone screen.
For (Tint i = icrrentscrollnum; i { // Get The I-TH FONT on the Device. Icoeenv-> ScreenDeevice () -> TypeFaceSupport (* ITYPEFASUPPORT, I); // Get the font name. FontName = ITYPEFACESUPPORT-> ITYPEFACE.INAME.DES (); // CREATE FONT SPECIFICATION. TFontSpec Fontspec (FontName, KFONTSPECSIZE); IdeviceMap-> GetnearestFontIntWips (FontTouse, FontSpec); // Increment Baseline by Two Times Height of Font. TEXTPOINT.IY = (fonttouse-> heightinpixels () * kbaselineincrementer; // Draw Text In Font with graphics context. GC.USEFONT (FontTOUSE); gc.drawtext (fontname, textpoint); gc.discardfont (); IdeviceMap-> ReleaseFont (fonttouse); } TFONTSPEC is a font specification that is unrelated to the device (support word high, style), and CFont is a font related to the device. Get cfont by Tzoomfactor's GetnearestFontintWips (CFont * & AFONT, Const TFontSpec & AfontSpec); Note: The GC (graphic context) is no default font, if you do not call USEFONT () before calling the text draw function, it will result in a serious error.