Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Captain Mostly on Wed 24/08/2005 11:39:16

Title: Drawing a line [SOLVED]
Post by: Captain Mostly on Wed 24/08/2005 11:39:16
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??!?!
Title: Re: Drawing a line
Post by: Rui 'Trovatore' Pires on Wed 24/08/2005 11:41:52
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

:=
Title: Re: Drawing a line
Post by: Captain Mostly on Wed 24/08/2005 11:50:41
D'OH!!! sorry...  :-[