From: Fridrich S. <fri...@bl...> - 2005-01-29 06:19:01
|
Marc, J.M. Maurer wrote: >>uwog, how do you understand the talk about image precision in the WPG2 >>documentation? I am really lost in the ranges they mention. > I might look into it this weekend.. wpd2svg might be fun to hack on...! It definitely is. That is the reason why I created it. This allows us to actually see what we are converting. Very rewarding. The next step is to convert the line and fill attributes (line width, line colour, fill pattern fill colour,...) and maybe a correct conversion of ellipse fragments (we read it, but I did not find in SVG specs how to do it actually) and the non-bitmap images from "testdoc" will be looking gorgeous. I was thinking about converting first all vector graphics elements in both formats and then attack the bitmap and maybe postscript stuff. The unclear part is: The units of WPG coordinate data are stored in the Start WPG record. Coordinate data values are signed values indicating a location within a two-dimensional, right-hand, Cartesian coordinate system. Positive X and Y values are located to the right and above the image origin. Single-precision positional data uses short integer values ranging from 32768 to 32767. Double-precision positional data uses fixed-point values ranging from 32768.00000 to 32767.99998. Double-precision data is stored in long integer formats. Although double-precision positional data is defined by the format, Corel products (as currently implemented) use the fractional portion for rounding only. Therefore, positional data must not be defined in a small range (such as 0.21 to 1). Maybe it is me who did not understand the ranges going from bigger to smaller. Did they forget signs, but then signs are not needed in coordinates, since WPG starts from (0,0) and ends at (width,height). BTW: do not surprised if the svg images are upside down. The default coordinates of svg go from left-up and WPG from left-down. >>BTW, is there somewhere a really good WPG1 documentation? > I never found the complete documentation. I think we both have the same > docs... One can do with it for the while, but... BTW, the default palette of WPG1 and WPG2 is the same thing. I found it out. |