Lines

A line defines segments that are defined by two endpoints with an implied direction that moves from the start point to the endpoint.

TLine DragPosition GetPoints SetEndPoint
Evaluate GetStartPoint SetStartPoint
GetEndPoint NearestParametric

Figure 36 shows a black line drawn between the points TGPoint(10, 10) and TGPoint(125, 160). The lighter line shows the line after its endpoint has been moved to TGPoint(125, 40.


The following code creates the line and moves its endpoint.

    TGrafBundle* aBundle = new TGrafBundle( TFrameBundle( TRGBColor( 0, 0, 0), 5.0 ) ); TLine aLine( TGLine( TGPoint( 10, 10 ), TGPoint( 125, 40 ) ), aBundle ); aLine.Draw( thePort ); aLine.SetEndPoint( TGPoint( 125, 160 ) ); aLine.Draw( thePort );

[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker