That's why I said "basically" - the MapMode. Since UNO AWT API doesn't have support for this at all, I wonder if it's good to take this into account for something that was intended to be a conversion "helper" function.
If that method takes the MapMode into account, point/size conversions are not the same anymore... Malte. Frank Schönheit - Sun Microsystems Germany wrote, On 08.04.08 15:27: > Hi Malte, > >> But I am not sure if I like to have two functions for the same thing - >> Size and Point are basically the same. > > Are they? Only "basically", or also effectively? > > That is, I seem to remember (not sure) that in the VCL world, converting > a Point will not yield the same result as converting a Size, at least > not in all cases. There was something with the scaling set at the > device's MapMode, or the offset at the device, or something like this ... > > Thus, I suggested to Lars to use different versions for Size and Point > in the UNO API, too. If you say this is not needed, then we should get > rid of it. > > Well, perhaps. Finally, it's also a question of convenience, as you say > yourself ... Having a Point/Size which needs to be converted would be > Point aPos( getSomePoint() ); > aPos.X = xDevice.convertToPixel( aPos.X, MapUnit ); > aPos.Y = xDevice.convertToPixel( aPos.Y, MapUnit ); > as opposed to > Point aPos( xDevice.convertPointToPixel( getSomePoint(), MapUnit ) ); > >> Conclusion might be to have a function using long, instead of >> point/size, but having two calls for one size/point conversion is also >> not nice. > > Will converting an X-value always yield the same result as converting > the same number as Y-value? That is: If I have, say, a "Size( 100, 100 > )", will the converted Size also have width=height? > At least in VCL, where the MapMode can have different Scale values for X > and Y, this would not be the case. > > Ciao > Frank > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
