commit: Explicit conversions in transforming resolutions.

Date: Fri Sep 05 2003 - 11:43:22 EDT

  • Next message: Robert Wilhelm: "Patch:4939"

    CVS: ----------------------------------------------------------------------
    CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
    CVS: Committing in .
    CVS: Modified Files:
    CVS: xp/gr_Graphics.cpp
    CVS: ----------------------------------------------------------------------
    Explicit casting and calculations of ratios in the graphics class. Unix
    build continues to be fine. This *might* fix cursor problems on windows.

    There were a few examples of code like this:

     j * k /m

    Where everything is integer. Now if the compiler decides to divide k/m
    before multipling by j we would have lost resolution. (Since the division
    would truncate on conversion to integer, before the multiplication.)

    I put in a bunch of casts to force the compiler to always calcuate at
    higher resolution.

    This might fix the cursor and page number changing with zoom on windows.
    Windows developers please test and post your findings to the list. I won't
    be able to actually compile windows for a while I think but I would like
    to move on to fixing other bugs. So let me know if it's fixe dor still



    This archive was generated by hypermail 2.1.4 : Fri Sep 05 2003 - 11:59:56 EDT