Symbian OS can be understood as a bitmap operating system. All applications in the Symbian OS can use bitmaps, especially game programs. Although the use of basic drawing methods (such as Drawline and Drawellipse) can draw more small graphics, bitmaps can be more effective in drawing, and the output graphics is more delicate. Symbian OS has its own bitmap file format MBM, this is a multi-bit diagram file. Window bitmaps use a bitmap conversion tool BMConv to create MBM. Since an MBM file may contain multiple bitmaps, BMCONV also generates a bitmap header file MBG, which provides an ID of a access bitmap. When a bitmap is loaded from the MBM file, the corresponding header should be included, and the appropriate identifier should be used as the parameter of the method of the load bitmap. Bitmaps can be defined in the project file:
Start Bitmap [Target-file] Header TargetPath [TargetPath] SourcePath [SourcePath] Source [Colour-Depth] [Source-Bitmap] End BMCONV can create two different types of Symbian OS bitmaps: read-only storage bitmap and non-read only Storage bitmap. Non-read-only storage bitmaps, also known as file storage bitmaps, using encoded RLE compression, which need to be loaded into the RAM before use. In order to improve the drawing speed, only read-only storage bitmap is generally not compressed, and they can be used directly from the ROM. By default, the BMCONV creates file storage bitmap (ie non-read-only storage bitmap). Symbian OS provides support for mask (Mask). Mask is a black and white bitmap, white drawing transparent area - only the pixels on the black area in the mask are drawn from the original bitmap according to the desired graphics. Because the mask only needs two colors, they should be converted to 1 bit of bitmaps to save storage space. Figure 1 illustrates an example of using the mask. Figure 1 Using the mask to draw the example Series 60 of the transparent bitmap provides a command line tool called MakeMask to create a 1 bit of the 1 bit in the 8 Bit bitmap. Makemask uses the last palette index in the original graph as transparent color. Although the Symbian OS provides an application programming interface for setting a bitmap palette, these interfaces are not implemented. Once these applications programming interfaces are complemented, color display is supported. When supported, the Symbian OS determines only the Netscape palette color cube correction. Series 60 offers its own 8 BIT bitmap palette. BMVCONV is modified to convert the 8 BIT bitmap to use the Series 60 palette (216 colors and 10 gray tune). This prevents third-party developers from using their own palettes, because their own palettes often affect bitmap output. In particular, a bitmap of a variety of hue is required, such as creating a color gravity, at least 12 bitmaps. The Series 60 palette is defined in the ThirdPartybitmap.pal palette file. The management of bitmaps is done by the cfbsbitmap class, which provides methods for creating and loading bitmaps, and defining their color depth and size. It uses the RFBSSession class to access the FBS, so the user does not contact the session class. CfbsBitmap also provides a method of directly accessing bitmap image data. You can use the DataAdDress method to get a pointer to the data address, and you can use the GetScanline method to access a specified scan line. Decompose the bitmap to two different stacks in the FBS according to the size of the bitmap. A bitmap for less than 4KB is saved in a stack, saved to another pile greater than 4KB. This decomposition is to prevent storage debris, and the storage debris is that the large bitmap is created and destroyed - the stack of large bitmaps automatically organizes fragments. Due to the defragmentation, the heap needs to be locked when the content of the large bit graph is operated. In order to prevent fragmentation and operation, the TbitmapUtil class provides the operation of locking the heap and unlocking stack. Only locking stacks are required when image data in one bitmap is directly edited - the drawings and replication methods provide automatic locking. The following example locks the FBS with a large bitmap and using a color fill bit map. It uses 16 bits per pixel to the positioning map. This applies to 12-bit and 16-bit bitmaps.