ProcessingTeam
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Project Features and Requirements > Processing Team ### Team Members * Sakshi Rathore * Ahmed Zaheer Dadarkar * Rakesh Kumar * Himanshu Jain * Shruti Umat * Satchit Desai * Devansh Singh Rathore ### Features #### Menu bar * shapes * rotate objects * insert text box * coloured brushes - various sizes * an eraser - various sizes * import an image in the board * a chat and video window * disable the options in UI which are not accessible to user #### File Options * save, download, import and export a sheet #### Edit options * crop * zoom * redo-undo option which will be user specific * clear my work (display warning) #### Admin privileges * clear full screen (display warning) * select resolution * give permissions to users * enable/disable autosave * select screen (portrait or landscape) #### Managing multiple users * status of each user - online/offline * tag the cursor position of each user with username * share sheet with multiple users - option to restrict users to only view or edit modes #### Other * Autosave #### Advancements * Layers * DIP techniques * Multiple pages ### Project Requirements ```java // Abstraction of different Id's used. // These Id's are generated using a pseudo-Random generator from 'Java.util.Random'. class SetUserId{ UserId setUserId(); }; class SetSheetId{ SheetId setSheetId(); }; class SetObjectId{ ObjectId setObjectId(); }; class SetTextBoxId{ TextBoxId setTextBoxId(); }; class SetShapeId{ ShapeId setShapeId(); }; ``` #### Menu bar modules ```java // pixel position class Point { int row, column; }; // pixel intensity class Intensity { int red, green, blue; }; // object is referred as group of pixels, and its meta data. class Object_ { Map<Point, Intensity> posnToAction; time timestamp; UserId userId; ObjectId objectId; }; // overload == operator for Object above enum Status {ONLINE, OFFLINE}; enum Permission (VIEW,EDIT,EDIT_AND_SHARE); // storing objects, text-boxes, users Id's and their permission in a sheet. class GlobalState { SheetId sheetId; UserId admin; WindowType screenOrientation; Map<UserId, Permission> usersPermission; Set<Object_> setOfObjects; Set<TextBox> setOfTextBoxes; }; ``` * shapes ```java // pre-defined shapes eg. circle, triangle, etc. class Shape { public ShapeId addShape(); public Object_ shapeToObject(); }; // addShape() and shapeToObject() of class Shape are overidden by concrete classes below class Rectangle extends Shape { @Override public ShapeId addShape(Point topLeft, Point bottomRight); public Object_ shapeToObject(); }; class Circle extends Shape { @Override public ShapeId addShape(Point center, float radius); public Object_ shapeToObject(); }; class Triangle extends Shape { @Override public ShapeId addShape(Point p1, Point p2, Point p3); public Object_ shapeToObject(); }; // UI first creates a shape, calls shapeToObject() to get an ObjectId and finally calls addObject() // pixelsToObject() and imageToObject() will also use addObject to insert their objects into the Global state public void addObject(Object_ o); public void deleteObject(ObectId objectId, UserId userId); public void resizeObject(ObjectId objectId, UserId userId, float scalingFactorX, float scalingFactorY); // Only horizontal, vertical translation public void moveObject(ObjectId objectId, UserId userId, int translationFactorX, int translationFactorY); // Rotates object about its center by given angle (in radians) in CW direction public void rotateObject(ObjectId objectId, UserId userId, float angleCW); ``` * Text Box ```java // stores font information of each individual character in a text box. class TextInfo { char c; String fontName; int fontSize; boolean bold, italics, underline; }; // stores text and other meta information of a text box. class TextBox { UserId userId; TextBoxId textBoxId; Point topLeftCorner; int width, height; time timestamp; Vector <TextInfo> text; }; public TextBoxId insertTextBox(Point topLeftCorner, int width, int height, UserId userId); public void deleteTextBox(TextBoxId textBoxId, UserId userId); public void editTextBox(TextBoxId textBoxId, String text, String fontName, int fontSize, boolean bold, boolean italic, boolean underline, UserId userId, int lIndex, int rIndex); public void resizeTextBox(TextBoxId textBoxId, UserId userId, Point topLeftCorner, int width, int height); // move and rotate may be combined public void moveTextBox(TextBoxId textBoxId, UserId userId, Point topLeftCorner); public void rotateTextBox(TextBoxId textBoxId, UserId userId, Point topLeftCorner); ``` * Brushes ```java public ObjectId pixelsToObject(Vector<Point> pixelPositions, Vector <Intensity> rgbValues, UserId userId); ``` * Erase ```java public void erase(Vector<Point> pixelPositions, UserId userId); ``` * Import an image in the board ```java public ObjectId imageToObject(Vector<Vector<Intensity>> imageMatrix, UserId userId); ``` #### File Options ```java class Node { Object_ obj; Node prev, next; }; // used for undo - redo operations class ModifyOp { UserId userId; const int maxOp; Node head, tail, curr; } // state of the whiteboard (2D matrix) // there are two states -> current state of each user // and common saved state class UserState { UserId userId; Vector<Object_> objects; Vector<TextBox> textBoxes; }; ``` * save: save current users objects into server objects ```java void save(void); ``` * download: download saved global state into user's system in a compressed file format with .kk extension ```java // return codes: - // 0: successful // 1: permission error // 2: invalid path // 3: invalid extension (.kk) int download(String filePath); ``` * import: import a .kk compressed global state file from user's system to the whiteboard ```java // return codes: - // 0: successful // 1: permission error // 2: invalid path // 3: invalid extension (.kk) // 4: file invalid (no magic number) int importState(String filePath) ``` * export: export the saved global state of the whiteboard to the user's system in the requested file format ```java enum Extension {PDF, JPG, JPEG, PNG, KK}; // return codes: - // 0: successful // 1: permission error // 2: invalid path int export(String path, Extension ext); ``` * crop: mask all objects with a part outside rectangle with white (255) ```java void crop(Point topLeft, Point bottomRight); ``` * undo: undo the last operation performed ```java // true: operation successful // false: operation unsuccessful (deque was empty) Bool undo(void); ``` * redo: redo the last undone operation ```java // true: operation successful // false: operation unsuccessful (head == curr) Bool redo(void); ``` * clear work: delete all objects of current user and clear operation linked list -> this operation cannot be undone Very Imp: Must give warning before ```java // true: operation successful // false: operation unsuccessful (permission denied) Bool resetState(void); ``` #### Admin privileges ```java // For listening of the events such as any feature selected or clicked which takes the event e as the argument which contains the information about the clicked button. class EventListner { void clickEvent(Event e); } ``` ```java // if the admin clicks the clear screen button then this api will be called which will set the pixel value of all the pixels to 255(white). void clrScreen(); ``` ```java // In starting Admin can choose the orientation of the window and this api will set the global variable screenOrientation to the chosen orientation of the window. enum WindowType {PORTRAIT,LANDSCAPE}; ``` ```java enum Status {ONLINE, OFFLINE}; enum Permission {VIEW,EDIT,EDIT_AND_SHARE}; class User{ UserId userId; Status status; } void setAutosaveOn(Duration duration); // Will set the autosave feature to on or off. void setAutoSaveOff(); void setOrientation(windowType orientation); void setPermission(UserId userId, Permission permission); // setPermission will grant user the Permission. ``` #### Managing Multiple users ```java // setAllUserStatus can be called by UI, it takes the a map containing the status of each user for the given sheet. void setAllUserStatus(Map<UserId, Permission> status, int sheet); // updateUserStatus can be called by UI, to change the status of only one user in the sheet. void updateUserStatus(UserId userId, Permission status, int sheet); ``` ```java // returns the coordinates of each user in the given sheet. Map<UserId, Point> getAllUserPosition(SheetId sheetId); // return the coordinates of one user in the given sheet Point getUserPosition(UserId userId, SheetId sheetId); ``` version 0: * draw using brush * erase * draw shapes version 1: * undo * redo * select and delete version 2: * display user name corresponding to each obj * stitching the fragments

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully