+ Translate(x,y);
+ Rotate( -angle );
+ DrawText( str , 0, 0 );
+ Rotate( angle );
+ Translate(-x,-y);
+}
+
+void
+wxGraphicsContext::DoDrawFilledText(const wxString &str,
+ wxDouble x,
+ wxDouble y,
+ const wxGraphicsBrush& backgroundBrush)
+{
+ wxGraphicsBrush formerBrush = m_brush;
+ wxGraphicsPen formerPen = m_pen;
+ wxDouble width;
+ wxDouble height;
+ wxDouble descent;
+ wxDouble externalLeading;
+ GetTextExtent( str , &width, &height, &descent, &externalLeading );
+ SetBrush( backgroundBrush );
+ // to make sure our 'OffsetToPixelBoundaries' doesn't move the fill shape
+ SetPen( wxNullGraphicsPen );
+
+ DrawRectangle(x , y, width, height);
+
+ DrawText( str, x ,y);
+ SetBrush( formerBrush );
+ SetPen( formerPen );
+}
+
+void
+wxGraphicsContext::DoDrawRotatedFilledText(const wxString &str,
+ wxDouble x, wxDouble y,
+ wxDouble angle,
+ const wxGraphicsBrush& backgroundBrush)
+{
+ wxGraphicsBrush formerBrush = m_brush;
+ wxGraphicsPen formerPen = m_pen;
+
+ wxDouble width;
+ wxDouble height;
+ wxDouble descent;
+ wxDouble externalLeading;
+ GetTextExtent( str , &width, &height, &descent, &externalLeading );
+ SetBrush( backgroundBrush );
+ // to make sure our 'OffsetToPixelBoundaries' doesn't move the fill shape
+ SetPen( wxNullGraphicsPen );
+
+ wxGraphicsPath path = CreatePath();
+ path.MoveToPoint( x , y );
+ path.AddLineToPoint( (int) (x + sin(angle) * height) , (int) (y + cos(angle) * height) );
+ path.AddLineToPoint(
+ (int) (x + sin(angle) * height + cos(angle) * width) ,
+ (int) (y + cos(angle) * height - sin(angle) * width));
+ path.AddLineToPoint((int) (x + cos(angle) * width) , (int) (y - sin(angle) * width) );
+ FillPath( path );
+ DrawText( str, x ,y, angle);
+ SetBrush( formerBrush );
+ SetPen( formerPen );
+}