first commit
This commit is contained in:
BIN
CS2335/lab4/documents/NetPaintClasses.vsd
Normal file
BIN
CS2335/lab4/documents/NetPaintClasses.vsd
Normal file
Binary file not shown.
55
CS2335/lab4/documents/NetPaint_Protocol.txt
Normal file
55
CS2335/lab4/documents/NetPaint_Protocol.txt
Normal file
@@ -0,0 +1,55 @@
|
||||
The clients need to be able to know of the following happenings:
|
||||
|
||||
1. Their connection has been rejected by the server
|
||||
2. Another user has joined/dropped from the session
|
||||
3. The server wants to tell them of an error
|
||||
4. A user is sending a chat message
|
||||
5. A user has drawn something
|
||||
6. A user did an UNDO on something
|
||||
|
||||
SRVE - Server error. Rejection, drop, server quitting, etc. Format:
|
||||
SRVE: Message string
|
||||
|
||||
SRVM - Server message. New user, lost user, etc. Format:
|
||||
SRVM: Message string
|
||||
|
||||
HELO - User is joining the server. Format:
|
||||
HELO: username
|
||||
|
||||
QUIT - User is quitting the server gracefully. Format:
|
||||
QUIT: username
|
||||
|
||||
RECT - user is drawing a rectangle. Format:
|
||||
RECT:msgid:username:startX:startY:height:width:color:fill(y|n)
|
||||
|
||||
POLY - user is drawing a polygon. Format:
|
||||
RECT:msgid:username:color:fill(y|n):numpoints:x1:y1:x2:y2:...
|
||||
|
||||
TRIA - user is drawing a triangle. Format:
|
||||
TRIA:msgid:username:x1:y1:x2:y2:x3:y3:color:fill(y|n)
|
||||
|
||||
LINE - user is drawing a line. Format:
|
||||
LINE:msgid:username:startX:startY:rise:run:color
|
||||
|
||||
QUAD - User is drawing a quadratic curve. Format:
|
||||
QUAD:msgid:username:x1:y1:x2:y2:ctrlx:ctrly:color
|
||||
|
||||
ELIP - User is drawing an ellipse. Format:
|
||||
ELIP:msgid:username:startX:startY:height:width:color:fill(y|n)
|
||||
|
||||
TEXT - User is drawing text. Format:
|
||||
TEXT:msgid:username:startX:startY:size:color:font:text
|
||||
|
||||
IMAG - User is inserting an image. Format:
|
||||
IMAG:msgid:username:startX:startY:height:width:URL
|
||||
Note here that URL can be either a global URL, in which case we would download the image off the Internet, or just a filename, in which case the users would connect to the client that chose the image p2p and request a download.
|
||||
|
||||
UNDO - User is undoing an action. Format:
|
||||
UNDO:msgid:username:undoid
|
||||
undoid corresponds to the id of the message we want to undo.
|
||||
|
||||
CHAT - User is sending a chat message. Format:
|
||||
CHAT:username:text
|
||||
|
||||
|
||||
|
||||
50
CS2335/lab4/documents/NetPaint_TODO.txt
Normal file
50
CS2335/lab4/documents/NetPaint_TODO.txt
Normal file
@@ -0,0 +1,50 @@
|
||||
Bugs:
|
||||
|
||||
- Update the "Got client connection from" message to actually display a correct message.
|
||||
+ Send all clients a message when someone joins the server.
|
||||
+ Clean up messages!
|
||||
+ Put all the "magic" strings into a central class. (HELO, QUIT, etc)
|
||||
+ Take care of the magic number. (Same class as above.)
|
||||
+ put a static gettype(string) function into abstractmessage
|
||||
+ There is no way to get chat messages out of messagelist. Make one.
|
||||
+ If there is a colon as the last character in the message, my parse method doesn't work (chat, say) Same for colon being the first character...
|
||||
+ The content pane in chat panel doesn't scroll...
|
||||
+ HTML don't work. Do a styled document, like it says in the tutorial!
|
||||
+ Look into the problem of resizing the drawing canvas.
|
||||
+ Look into the problem of giving the color indicator some size.
|
||||
Look into the problem of loading resources.
|
||||
+ When right-clicking, the tool doesn't exactly set off... Instead, it just resets the first position to -1, -1, and remains active...
|
||||
+ Make it so that the textmessage stores the font parameters as actual bits of information, and only assembles the entire font when getFont is called. Otherwise, server gets fucked up.
|
||||
+ Make it so updateFont of font selection panel makes the graphics panel rerender.
|
||||
+ Test out this focus deal. Sometimes, the key presses may not register.
|
||||
+ Implement different cases for key presses in key tool - caret, arrows, backspace, esc.
|
||||
+ Pretty up text tool rendering - put a box around the text maybe?
|
||||
+ Test out the finalize button it may get fucked up sometimes.
|
||||
+ Make it so when one hits enter while entering text, not only is the message finalized, but also the font panel disables the finalize button.
|
||||
+ Implement processXMLElement and propertiesToXML for graphics messages and the chat message.
|
||||
+ There seems to be a bug in the isConnected method of Client.
|
||||
|
||||
|
||||
|
||||
Implemetation:
|
||||
|
||||
+ Draw rectangles
|
||||
+ Draw polygons
|
||||
+ Draw triangles
|
||||
+ Draw lines
|
||||
+ Draw Quadratic Curves
|
||||
+ Draw ellipses
|
||||
+ Insert Images
|
||||
+ Specify source
|
||||
+ Specify location
|
||||
+ Specify size
|
||||
+ Insert text
|
||||
+ Specify font
|
||||
+ Specify size
|
||||
+ Specify decorations (B, I, U)
|
||||
+ Save Session
|
||||
+ Load Session
|
||||
Super Undo
|
||||
+ Chat Smilies
|
||||
Help Screen
|
||||
Write Tooltips
|
||||
Reference in New Issue
Block a user