[wx-dev] Fwd: CVS: [RD] wxWidgets/src/mac/carbon renderer.cpp, 1.34, 1.35

Stefan Csomor csomor at advancedconcepts.ch
Wed Nov 1 06:05:14 PST 2006


Hi 

> KO> Out of curiosity, are there any sort of rules about where the 
> KO> LogicalToDevice adjustments should be performed? Looking 
> in src/mac/ 
> KO> carbon/renderer.cpp, I see that other wxRendererNative 
> functions do 
> KO> the LogicalToRelative conversions internally, and I'm a bit 
> KO> concerned that the discrepancy could cause confusion down 
> the line. 
> KO> (In fact, in src/generic/treectlg.cpp, x and y are 
> adjusted values, 
> KO> while width and height are not.)
> 
>  The renderers are not supposed to perform the coordination 
> translation themselves, neither wxUniv nor wxMSW do it at 
> all. They do use the current coordinates system of the wxDC 
> they're passed, of course.
> 
>  It would certainly be a good idea to keep this true for all 
> platforms.

the native HITheme calls had to use the dc conversions to arrive at
device coordinates, because we don't draw on the dc, but on the
underlying graphics context. Up to now this context never was scaled,
nor translated, so these calls had to ask the dc for the correct device
coordinates.

In the core graphics case now the CGContext IS scaled and translated
properly, which makes things a lot easier.

Best,

Stefan




More information about the wx-dev mailing list