You can use direct OpenGL to do it since you can specify a `vertex` (end point) color for every point (ie a color for the start of the line, and a color for the end of the line). It would be something like:
glShadeModel(GL_SMOOTH) ' make sure gauraud shading is on glBegin(GL_LINES) ' begin defining some lines glColor3b($FF,$FF,$FF) ' set the current end-point color to white glVertex2i(50,50) ' define the first end-point/vertex glColor3b($FF,$00,$00) ' set the current end-point color to red glVertex2i(200,100) ' define the second end-point to complete the line glEnd
This should draw a line that starts with white and blends gradually into red, for example. Also feel free to use glColor4b and include an extra ALPHA parameter - the line can fade out gradually.
Just beware that if you start adjusting OpenGL settings such as setting colors and switching the shade model, you might interfering with Max2D's assumptions.
|