From: http://hi.baidu.com/gaojinshan/blog/item/4140043de1f07edb9f3d62c1.html Idisplay can draw graphics, text, and images,Very commonIdispcanvas is the encapsulation of idisplay, which seems to be not commonly used. Idispcanvas contains idisplay. If necessary, you can create an idispcanvas (canvas) and draw it on it. Rootcontainer contains idispcanvas and draws controls (iwidgets) in the container. Canvaswidget contains idisplay, which is used to draw controls. Canvaswidget is easy to use and is recommended for use! Dib_t Dib (Device Independent Bitmap) is a device-independent bitmap. On mstar, it is not an interface class, but a struct (dib_t). Its members include the bitmap width (nwidth), height (nheight), and color depth (nbpp ), the address (naddr) and size (nsize) of the screen memory buffer ). Ibitmap Ibitmap is a bitmap interface class. It contains dib_t; it has alpha transparency, transcolor, tanstype, color scheme (ncolorscheme: rbg565, etc.), palette (ppalette ), color palette (ncntpalette), dirty rectangle area (trcdirtyarea), and other attributes; setpixel/getpixel ), draw a horizontal or vertical line (drawhline/drawvline), fill the rectangular area (fillrect), bitmap copying and Scaling (bltin/stretchblt), get DiB (getdib) and other interfaces. Ibitmapext Ibitmapext is the extension of ibitmap (extend ). The extension provides interfaces such as setpalette, getdirtyarea/setdirtyarea, bltinfadeout, and dimensionswitch. Idisplay Idisplay is the display interface class. It includes ibitmap and ifont. In addition to ibitmap and ifont attributes, it also includes nwidth, nheight, and ncoloritem ), user region (trcca), display mode (ndispmode: Portrait, landscape, landscape_270, etc.), screen ID (ndispid: main_display, sub_display) and other attributes; in addition to interfaces inherited from ibitmap and ifont, it also provides drawline, drawrect, drawtriangle, and drawarc ), draw an elliptical image (drawellipse), draw a color string (drawcolorfultext), obtain a system Bitmap (getdevicebitmap), create a bitmap (createbitmap), clear screen (clearscreen), update (update), and fade out (fadeout) . (Note: idisplay supports horizontal and vertical screens, and supports multi-layer macro control) Idispcanvas Idispcanvas is the canvas interface class. It contains idisplay. Only setdisplay/getdisplay, setbitmap/getbitmap, setcarect/getcarect and Other interfaces are provided (Note: idispcanvas also inherits the idisplay layer operation interface) Ifont Ifont is the font interface class. It has attributes such as the font height (nheight). It provides interfaces such as drawing a string, measuring the length of a string (measuretext), and creating a bitmap (createglyphdib. (Note: ifont_drawtext () is to draw characters to ibitmap) Iimage Iimage is an image interface class. It is used for image rendering and has attributes such as idisplay and ibitmap, image size (timgsize), and file data stream (pstream). It provides decodeframe ), draw a frame (drawframe), play the start and stop of an animation, draw (draw), and obtain the image information (getimageinfo: nwidth, nheight, nframes, nformat, etc.), get the image format (getimageformat: BMP, PNG, JPG, GIF, etc.), whether it is animated (isanimation), get the image size (getimagesize: nwidth, nheight ), getresultbmp, sets or obtains the decoding parameters (setdecodeparm/getdecodeparam: nwidth, nheight, nangle, tregion, etc.), sets or clears data (setsrcbuffer/clearsrc Buffer), set the data source (setsrcurl), set (setdisplay), register or deregister the notification (regnotify/deregnotify), set setautodecode, set setforceasyncdecode and Other interfaces. (Note: iimage_draw () is to draw an image to idisplay) Iimagemaker Iimagemaker is the image generation interface class. It is used to generate an image. It allows you to rotate the image file (rotate: 90,180,270, etc.) and encode ibitmap or iimage to the memory buffer (encode: BMP, JPG ), save ibitmap or iimage to a file (saveas: BMP, JPG) and other interfaces. |