Re: CVS: commit msevior abi/src/af/util/xp ut_units.cpp

From: Dominic Lachowicz <domlachowicz_at_gmail.com>
Date: Thu Apr 05 2007 - 15:24:56 CEST

Should we really be assuming that pixels are the same thing as points?
That seems wrong...

Cheers,
Dom

On 4/5/07, cvs@abisource.com <cvs@abisource.com> wrote:
>
> Update of /cvsroot/abi/src/af/util/xp
> In directory abiword.snt.utwente.nl:/tmp/cvs-serv6442/src/af/util/xp
>
> Modified Files:
> ut_units.cpp
> Log Message:
>
> Set "px" to work correctly. XHTML imports much better now.
>
>
> Index: ut_units.cpp
> ===================================================================
> RCS file: /cvsroot/abi/src/af/util/xp/ut_units.cpp,v
> retrieving revision 1.73
> retrieving revision 1.74
> diff -u -d -r1.73 -r1.74
> --- ut_units.cpp 19 Jan 2007 15:34:34 -0000 1.73
> +++ ut_units.cpp 5 Apr 2007 12:58:10 -0000 1.74
> @@ -128,7 +128,7 @@
> case DIM_MM: valueScaled = (inches * 25.4); break;
> case DIM_PI: valueScaled = (inches * 6.0); break;
> case DIM_PT: valueScaled = (inches * 72.0); break;
> - case DIM_PX: valueScaled = (inches * UT_LAYOUT_RESOLUTION); break;
> + case DIM_PX: valueScaled = (inches * 72.0); break;
> default:
> UT_ASSERT(UT_NOT_IMPLEMENTED);
> break;
> @@ -188,7 +188,7 @@
> break;
>
> case DIM_PX:
> - valueScaled = (valueInInches * UT_LAYOUT_RESOLUTION);
> + valueScaled = (valueInInches * 72);
> sprintf(bufFormat,"%%%sfpx",((szPrecision && *szPrecision) ? szPrecision : ".0"));
> break;
>
> @@ -370,7 +370,7 @@
> case DIM_PT: result = f / 72; break;
> case DIM_CM: result = f / 2.54; break;
> case DIM_MM: result = f / 25.4; break;
> - case DIM_PX: result = f / UT_LAYOUT_RESOLUTION; break;
> + case DIM_PX: result = f / 72; break;
> default:
> UT_DEBUGMSG(("Unknown dimension type: %d", dim));
> UT_ASSERT_NOT_REACHED();
> @@ -395,7 +395,7 @@
> case DIM_IN: result = f * 72; break;
> case DIM_CM: result = f * 72 / 2.54; break;
> case DIM_MM: result = f * 72 / 25.4; break;
> - case DIM_PX: result = f * 72 / UT_LAYOUT_RESOLUTION; break;
> + case DIM_PX: result = f ; break;
> default:
> UT_DEBUGMSG(("Unknown dimension type for: %s", s));
> UT_ASSERT_NOT_REACHED();
>
> -----------------------------------------------
> To unsubscribe from this list, send a message to
> abisource-cvs-commit-request@abisource.com with the word
> unsubscribe in the message body.
>

-- 
Counting bodies like sheep to the rhythm of the war drums.
Received on Thu Apr 5 15:23:51 2007

This archive was generated by hypermail 2.1.8 : Thu Apr 05 2007 - 15:23:52 CEST