From: <hez...@us...> - 2011-08-03 23:11:36
|
Revision: 11849 http://plplot.svn.sourceforge.net/plplot/?rev=11849&view=rev Author: hezekiahcarty Date: 2011-08-03 23:11:30 +0000 (Wed, 03 Aug 2011) Log Message: ----------- Fix arc rotation for Cairo devices Modified Paths: -------------- trunk/drivers/cairo.c trunk/include/plplotP.h trunk/src/plarc.c Modified: trunk/drivers/cairo.c =================================================================== --- trunk/drivers/cairo.c 2011-08-03 20:38:11 UTC (rev 11848) +++ trunk/drivers/cairo.c 2011-08-03 23:11:30 UTC (rev 11849) @@ -1546,7 +1546,7 @@ { PLCairo *aStream; double x, y, a, b; - double angle1, angle2; + double angle1, angle2, rotate; set_current_context( pls ); @@ -1561,6 +1561,7 @@ // Degrees to radians angle1 = arc_info->angle1 * M_PI / 180.0; angle2 = arc_info->angle2 * M_PI / 180.0; + rotate = arc_info->rotate * M_PI / 180.0; cairo_save( aStream->cairoContext ); @@ -1570,6 +1571,7 @@ // Make sure the arc is properly shaped and oriented cairo_save( aStream->cairoContext ); cairo_translate( aStream->cairoContext, x, y ); + cairo_rotate( aStream->cairoContext, rotate ); cairo_scale( aStream->cairoContext, a, b ); cairo_arc( aStream->cairoContext, 0.0, 0.0, 1.0, angle1, angle2 ); if ( arc_info->fill ) Modified: trunk/include/plplotP.h =================================================================== --- trunk/include/plplotP.h 2011-08-03 20:38:11 UTC (rev 11848) +++ trunk/include/plplotP.h 2011-08-03 23:11:30 UTC (rev 11849) @@ -1036,6 +1036,7 @@ PLFLT b; PLFLT angle1; PLFLT angle2; + PLFLT rotate; PLBOOL fill; } arc_struct; Modified: trunk/src/plarc.c =================================================================== --- trunk/src/plarc.c 2011-08-03 20:38:11 UTC (rev 11848) +++ trunk/src/plarc.c 2011-08-03 23:11:30 UTC (rev 11849) @@ -134,6 +134,7 @@ arc_info->angle1 = angle1; arc_info->angle2 = angle2; + arc_info->rotate = rotate; arc_info->fill = fill; plP_esc( PLESC_ARC, arc_info ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |