From: <sm...@us...> - 2008-06-16 13:40:11
|
Revision: 8479 http://plplot.svn.sourceforge.net/plplot/?rev=8479&view=rev Author: smekal Date: 2008-06-16 06:40:08 -0700 (Mon, 16 Jun 2008) Log Message: ----------- Fixed a text placement bug in wxGraphicsContext backend. Modified Paths: -------------- trunk/drivers/wxwidgets.cpp trunk/drivers/wxwidgets_gc.cpp Modified: trunk/drivers/wxwidgets.cpp =================================================================== --- trunk/drivers/wxwidgets.cpp 2008-06-16 09:47:38 UTC (rev 8478) +++ trunk/drivers/wxwidgets.cpp 2008-06-16 13:40:08 UTC (rev 8479) @@ -383,7 +383,8 @@ /* initialize device storage */ if( pls->xlength <= 0 || pls->ylength <=0 ) - plspage( 0.0, 0.0, (PLINT)(CANVAS_WIDTH*DEVICE_PIXELS_PER_IN), (PLINT)(CANVAS_HEIGHT*DEVICE_PIXELS_PER_IN), 0, 0 ); + plspage( 0.0, 0.0, (PLINT)(CANVAS_WIDTH*DEVICE_PIXELS_PER_IN), + (PLINT)(CANVAS_HEIGHT*DEVICE_PIXELS_PER_IN), 0, 0 ); dev->width=pls->xlength; dev->height=pls->ylength; Modified: trunk/drivers/wxwidgets_gc.cpp =================================================================== --- trunk/drivers/wxwidgets_gc.cpp 2008-06-16 09:47:38 UTC (rev 8478) +++ trunk/drivers/wxwidgets_gc.cpp 2008-06-16 13:40:08 UTC (rev 8479) @@ -354,9 +354,9 @@ wxGraphicsMatrix matrix=m_context->CreateMatrix( cos_rot, -sin_rot, cos_rot * sin_shear + sin_rot * cos_shear, -sin_rot * sin_shear + cos_rot * cos_shear, - args->x/scalex-args->just*textWidth, - height-args->y/scaley-0.5*textHeight ); + args->x/scalex, height-args->y/scaley ); m_context->SetTransform( matrix ); + m_context->Translate( -args->just*textWidth, -0.5*textHeight ); PSDrawText( args->unicode_array, args->unicode_array_len, true ); m_context->PopState(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |