Skip to content

EllipseIndicator JSON

roosit edited this page Oct 16, 2026 · 1 revision

EllipseIndicator JSON

Up | Code | Русский

Purpose

This page describes the persisted format of the ellipse indicator in a project, in Mixel, and in templates. For the user guide to manual .vttp editing, see the page Ellipse JSON.

Two save modes

The indicator is saved in two modes:

  • toJSON(false) is the real Mixel state: property values, layer size, and position.
  • toJSON(true) is the template state: maket instead of size and positionInParent. The indicator's properties are not tied to sources, so properties has the same shape in both modes.

Common indicator wrapper

The layer identifier is built from the plugin uid and the indicator name:

{
  "name": "com.velitask.plagin.official.ellipse",
  "data": {
    "properties": {}
  }
}

Stable parts:

Part Value
plugin uid com.velitask.plagin.official
indicator name ellipse

Real mixel state

In a real Mixel, the layer size and position are stored next to properties. The exact shape of the State fields depends on the current runtime, so an abbreviated structure is shown for them.

{
  "name": "com.velitask.plagin.official.ellipse",
  "data": {
    "size": { "...": "layer size state" },
    "positionInParent": { "...": "layer position state" },
    "properties": {
      "fillColor": {"r":0,"g":0,"b":0,"a":128},
      "borderColor": {"r":255,"g":255,"b":255,"a":255},
      "borderWidth": {"value":0}
    }
  }
}

Template state

{
  "name": "com.velitask.plagin.official.ellipse",
  "data": {
    "maket": { "preset": "auto" },
    "properties": {
      "fillColor": {"r":0,"g":0,"b":0,"a":128},
      "borderColor": {"r":255,"g":255,"b":255,"a":255},
      "borderWidth": {}
    }
  }
}

This is exactly how the runtime writes a numeric field into a template. An empty object {} means the default value 0; to set your own, use {"value": N}.

Properties

JSON key Java property SDK type Meaning for the user Default
fillColor mFillColor ColorProperty Fill color; the alpha channel is taken into account. (0, 0, 0, 128).
borderColor mBorderColor ColorProperty Border color. White.
borderWidth mBorderWidth BorderWidthProperty Border width in base pixels. 0 (in the base BorderWidthProperty it is 5, overridden here). Range 0..50.

State formats: a color is a flat object r, g, b, a (each 0..255); borderWidth is {"value":N}. The range 0..50 limits input in the panel; the value is not validated when read from JSON.

Indicator skins: outline (fillColor (0,0,0,0), borderColor white, borderWidth 3) and solidLight (fillColor (255,255,255,180), borderColor black, borderWidth 2).

Examples

A white circle with a black border (the solidLight skin):

{
  "name": "com.velitask.plagin.official.ellipse",
  "data": {
    "maket": { "preset": "auto" },
    "properties": {
      "fillColor": {"r":255,"g":255,"b":255,"a":180},
      "borderColor": {"r":0,"g":0,"b":0,"a":255},
      "borderWidth": {"value":2}
    }
  }
}

Compatibility

  • VelitaskPlagin.getUID() (com.velitask.plagin.official) must not be changed without migrating saved projects.
  • Indicator.getName() (ellipse) must not be changed without migration.
  • Property names (fillColor, borderColor, borderWidth) must not be renamed without migration.
  • The order of properties mostly affects the UI, while loading the persisted state goes by names; renaming is more dangerous than reordering.

Clone this wiki locally