int DrawLineTo(int dr, int x, int y);

 

Draws a line to the specified coordinates from the current pen position.

 

Return Value

 

Return value not used.

 

Parameters

 

dr

The handle to the Draw area where the line will be drawn.

 

x

The x coordinate of the line's end point.

 

y

The y coordinate of the line's end point.

 

Remarks

 

DrawLineTo() draws a line from the point specified in a prior call to DrawMoveTo() to the x and y coordinates supplied to the function. DrawLineTo() implicitly calls DrawMoveTo() with the coordinates supplied to the function.

 

Availability

 

Available in DragonFireSDK 1.3 and later.

 

Example

 

#include "DragonFireSDK.h"

 

int MyDraw;

 

void AppMain()

{  

  MyDraw = DrawAdd(0, 0, 320, 480);

  // Set up my draw colors and pen width...

  DrawSetColor(MyDraw, 0xFF0000);

  DrawSetFillColor(MyDraw, 0x00FF00FF);

  DrawSetPenWidth(MyDraw, 2);

  //Draw a line...

  DrawMoveTo(MyDraw, 10, 10);

  DrawLineTo(MyDraw, 20, 20);

  //Draw another line...

  DrawLine(MyDraw, 20, 20, 10, 20);

  //Draw a hollow circle...

  DrawCircle(MyDraw, 10, 50, 50, 50);

  //Draw a filled circle...

  DrawCircleFill(MyDraw, 10, 110, 50, 50);

  //Draw a hollow square...

  DrawSquare(MyDraw, 80, 50, 50, 50);

  //Draw a fillerd square...

  DrawSquareFill(MyDraw, 80, 110, 50, 50);

  //Draw an arc...

  DrawArc(MyDraw, 140, 75, 25, 0, 90);

}

 

void AppExit()

{

 

}

 

void OnTimer()

{

 

}