ContentsIndex
Graphics and Text Functions
Graphics and Text | Legend
Functions
Function 
Description 
This function allows you to blot frames in the LCD. Please note this function works on MediaTek Serial Interface LCD only. The frames don't have to be the same size as the LCD, and the it will be blot from the corresponding positions of the frames. The color format of the frames should remain the same. 
Draws an ellipse at the given point within the frame. 
Draws a gradient rectangle at the given point within the frame. 
Draws an image file to the frame, this will replace the original frame content. The image format can be ABM / AB2 / JPEG / GIF / PNG / BMP 
Draws an image saved in memory to the frame. The image format can be ABM / AB2 / JPEG / GIF / PNG / BMP 
Draws a line from position(x0, y0) to position(x1, y1) within the frame 
Draws a point at position(x,y) within the frame 
Draws a polygon at the given point within the frame. 
Draws a rectangle at the given point within the frame. 
Draws an image file to the frame resizing it to the specified size. The image format can be ABM / AB2 / JPEG / GIF / PNG / BMP 
Draws an image saved in memory to the frame resizing it to the specified size. The image format can be ABM / AB2 / JPEG / GIF / PNG / BMP 
Draws a rectangle with rounded corners at the given point within the frame. 
Draws a solid ellipse at the given point within the frame. 
Draws a solid polygon at the given point within the frame. 
Draws a solid rectangle at the given point within the frame. 
Draws a solid rectangle with rounded corners at the given point within the frame. 
Draws the texts at the given position within the frame. The font / color / font_size are following the global settings set by vm_graphic_font_set_font() / vm_graphic_color() / vm_graphic_font_set_font_size(). If they are not set the default system font / block color and medium font will be used. 
Draws the text to the frame according to the baseline. The font / color / font_size are following the global setting set by vm_graphic_font_set_font() / vm_graphic_color() / vm_graphic_font_set_font_size(). If not set the default system font / block color and medium font will be used. 
Draws the texts at the given position within the frame. Will be truncated if necessary with configured truncate symbol. 
Flatten frames to output_frame 
Get maximum char baseline in pixel regardless of language for the font size 
Get maximum char height regardless of language for the font size 
get current font height only considering English and Chinese, for dot character, it is precise. for vector font,it is usually higher than single character, it is the text height. 
Get the height in pixel of a character 
get the information of the appointed character. Unit:pixel 
Get the width in pixel of a character 
Get global color 
Get the memory size needed for the font pool. The user can allocate memory with desired size, and set it as font pool size by calling vm_graphic_init_font_pool(); 
Gets the frame number of an image file. The image format can be ABM / AB2 / JPEG / GIF / PNG / BMP 
Gets the property of an image file. 
Gets the frame number of an image saved in memory. The image format can be ABM / AB2 / JPEG / GIF / PNG / BMP 
Gets the property of an image saved in memory. The image format can be ABM / AB2 / JPEG / GIF / PNG / BMP 
Gets the color of the appointed point in the frame 
get the baseline of a text in pixels 
get the height of a text in pixels 
get the width of a text in pixels 
 
Initialize the font pool with outside memory. 
Query the current platform if it supports vector fonts. 
Linear transformation 
get the width and height of the appointed character. Unit:pixel 
Reset the clip 
Reset app's own fonts, afterward, the texts will be drawn using system font 
Rotates a frame according to the rotate type, the frame is rotated in-place. 
Sets the clip, it will affect all the graphic function calls. The coordinates are frame-based. 
Sets the global color for graphic functions such as draw text or shapes 
Set app's own fonts, afterward, engine will try to find the font for a character from these font files one by one, the font with smaller index in the font_file_paths array will have higher priority. If there is no related font in thest font files for a character, the system font will be used. Please call this API after VM_MSG_PAINT event. Set fonts clears the internal cache of the text rendering engine, therefore performance-wise it is better to prevent Reset/Set fonts frequently. 
Set the global font size. You can use the VM_GRAPHIC_FONT_SIZE enum. If the platform supports vector font you will be able to set the real font size in pixel, but it should be bigger than 2 for the value that is occupied by VM_GRAPHIC_FONT_SIZE enum. 
Set the font style. Only valid for vector fonts. 
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.