Drawing a line [SOLVED]

Started by Captain Mostly, Wed 24/08/2005 11:39:16

Previous topic - Next topic

Captain Mostly

Hello. I am interested to know if it is possible to make AGS draw lines.

Ultimatly I'd like to build a function which I could call e.g.

DrawLine(28,24,56,93);

Where the numbers are the a ad y values of the start and then end of the line I want on screen.

A single pixel width line would be fine, but I don't really know where to begin!

Is this possible??!?!

Rui 'Trovatore' Pires

QuoteRawDrawLine
RawDrawLine (int from_x, int from_y, int to_x, int to_y)

Draws a line from (FROM_X, FROM_Y) to (TO_X, TO_Y) in the current raw drawing colour.
Example:

RawDrawLine(0,0,160,100);

will draw a line from the left top of the screen (0,0) to the middle of the screen (160,100);
See Also: RawDrawCircle, RawDrawRectangle, RawDrawTriangle, RawSetColor

:=
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Captain Mostly


SMF spam blocked by CleanTalk