Changeset 209

Show
Ignore:
Timestamp:
08/18/2009 04:22:53 AM (13 months ago)
Author:
guyru
Message:

greatly simplfy the way pie slices are drawn

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/simple_pie_plot.cpp

    r208 r209  
    3838{ 
    3939        wxGraphicsPath path = dc->CreatePath(); 
    40         double x1 = x + r * cos(start_angle); 
    41         double y1 = y + r * sin(start_angle); 
    42         double x2 = x + r * cos(end_angle); 
    43         double y2 = y + r * sin(end_angle); 
    44  
     40        path.MoveToPoint(x,y); 
    4541        path.AddArc(x, y, r, start_angle, end_angle, true); 
    46         path.CloseSubpath(); 
    47  
    48         path.MoveToPoint(x,y); 
    49         path.AddLineToPoint(x1,y1); 
    50         path.AddLineToPoint(x2,y2); 
    51         path.CloseSubpath(); 
    52  
    5342        dc->DrawPath(path); 
    5443}