- added Screen.DrawThickLine for drawing lines with thickness
This commit is contained in:
parent
e428f6948e
commit
ea81ab4097
5 changed files with 63 additions and 0 deletions
|
|
@ -1088,6 +1088,24 @@ DEFINE_ACTION_FUNCTION(_Screen, DrawLine)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void DFrameBuffer::DrawThickLine(int x0, int y0, int x1, int y1, double thickness, uint32_t realcolor) {
|
||||
m2DDrawer.AddThickLine(x0, y0, x1, y1, thickness, realcolor);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_Screen, DrawThickLine)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(x0);
|
||||
PARAM_INT(y0);
|
||||
PARAM_INT(x1);
|
||||
PARAM_INT(y1);
|
||||
PARAM_FLOAT(thickness);
|
||||
PARAM_INT(color);
|
||||
if (!screen->HasBegun2D()) ThrowAbortException(X_OTHER, "Attempt to draw to screen outside a draw function");
|
||||
screen->DrawThickLine(x0, y0, x1, y1, thickness, color);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Draw a single pixel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue