Skip to content
Snippets Groups Projects
Commit 95c67436 authored by Chang Che Hao's avatar Chang Che Hao
Browse files

fix dot drawing issue

parent 9e5c888c
No related branches found
No related tags found
No related merge requests found
......@@ -268,10 +268,18 @@ public class DrawingArea extends JPanel implements MouseMotionListener, MouseLis
public void mouseReleased(MouseEvent e) {
IDrawingController drawingController = client.getDrawingController();
switch (currentMode) {
case FREEHAND:
if (startPoint.equals(previousPoint)) {
((Line2D) drawing).setLine(startPoint, startPoint);
g2.setColor(shapeColor);
g2.setStroke(lineStroke);
g2.draw(drawing);
}
break;
case OVAL:
case RECTANGLE:
case CIRCLE:
case FREEHAND:
case LINE:
g2.setColor(shapeColor);
// g2.fill(drawing); /// Uncomment the line to fill the shapes with color ///
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment