The following code fragment creates a curve from an ellipse. The ellipse defines the dimensions of the curve. The elliptical arc is defined by the parameters 45 and 180 which are type GDegrees. In this code fragment, the elliptical arc moves from 45 degrees to 90 degrees. The elliptical arc always goes counterclockwise because sines and cosines are always counterclockwise. However, since the 2-D coordinate system has the y values pointing down, the arc goes clockwise to the person viewing the curve.
TGEllipse ellipse( TGRect( 10, 10, 225, 40 ) ); TGCurve ellipseCurve( ellipse, 45, 180 ); TFrameBundle aBundle( TRGBColor( 0, 0, 0), 5.0 ); thePort.Draw( ellipseCurve, aBundle );