1.Right to LEFT language:
Hebrew is a language system for Right-to-Left. Contrary to the common Left-to-Right, the upper right corner of the screen is coordinate (0, 0), an increase in the left X coordinate value, from the top, the Y coordinate value is incremented.
X (800, 0)
<---------------------------- - (0, 0)
|
|
|
| y
/ | / (0,600)
Under such coordinate systems, text display and picture display with a general system is different, the string in memory, "Hello World", in this system is:
World Hello
Similarly, due to the relationship between the coordinate system, some common drawing functions are also integrated with the LEFT-TO-RIGHT system, such as drawing a straight line from (0, 0) to (800, 600), at 800 × 600 Under the display, the Left-to-Right system is approximately as follows:
(0, 0) *
*
*
*
*
*
*
* (800, 600)
And under the Right-T-LEFT system becomes
* (0,0)
*
*
*
*
*
*
* (800, 600)
Of course, I discussed here is to draw in the way, if you use a function of Bitblt provided by the system, direct the graphics card directly, then the language system of Right to Left will not work.
2.WMF picture format:
WMF is a vector picture format issued by Microsoft, and the full name is Windows Metafile. This is a vector image format, with the general difference between the general pixel picture format lies in that the WMF file is not saved by the RGB value of a pixel point, but a series of action instructions, such as Line, Circle, Fill Wait, combine these instructions together, you can form a picture.
About the details of WMF, you can refer to Microsoft's technical documentation.
3. Wmf image format in the Right-T-LEFT language system display problem:
Since WMF is composed of a series of drawing instructions, under the Right-to-LEFT system, each action is almost symmetrical with the Left-to-Right system, which naturally leads to the entire picture and the Left-to-Right system. The picture is completely left and right.
In fact, under the Right-to-Left system, not only the WMF picture has this problem, BMP, GIF picture also has the same problem, but only the general system draws BMP, GIF, etc., is the Bitblt provided by the direct call system. The type of function is to operate directly, not the way to draw, so it is generally not caused.
4. Solution:
Based on the above discussion, the most feasible solution is to create a memory bitmap when drawing the WMF image, draw the WMF's picture content to the memory bitmap, and then call the Bitblt type of the system to draw to the window once.
Another solution is that manually controlling the entire drawing process, before executing instructions such as line, Circle, pre-do a good asymmetric conversion of coordinates. Obviously this solution is more cumbersome, and the efficiency is relatively low.