I am trying to implement the pen tool from Adobe Illustrator in OpenGL. I am trying to get the coordinates of the reverse tangent upon mouse release. I tried negating the coordinates I got upon mouse release but that doesn't seem to work.

[![enter image description here](https://i.stack.imgur.com/hO0lg.png)](https://i.stack.imgur.com/hO0lg.png)

```
void myMouse(int button, int state, int x, int y) {

int DirectionHandleX;
int DirectionHandleY;

// If left button was clicked
if (button == GLUT_LEFT_BUTTON && state == GLUT_DOWN) 
{
    drawDot(x, SCREEN_HEIGHT - y);
}
else if (button == GLUT_LEFT_BUTTON && state == GLUT_UP) 
{
    DirectionHandleX = x;
    DirectionHandleY = y;
    drawDot(DirectionHandleX, SCREEN_HEIGHT - DirectionHandleY);
}

```