{
  "id": "fn-kanvas-rectangle",
  "dataComponent": "kanvas",
  "heading": {
    "title": "rectangle",
    "badges": ["Kanvas"]
  },
  "synopsis": "Draws a filled rectangle between two corner points.",
  "codeBlocks": [
    "extend(\"kanvas\")\n\nwin = kanvas:create([ width:400, height:300 ])\nkanvas:display(win)\n\nkanvas:rectangle(win, [[10,15],[100,60]], \"#FF0000\")  # draws red rectangle\n"
  ],
  "notes": [
    "Arguments:",
    "- Window handle",
    "- Two-element array: [[x0, y0], [x1, y1]] (top-left and bottom-right corners)",
    "- Color string (e.g. '#FF0000' for red)",
    "Draws a filled rectangle. Coordinates must be within window bounds."
  ]
}
