Skip to content
Snippets Groups Projects
Commit 7a1d5044 authored by Hai HoDac's avatar Hai HoDac
Browse files

fixed dragging line stroke

uncomment all drawing relation methods
(EXCEPT the notifyUserDrawing)
parent 025629b0
No related branches found
No related tags found
1 merge request!42fixed dragging line stroke
......@@ -116,6 +116,7 @@ public class DrawingArea extends JPanel implements MouseMotionListener, MouseLis
/// Eraser has no border color ///
Color borderColor = currentMode != Mode.ERASE ? shapeColor : Color.WHITE;
g2.setColor(borderColor);
g2.setStroke(lineStroke);
g2.draw(drawing);
}
}
......
......@@ -34,7 +34,7 @@ public class DrawingController extends UnicastRemoteObject implements IDrawingCo
@Override
public boolean broadcastText(String fromClient, String text, Font font, Color color, Point startPoint) throws RemoteException {
System.out.print("Broadcasting drawing to everyone...");
// System.out.print("Broadcasting drawing to everyone...");
g2 = (Graphics2D) bufferedImage.getGraphics();
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
......@@ -55,7 +55,7 @@ public class DrawingController extends UnicastRemoteObject implements IDrawingCo
}
}
System.out.print("...DONE\n");
// System.out.print("...DONE\n");
return true;
}
......@@ -63,7 +63,7 @@ public class DrawingController extends UnicastRemoteObject implements IDrawingCo
@Override
public boolean broadcastDrawing(String fromClient, Shape drawing, String mode, Color color, int strokeSize) throws RemoteException {
System.out.print("Broadcasting drawing to everyone...");
// System.out.print("Broadcasting drawing to everyone...");
g2 = (Graphics2D) bufferedImage.getGraphics();
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
......@@ -97,13 +97,13 @@ public class DrawingController extends UnicastRemoteObject implements IDrawingCo
}
}
System.out.print("...DONE\n");
// System.out.print("...DONE\n");
return true;
}
public boolean broadcastDraggingDrawing(String fromClient, Shape drawing, String mode, Color color, int strokeSize) throws RemoteException {
System.out.print("Broadcasting dragging drawing to everyone...");
// System.out.print("Broadcasting dragging drawing to everyone...");
g2 = (Graphics2D) bufferedImage.getGraphics();
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
......@@ -137,13 +137,13 @@ public class DrawingController extends UnicastRemoteObject implements IDrawingCo
}
}
System.out.print("...DONE\n");
// System.out.print("...DONE\n");
return true;
}
public boolean broadcastClearCanvas(String fromClient) throws RemoteException {
System.out.print("Broadcasting canvas clearance to everyone...");
// System.out.print("Broadcasting canvas clearance to everyone...");
IDrawingUpdate client;
......@@ -159,7 +159,7 @@ public class DrawingController extends UnicastRemoteObject implements IDrawingCo
}
}
System.out.print("...DONE\n");
// System.out.print("...DONE\n");
return true;
}
......@@ -178,7 +178,7 @@ public class DrawingController extends UnicastRemoteObject implements IDrawingCo
public boolean broadcastUpdateImage(String fromClient) throws RemoteException {
System.out.print("Broadcasting new image loading to everyone...");
// System.out.print("Broadcasting new image loading to everyone...");
try {
......@@ -206,7 +206,7 @@ public class DrawingController extends UnicastRemoteObject implements IDrawingCo
err.printStackTrace();
}
System.out.print("...DONE\n");
// System.out.print("...DONE\n");
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment