Changeset 209


Ignore:
Timestamp:
18/08/09 04:22:53 (4 years ago)
Author:
guyru
Message:

greatly simplfy the way pie slices are drawn

File:
1 edited

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} 
Note: See TracChangeset for help on using the changeset viewer.