{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cloudmersive/json-schema/cloudmersive-draw-polygon-request-schema.json",
  "title": "DrawPolygonRequest",
  "description": "Request to draw one or more polygons on a base image",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cloudmersive-edit-api-openapi.yml#/components/schemas/DrawPolygonRequest",
  "type": "object",
  "properties": {
    "BaseImageBytes": {
      "format": "byte",
      "description": "Image to draw polygons on, in bytes.  You can also use the BaseImageUrl instead to supply image input as a URL",
      "type": "string"
    },
    "BaseImageUrl": {
      "description": "Image to draw polygons on, as an HTTP or HTTPS fully-qualified URL",
      "type": "string"
    },
    "PolygonsToDraw": {
      "description": "Polygons to draw on the image.  Polygons are drawn in index order.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/DrawPolygonInstance"
      }
    }
  },
  "$defs": {
    "DrawPolygonInstance": {
      "description": "Polygon instance to draw on an image",
      "type": "object",
      "properties": {
        "BorderColor": {
          "description": "Border Color to use - can be a hex value (with #) or HTML common color name.  Transparent colors are supported.",
          "type": "string"
        },
        "BorderWidth": {
          "format": "double",
          "description": "Width in pixels of the border.  Pass in 0 to draw a polygon with no border",
          "type": "number"
        },
        "FillColor": {
          "description": "Fill Color to use - can be a hex value (with #) or HTML common color name.  Transparent colors are supported.  Leave blank to not fill the polygon.",
          "type": "string"
        },
        "Points": {
          "description": "Points (vertices) which comprise the polygon; valid polygons must have at least 3 points",
          "type": "array",
          "items": {
            "$ref": "#/$defs/PolygonPoint"
          }
        }
      }
    },
    "PolygonPoint": {
      "description": "One point in a polygon",
      "type": "object",
      "properties": {
        "X": {
          "format": "double",
          "description": "X location in pixels of this point in the polygon",
          "type": "number"
        },
        "Y": {
          "format": "double",
          "description": "Y location in pixels of this point in the polygon",
          "type": "number"
        }
      }
    }
  }
}