"""
{
  "type": "excalidraw",
  "version": 2,
  "source": "https://excalidraw.com",
  "elements": [
    {
      "id": "QqIn77W5ll9zkkRLzlBci",
      "type": "rectangle",
      "x": 600,
      "y": 258.6000061035156,
      "width": 59.20001220703125,
      "height": 52.79998779296875,
      "angle": 0,
      "strokeColor": "#1e1e1e",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "aA",
      "roundness": {
        "type": 3
      },
      "seed": 277162171,
      "version": 16,
      "versionNonce": 659579829,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1727827149595,
      "link": null,
      "locked": false
    },
    {
      "id": "YwQTYewEJtibEmEShJL6P",
      "type": "rectangle",
      "x": 688.7999877929688,
      "y": 257.8000183105469,
      "width": 54.4000244140625,
      "height": 56.79998779296875,
      "angle": 0,
      "strokeColor": "#2f9e44",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "aB",
      "roundness": {
        "type": 3
      },
      "seed": 2112870613,
      "version": 30,
      "versionNonce": 1129027643,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1727827147086,
      "link": null,
      "locked": false
    },
    {
      "id": "uiFImXZAeO7lpycZOIX6M",
      "type": "rectangle",
      "x": 773.6000366210938,
      "y": 261,
      "width": 52.79998779296875,
      "height": 53.600006103515625,
      "angle": 0,
      "strokeColor": "#e03131",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 4,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 70,
      "groupIds": [],
      "frameId": null,
      "index": "aC",
      "roundness": {
        "type": 3
      },
      "seed": 2100891349,
      "version": 22,
      "versionNonce": 57247957,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1727827143517,
      "link": null,
      "locked": false
    },
    {
      "id": "v6gDNBZnTmlcvgljd_etC",
      "type": "rectangle",
      "x": 599.2000122070312,
      "y": 354.6000061035156,
      "width": 53.5999755859375,
      "height": 60,
      "angle": 0,
      "strokeColor": "#1971c2",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "dashed",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "aD",
      "roundness": {
        "type": 3
      },
      "seed": 790666741,
      "version": 23,
      "versionNonce": 784208731,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1727827152522,
      "link": null,
      "locked": false
    },
    {
      "id": "Tmgjsc_0SrzVD0xRBNMHj",
      "type": "rectangle",
      "x": 697.6000366210938,
      "y": 349.8000183105469,
      "width": 44.79998779296875,
      "height": 61.5999755859375,
      "angle": 0,
      "strokeColor": "#f08c00",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "dashed",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "aE",
      "roundness": {
        "type": 3
      },
      "seed": 738325499,
      "version": 22,
      "versionNonce": 441082165,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1727827154690,
      "link": null,
      "locked": false
    },
    {
      "id": "gmeiz3lmtZLWHoBY5hu5P",
      "type": "rectangle",
      "x": 789.6000366210938,
      "y": 355.3999938964844,
      "width": 48,
      "height": 59.20001220703125,
      "angle": 0,
      "strokeColor": "#e03131",
      "backgroundColor": "#ffc9c9",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "dotted",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "aF",
      "roundness": {
        "type": 3
      },
      "seed": 1480005045,
      "version": 18,
      "versionNonce": 861105467,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1727827162915,
      "link": null,
      "locked": false
    },
    {
      "id": "dfYa0a6U19JmD6zJ2gHwG",
      "type": "rectangle",
      "x": 598.4000244140625,
      "y": 452.20001220703125,
      "width": 54.39996337890625,
      "height": 57.600006103515625,
      "angle": 0,
      "strokeColor": "#e03131",
      "backgroundColor": "#a5d8ff",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "dotted",
      "roughness": 0,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "aG",
      "roundness": {
        "type": 3
      },
      "seed": 1566493653,
      "version": 18,
      "versionNonce": 606900565,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1727827165475,
      "link": null,
      "locked": false
    },
    {
      "id": "57pzMFcCL9rsc-_Q2Dz81",
      "type": "rectangle",
      "x": 694.4000244140625,
      "y": 448.20001220703125,
      "width": 56,
      "height": 64,
      "angle": 0,
      "strokeColor": "#e03131",
      "backgroundColor": "#b2f2bb",
      "fillStyle": "cross-hatch",
      "strokeWidth": 1,
      "strokeStyle": "dotted",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "aH",
      "roundness": null,
      "seed": 641238907,
      "version": 24,
      "versionNonce": 898577781,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1727827171371,
      "link": null,
      "locked": false
    },
    {
      "id": "beCzspGb4kHNJLutyyBKf",
      "type": "rectangle",
      "x": 776.7999877929688,
      "y": 453.8000183105469,
      "width": 66.4000244140625,
      "height": 63.199981689453125,
      "angle": 0,
      "strokeColor": "#e03131",
      "backgroundColor": "#ffec99",
      "fillStyle": "hachure",
      "strokeWidth": 1,
      "strokeStyle": "dotted",
      "roughness": 2,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "aI",
      "roundness": {
        "type": 3
      },
      "seed": 866486875,
      "version": 20,
      "versionNonce": 50900379,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1727827175315,
      "link": null,
      "locked": false
    },
    {
      "id": "gVrJlaIJLukKyC0Xr5v-2",
      "type": "rectangle",
      "x": 588,
      "y": 565.800048828125,
      "width": 65.60003662109375,
      "height": 69.5999755859375,
      "angle": 0,
      "strokeColor": "#e03131",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "dotted",
      "roughness": 2,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "aJ",
      "roundness": null,
      "seed": 1621277237,
      "version": 18,
      "versionNonce": 213013237,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1727827176882,
      "link": null,
      "locked": false
    },
    {
      "id": "vSe1cMRuCHtguLNrEzLiP",
      "type": "rectangle",
      "x": 709.6000366210938,
      "y": 563.4000244140625,
      "width": 57.5999755859375,
      "height": 80,
      "angle": 0,
      "strokeColor": "#e03131",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "dotted",
      "roughness": 2,
      "opacity": 50,
      "groupIds": [],
      "frameId": null,
      "index": "aK",
      "roundness": null,
      "seed": 38715163,
      "version": 23,
      "versionNonce": 951624667,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1727827139783,
      "link": null,
      "locked": false
    }
  ],
  "appState": {
    "gridSize": 20,
    "gridStep": 5,
    "gridModeEnabled": false,
    "viewBackgroundColor": "#ffffff"
  },
  "files": {}
}
"""


i want to design an api that let me programmatically draw and output excalidraw file.
above is an example excalidraw file that contains rectangles only with different properties:
stroke color, background color, stroke width, stroke style(line, dot etc), stroke sloppiness(not sloppy, spread etc), edge type (round, not round), opacity
now implement a class that allows drawing rectangle with varying properties.