Polotno Docs

LineElement

Documentation for the LineElement schema definition in the Polotno Design JSON Schema.

LineElement

Type Information

Base Type: object

Properties

PropertyTypeDescription
alwaysOnTopbooleanWhether element stays on top of others.
animationsArray<Animation>Animation configurations.
blurEnabledbooleanWhether blur effect is enabled.
blurRadiusnumberBlur radius in pixels.
brightnessnumberBrightness level (-1 to 1).
brightnessEnabledbooleanWhether brightness effect is enabled.
colorstringLine color.
contentEditablebooleanWhether element content can be edited.
customunknownCustom data attached to the element.
dashArray<number>Dash pattern array for dashed lines.
draggablebooleanWhether element can be dragged.
endHeadstringEnd arrow head type: empty, arrow, circle, square, bar.
filtersobjectApplied image filters.
grayscaleEnabledbooleanWhether grayscale effect is enabled.
heightnumberHeight in pixels.
idstringUnique identifier for the element.
namestringDisplay name for the element.
opacitynumberOpacity level (0-1).
resizablebooleanWhether element can be resized.
rotationnumberRotation angle in degrees.
selectablebooleanWhether element can be selected.
sepiaEnabledbooleanWhether sepia effect is enabled.
shadowBlurnumberShadow blur radius in pixels.
shadowColorstringShadow color.
shadowEnabledbooleanWhether shadow is enabled.
shadowOffsetXnumberShadow horizontal offset in pixels.
shadowOffsetYnumberShadow vertical offset in pixels.
shadowOpacitynumberShadow opacity (0-1).
showInExportbooleanWhether element appears in exports.
startHeadstringStart arrow head type: empty, arrow, circle, square, bar.
styleEditablebooleanWhether element style can be edited.
type"line"Element type identifier.
visiblebooleanWhether element is visible.
widthnumberWidth in pixels.
xnumberX position in pixels.
ynumberY position in pixels.

JSON Schema

{
  "additionalProperties": false,
  "properties": {
    "alwaysOnTop": {
      "description": "Whether element stays on top of others.",
      "type": "boolean"
    },
    "animations": {
      "description": "Animation configurations.",
      "items": {
        "$ref": "#/definitions/Animation"
      },
      "type": "array"
    },
    "blurEnabled": {
      "description": "Whether blur effect is enabled.",
      "type": "boolean"
    },
    "blurRadius": {
      "description": "Blur radius in pixels.",
      "type": "number"
    },
    "brightness": {
      "description": "Brightness level (-1 to 1).",
      "type": "number"
    },
    "brightnessEnabled": {
      "description": "Whether brightness effect is enabled.",
      "type": "boolean"
    },
    "color": {
      "description": "Line color.",
      "type": "string"
    },
    "contentEditable": {
      "description": "Whether element content can be edited.",
      "type": "boolean"
    },
    "custom": {
      "description": "Custom data attached to the element."
    },
    "dash": {
      "description": "Dash pattern array for dashed lines.",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "draggable": {
      "description": "Whether element can be dragged.",
      "type": "boolean"
    },
    "endHead": {
      "description": "End arrow head type: empty, arrow, circle, square, bar.",
      "type": "string"
    },
    "filters": {
      "additionalProperties": {
        "additionalProperties": false,
        "properties": {
          "intensity": {
            "description": "Filter intensity value (-1 to 1).",
            "type": "number"
          }
        },
        "required": [
          "intensity"
        ],
        "type": "object"
      },
      "description": "Applied image filters.",
      "type": "object"
    },
    "grayscaleEnabled": {
      "description": "Whether grayscale effect is enabled.",
      "type": "boolean"
    },
    "height": {
      "description": "Height in pixels.",
      "type": "number"
    },
    "id": {
      "description": "Unique identifier for the element.",
      "type": "string"
    },
    "name": {
      "description": "Display name for the element.",
      "type": "string"
    },
    "opacity": {
      "description": "Opacity level (0-1).",
      "type": "number"
    },
    "resizable": {
      "description": "Whether element can be resized.",
      "type": "boolean"
    },
    "rotation": {
      "description": "Rotation angle in degrees.",
      "type": "number"
    },
    "selectable": {
      "description": "Whether element can be selected.",
      "type": "boolean"
    },
    "sepiaEnabled": {
      "description": "Whether sepia effect is enabled.",
      "type": "boolean"
    },
    "shadowBlur": {
      "description": "Shadow blur radius in pixels.",
      "type": "number"
    },
    "shadowColor": {
      "description": "Shadow color.",
      "type": "string"
    },
    "shadowEnabled": {
      "description": "Whether shadow is enabled.",
      "type": "boolean"
    },
    "shadowOffsetX": {
      "description": "Shadow horizontal offset in pixels.",
      "type": "number"
    },
    "shadowOffsetY": {
      "description": "Shadow vertical offset in pixels.",
      "type": "number"
    },
    "shadowOpacity": {
      "description": "Shadow opacity (0-1).",
      "type": "number"
    },
    "showInExport": {
      "description": "Whether element appears in exports.",
      "type": "boolean"
    },
    "startHead": {
      "description": "Start arrow head type: empty, arrow, circle, square, bar.",
      "type": "string"
    },
    "styleEditable": {
      "description": "Whether element style can be edited.",
      "type": "boolean"
    },
    "type": {
      "const": "line",
      "description": "Element type identifier.",
      "type": "string"
    },
    "visible": {
      "description": "Whether element is visible.",
      "type": "boolean"
    },
    "width": {
      "description": "Width in pixels.",
      "type": "number"
    },
    "x": {
      "description": "X position in pixels.",
      "type": "number"
    },
    "y": {
      "description": "Y position in pixels.",
      "type": "number"
    }
  },
  "required": [
    "alwaysOnTop",
    "animations",
    "blurEnabled",
    "blurRadius",
    "brightness",
    "brightnessEnabled",
    "color",
    "contentEditable",
    "dash",
    "draggable",
    "endHead",
    "filters",
    "grayscaleEnabled",
    "height",
    "id",
    "opacity",
    "resizable",
    "rotation",
    "selectable",
    "sepiaEnabled",
    "shadowBlur",
    "shadowColor",
    "shadowEnabled",
    "shadowOffsetX",
    "shadowOffsetY",
    "shadowOpacity",
    "showInExport",
    "startHead",
    "styleEditable",
    "type",
    "visible",
    "width",
    "x",
    "y"
  ],
  "type": "object"
}