Newer
Older
//draw the closest point
if (editionState==NewSubcurve)
// Points
glPointSize(5.0f);
glBegin(GL_POINTS);
if (joincurve_id == 0)
glVertex2f(editClosestPoint.v.x,editClosestPoint.v.y);
glEnd();
// draw the cursor cross
glLineWidth(1.5);
glBegin(GL_LINES);
if (editionState)
glColor4f(0.8f, 0.0f, 0.0f, 0.5f);
glColor4f(0.0f, 0.8f, 0.0f, 0.5f);
glColor4fv(OE_preferences::cursorColor.rgba);
}
glVertex2f(absMouse.x,-10000);
glVertex2f(absMouse.x,10000);
glVertex2f(-10000,absMouse.y);
glVertex2f(10000,absMouse.y);
glEnd();
// draw the cursor picking zone
glLineWidth(2);
glBegin(GL_LINE_LOOP);
glColor4fv(OE_preferences::cursorColor.rgba);
glVertex2f(absMouse.x-5*zoom,absMouse.y+5*zoom);
glVertex2f(absMouse.x-5*zoom,absMouse.y-5*zoom);
glVertex2f(absMouse.x+5*zoom,absMouse.y-5*zoom);
glVertex2f(absMouse.x+5*zoom,absMouse.y+5*zoom);
glEnd();
if (editionState == Selection)
{
vector_2d clicAbsMouse = viewPos+(clicOldMouse-vector_2d(width,height)/2)*zoom*2;
glBegin(GL_LINE_STRIP);
glColor4fv(OE_preferences::cursorColor.rgba);
glVertex2f(absMouse.x,clicAbsMouse.y);
glVertex2f(absMouse.x,absMouse.y);
glVertex2f(clicAbsMouse.x,absMouse.y);
glVertex2f(clicAbsMouse.x,clicAbsMouse.y);
glVertex2f(absMouse.x,clicAbsMouse.y);
return true;
}