|
From: <sm...@us...> - 2009-09-16 07:54:11
|
Revision: 10416
http://plplot.svn.sourceforge.net/plplot/?rev=10416&view=rev
Author: smekal
Date: 2009-09-16 07:54:00 +0000 (Wed, 16 Sep 2009)
Log Message:
-----------
Implemented text clipping for wxDC backend.
Modified Paths:
--------------
trunk/drivers/wxwidgets_dc.cpp
Modified: trunk/drivers/wxwidgets_dc.cpp
===================================================================
--- trunk/drivers/wxwidgets_dc.cpp 2009-09-16 06:40:20 UTC (rev 10415)
+++ trunk/drivers/wxwidgets_dc.cpp 2009-09-16 07:54:00 UTC (rev 10416)
@@ -376,6 +376,17 @@
/* Calculate the font size (in pixels) */
fontSize = pls->chrht * VIRTUAL_PIXELS_PER_MM/scaley * 1.3;
+ /* Use PLplot core routine to get the corners of the clipping rectangle */
+ PLINT rcx[4], rcy[4];
+ difilt_clip(rcx, rcy);
+
+ wxPoint cpoints[4];
+ for( int i=0; i<4; i++ ) {
+ cpoints[i].x = rcx[i]/scalex;
+ cpoints[i].y = height-rcy[i]/scaley;
+ }
+ wxDCClipper clip( *m_dc, wxRegion(4, cpoints) );
+
/* calculate rotation of text */
plRotationShear( args->xform, &rotation, &shear, &stride );
rotation -= pls->diorot * M_PI / 2.0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|