(Formerly known as RawDrawLine, which is now obsolete)
DrawingSurface.DrawLine(int from_x, int from_y, int to_x, int to_y,
optional int thickness)
Draws a line from (FROM_X, FROM_Y) to (TO_X, TO_Y) in the surface's current drawing colour.
The thickness parameter allows you to specify how thick the line is, the default being 1 pixel.
NOTE: The X and Y co-ordinates given are ROOM co-ordinates, not SCREEN co-ordinates.
This means that in a scrolling room you can draw outside the current visible area.
Example:
DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
surface.DrawingColor = 14;
surface.DrawLine(0, 0, 160, 100);
surface.Release();
will draw a line from the left top of the screen (0,0) to the middle of the screen (160,100);
See Also: DrawingSurface.DrawCircle,
DrawingSurface.DrawRectangle,
DrawingSurface.DrawTriangle,
DrawingSurface.DrawingColor
|