Back to Androidx

RemoteComposeWireFormat.Md

compose/remote/Documentation/RemoteComposeWireFormat.md.html

latest119.2 KB
Original Source

**RemoteCompose Wire Format v1.1.0** February 09, 2026 *Current number of operations: 141 (0 not fully documented)* !!! ERROR This is work in progress and subject to modifications. RemoteCompose is a standalone content format for Android. It consists of a list of operations providing rendering, layout, animation, expression evaluation and bindings. Wire Format overview ====== The RemoteCompose wire format is a simple flat list of Operations, serialized in a binary format (see next sections for a detailed description of each operation). !!! WARNING This wire format is intended to be used for fast generation and transport. For display purposes, a more runtime-appropriate representation (i.e. a tree of operations and containers) should be created and used instead. Each list of operations contains as first element a Header (see section [Header]). |Operations| |:----:| | **Header** | | *Operation 1* | | *Operation 2* | | *Operation 3* | | ... | | *Operation n* | Encoding -------- Operations are encoded in binary, using the following types: | Type | Size (in bytes) | |:----:|:----:| | BYTE | 1 | | BOOLEAN | 1 | | SHORT | 2 | | INT | 4 | | FLOAT | 4 | | LONG | 8 | | DOUBLE | 8 | | BUFFER | 4 + Size | | UTF8 | BUFFER | A Buffer is simply encoded as the size of the buffer in bytes (encoded as an INT, so 4 bytes) followed by the byte buffer itself. UTF8 payload is simply encoded as a byte Buffer using encodeToByteArray(). Components & Layout ------------------- Operations can further be grouped in components, surrounded by ComponentStart (section [ComponentStart]) and ComponentEnd (section [ComponentEnd]). |Operations| |:----:| | ... | | **ComponentStart** | | *Operation 1* | | *Operation 2* | | *Operation 3* | | ... | | *Operation n* | | **ComponentEnd** | | ... | More specialized components can be created by using alternative layout operations instead of ComponentStart: - RootLayoutComponent - BoxLayout - RowLayout - ColumnLayout Layout managers such as BoxLayout, RowLayout, ColumnLayout provide a way to layout Components. Such layoutable/resizable components are structured slightly differently: |Operations| | | |:----: |:----:| :----: | | **Header** | || | ... | ... | ... | | **RootLayoutComponent** | | | | | **RowLayout** | | | ... | ... | ... | | | **RowLayout** | | | | *Modifier 1* | | | | *Modifier 2* | | | ... | ... | ... | | | *Modifier n* | | | | | **LayoutComponentContent** | | | | *Component 1* | | | | *Component 2* | | | | ... | | | | *Component n* | | | | **ComponentEnd** | | | **ComponentEnd** | | | **ComponentEnd** | | | In the example above, you can see that RowLayout is comprised of two sections -- a list of Modifier operations followed by a LayoutComponentContent component, containing the components to be laid out. # Layout overview ## Overview The layout system work with **LayoutManager** that can layout **LayoutComponent** and **Component**. LayoutComponents are able to be laid out as well as resized, while Components can only be laid out. The following diagram shows the runtime class hiearchy:

--- config: class: hideEmptyMembersBox: true --- classDiagram Component \<|-- RootLayoutComponent Component \<|-- LayoutComponent LayoutComponent \<|-- LayoutManager LayoutManager \<|-- BoxLayout LayoutManager \<|-- ColumnLayout LayoutManager \<|-- RowLayout LayoutManager \<|-- FitBoxLayout LayoutManager \<|-- CoreText BoxLayout \<|-- CanvasLayout ColumnLayout \<|-- CollapsibleColumnLayout RowLayout \<|-- CollapsibleRowLayout RowLayout \<|-- FlowLayout LayoutManager \<|-- ImageLayout LayoutManager \<|-- StateLayout

Components **Component** is the base class representing Origami Components. We create components when loading the document, out of the **ComponentStart** and **ComponentEnd** operations in the original operations stream, grouping a list of operations:

graph LR operations["`ComponentStart Operation 1 ... Operation n ComponentEnd 3`"] operations --\> Result Result subgraph Result [Runtime Component] Component --\> OP1[Operation 1] Component --\> OP2[...] Component --\> OP3[Operation n] end

LayoutComponents **LayoutComponent** represents layoutable components, which can be measured and may layout sub-components. It keeps track of a list of modifiers as well as a list of child components.

graph TD LC[LayoutComponent] LC --\> Mods[Modifiers] Mods --\> M1[modifier 1] Mods --\> M2[modifier 2] Mods --\> M3[...] Mods --\> MN[modifier n] LC --\> Children[children] Children --\> C1[component 1] Children --\> C2[component 2] Children --\> C3[...] Children --\> CN[component n]
graph LR P1[Padding 4] --\> BG[Background] BG --\> P2[Padding 8] P2 --\> Content[/Content/]

Which would result in a "margin" of 4 followed by painting the background, with a "padding" of 8 for the actual content. #### Sizing If a component is set to compute its own size (WRAP), Padding will be added to the computed size. But to note, if a component uses a modifier for indicating a fixed dimension, such as:

graph LR P1[Padding 4] --\> S[Size 10x10] S --\> P2[Padding 2]

The computed size of the component for its parent layout manager will be 14x14. #### Borders Borders are always applied on top of the content, so putting the border before a background or after would result in the same visuals:

graph LR B1[Border] --\> BG1[Background] BG1 == "visual equivalent" ==\> BG2[Background] BG2 --\> B2[Border]

Borders are purely a visual decoration, they do not impact sizing/padding, but they are impacted by them, so have to be evaluated in order. ## Layout Managers The actual layout managers are implemented as subclass of LayoutManager: | Layout Manager | Role | |-------------------------|---------------------------------------------------| | BoxLayout | Layout elements in the same place | | RowLayout | Layout elements in a row | | ColumnLayout | Layout elements in a column | | CollapsibleRowLayout | as RowLayout, but skip elements that don't fit | | CollapsibleColumnLayout | as ColumnLayout, but skip elements that don't fit | | FitBoxLayout | pick the first child that fits | | FlowLayout | as RowLayout, but wrap elements if they don't fit | ### Scroll areas Scroll areas are handled as subclasses of LayoutContent:

graph TD SCH[ScrollContentHost] SCH --\> SC[ScrollContent] SCH --\> LC[LayoutContent]

Layout / Measure cycle For a runtime document, we end up with the following structure for the layout operations:

graph TD RLC[RootLayoutComponent] RLC --\> LM1[LayoutManager] LM1 --\> LM2[LayoutManager] LM2 --\> C1[Component] LM2 --\> C2[Component] LM1 --\> C3[Component]

The general layout / measure cycle works as follow: - for each LayoutComponent, measure their children recursively - capture that measure in a MeasurePass object - then recursively layout the components by using the MeasurePass information.

graph TD M[Measure] M -- "ideally single pass, using intrinsic sizes (multi-measure is discouraged, but allowed)" --\> M M --\> MP[MeasurePass] MP -- "contains position+size of all the components" --\> L[Layout] L -- "we can animate upon receiving a new layout(measurePass) request " --\> A[Animate]
  1. RootLayoutComponent.layout(width, height) will measure all its children (Components), and gather the result of the measure in a MeasurePass object. The MeasurePass is then used to layout the components. The measure on its own never change the components, it's only role is to gather the resulting dimensions / positions. 2. Components implements the Measurable interface. 3. The measure pass is ideally done as a single pass, asking each child to measure itself given min/max constraints for width and height: the contract for the child is to enforce those min/max constraints and set a size that is within those. 4. By default, when a component receive a new layout with a measure information, we animate the change. ## Measure Measure is done by asking components to add a ComponentMeasure to MeasurePass; ComponentMeasure contains the position, dimension and visibility of the component. Each component has an implicit ID that we use to map a given ComponentMeasure to a component. The measure itself consists in passing a set of (min, max) for width and height to the component. As part of the measurement, the list of modifiers may need to be evaluated (in order), to take in account dimension modifiers (size, padding..). ### Multi-measure In order to limit the needs for multi-measures, Measurable components have the concept of intrinsic sizes (min & max) -- they should be handled as equivalent to a measure query, but should be cached (or even pre-cached) by the component. Layout managers then can ask each child to measure themselves given min/max constraints, or if they need to, ask the child for their intrinsic sizes, then measure them. Layout managers can call measure multiple times on children (i.e. there is nothing preventing multi-measure) but this should be avoided as possible, given the potential performance impact (re-measuring a layout high in the hierarchy has the potential for a large performance hit). A component can indicate that its size/content changed and thus a layout pass is needed by calling invalidateMeasure(); this will flag the chain of component until the root and trigger the layout pass. ## Request layout / Request measure Generally, the layout system will react to change in dimensions, propagated from the root. Another important mechanism is the ability for components to invalidate themselves and trigger a relayout/remeasure pass. Components can do that simply by calling invalidateMeasure() -- this will mark themselves as needing both a repaint and a remeasure, and will walk the tree up until the root component, invalidating them as the tree is traversed. The root component then uses this to trigger a measure pass. # Scrolling Architecture in RemoteCompose RemoteCompose provides a physics-based, hierarchical scrolling system that supports orthogonal nesting (e.g., horizontal rows inside vertical columns) and dynamic state synchronization. ## Core Concepts ### 1. Coordinate Spaces To handle deep nesting and scrolling reliably, the interaction engine uses three distinct coordinate spaces: | Space | Reference | Usage | | :--- | :--- | :--- | | **Root-Relative** | Document origin (0,0) | Used for top-level hit testing (contains(x, y)). | | **Viewport-Relative** (lx, ly) | Component top-left on screen | Used by Modifiers (ripples, scroll logic). | | **Content-Relative** (cx, cy) | Component's scrollable origin | Passed to children so they can ignore parent scroll. | ### 2. The Scroll Delegate Scrolling is not hardcoded into layouts. Instead, LayoutComponent uses a ScrollDelegate interface. If a component has a ScrollModifierOperation in its modifier list, it registers itself as the delegate for horizontal or vertical axes. - **Measure Phase**: The layout manager queries the delegate for the "content dimension" (total scrollable area). - **Layout Phase**: The delegate updates the component's internal scroll offsets based on user interaction or bound variables. - **Paint Phase**: LayoutComponent applies a translation transformation (getScrollX(), getScrollY()) before painting its children. ## The Interaction Pipeline ### 1. Event Entry (CoreDocument) Touch events enter via CoreDocument.touchDown/Drag/Up. The document tracks "applied touch operations"—components currently being interacted with—to bypass hit-testing during a drag. ### 2. Recursive Dispatch (Component) Events propagate down the tree in **reverse drawing order** (top-most component first). - A component first performs a **Root-Relative** hit test. - If it contains the point, it calculates the **Viewport** and **Content** offsets. - It dispatches to children using the **Content** space. - It then dispatches to its own modifiers using the **Viewport** space. ### 3. Event Consumption Interaction handlers return a boolean. - If a child component consumes an event (e.g., a button click), sibling components are ignored. - **Crucially**, parent modifiers (like a ScrollModifier) are still notified even if a child consumed the event. This allows a nested list to scroll even if the user started the drag on a button. ## Physics and State (TouchExpression) The ScrollModifierOperation typically hosts a TouchExpression. This engine handles: - **Velocity Tracking**: Calculates pixels-per-second during a drag. - **Fling/Easing**: When the user releases, it uses a VelocityEasing curve to continue the scroll. - **Notches**: Supports snapping to specific positions (even spacing, absolute points, or percentages). ## Nested Scrolling Logic RemoteCompose handles nested scrolls by utilizing the "Orthogonal Capture" rule: 1. A vertical scroll only consumes the **Y** component of a drag. 2. A horizontal scroll only consumes the **X** component. 3. Because propagation continues up the parent chain for modifiers, a vertical swipe inside a horizontal row will be ignored by the row's scroll logic but captured by the parent column's scroll logic. ## Layout Integration Layout managers like ColumnLayout and RowLayout are "scroll-aware": - During internalLayoutMeasure, they check mComponentModifiers.hasVerticalScroll(). - If true, they allow the content to exceed the host's viewport height. - They then call setVerticalScrollDimension() to inform the modifier of the total scrollable range, which the TouchExpression uses for boundary clamping. # Click Handling and Actions in RemoteCompose RemoteCompose provides a flexible click system based on modifiers that can trigger both internal state changes and host-side callbacks. ## Click Propagation Process Click events follow a similar propagation path to touch events but are specifically triggered on the "up" phase of a gesture if the movement threshold hasn't been exceeded. ### 1. Root Dispatch (CoreDocument) When a user clicks, CoreDocument.onClick(x, y) is called with root-relative coordinates. ### 2. Backward Search (Component) The document iterates through its component tree in **reverse drawing order** (top-to-bottom). For each component: - It checks if the point (x, y) is within the component's bounds via contains(x, y). - If contained, it recursively calls onClick on its children. - If no child handles the click, it dispatches to its own onClick handlers (usually via ComponentModifiers). ### 3. Local Transformation Before reaching a ClickModifierOperation, the coordinates are transformed: - **Root Space**: Used for initial hit detection. - **Content Space**: Passed to children and modifiers, accounting for parent scrolling and padding. ## Click Modifiers (ClickModifierOperation) The primary way to make a component interactive is by adding a click modifier. ### Interaction Features - **Ripple Animation**: Triggers a visual feedback ripple at the exact touch location. The ripple uses Easing.CUBIC_STANDARD and animates both color and radius over 1000ms. - **Haptic Feedback**: Automatically triggers a host haptic effect (type 3) upon a successful click. - **Role & Semantics**: Identifies the component as a Role.BUTTON for accessibility services (e.g., TalkBack). ## Actions A ClickModifierOperation acts as a container for one or more ActionOperations. | Action Type | Description | | :--- | :--- | | **ValueChange** | Updates a RemoteCompose variable (Float, String, or Boolean). Useful for toggling states like isExpanded or clickCount. | | **HostAction** | Sends a metadata string back to the host application (Android/iOS). This is used for navigation or triggering native logic. | | **Custom Actions** | Can be implemented to perform complex sequences, such as multiple variable updates or conditional logic. | ## Interaction with Scrolling The system ensures that clicks and scrolls don't conflict: 1. **Threshold**: If a touch move exceeds a small distance threshold (e.g., 5-10 pixels), the gesture is "captured" by a scroll parent. 2. **Cancellation**: Once captured by a scroll, any pending click animations or actions on child components are cancelled. 3. **Consumption**: If a click is handled by a child, the event returns true, stopping further propagation to parent click handlers. # Document Protocol Operations Core document metadata, versioning, themes, and high-level behaviors. Operations in this category: | ID | Name | Version | Size (bytes) | ---- | ---- | ---- | ---- | | 0 | Header | v6 | 29 | 63 | Theme | v6 | 5 | 185 | Rem | v7 | 1 | 214 | ContainerEnd | v6 | 1 ## Header Document metadata, containing the version, original size & density, capabilities mask 6 Fields, total size 29 bytes
TypeNameDescription
BYTEHeaderValue: 0
INTmajorVersionMajor version
INTminorVersionMinor version
INTpatchVersionPatch version
INTwidthDocument width in pixels
INTheightDocument height in pixels
LONGcapabilitiesCapabilities mask

Theme Set a theme 1 Fields, total size 5 bytes

TypeNameDescription
BYTEThemeValue: 63
INTTHEMEtheme id

THEME | Name | Value | | ---- | ---- | | UNSPECIFIED | -1 | DARK | -2 | LIGHT | -3 ### Theme Illustration The Theme operation allows the document to adapt its visual appearance (colors, styles) based on the active theme (e.g., Light or Dark mode).

Rem (added in v7) Embed a remark or comment string in the document 1 Fields, total size 1 bytes

TypeNameDescription
BYTERemValue: 185
UTF8textThe comment string

ContainerEnd End tag for a container component (Row, Column, etc.) 0 Fields, total size 1 bytes

TypeNameDescription
BYTEContainerEndValue: 214

Data Operations Definitions of static constants, named variables, collections (lists/maps), and resource data (Bitmaps, Fonts). Operations in this category: | ID | Name | Version | Size (bytes) | ---- | ---- | ---- | ---- | | 80 | FloatConstant | v6 | 9 | 101 | BitmapData | v6 | 13 | 137 | NamedVariable | v6 | 9 | 140 | IntegerConstant | v6 | 9 | 143 | BooleanConstant | v6 | 6 | 145 | DataMapIds | v6 | 9 | 146 | IdListData | v6 | 9 + null x 4 | 147 | IdListData | v6 | 9 + null x 4 | 148 | LongConstant | v6 | 13 | 154 | DataMapLookup | v6 | 13 | 189 | FontData | v7 | 9 | 197 | DataDynamicListFloat | v7 | 9 | 198 | UpdateDynamicFloatList | v7 | 13 ## FloatConstant A float and its associated id 2 Fields, total size 9 bytes

TypeNameDescription
BYTEFloatConstantValue: 80
INTidid of the Float constant
FLOATvalue32-bit float value

BitmapData Embed or reference bitmap image data 4 Fields, total size 13 bytes

TypeNameDescription
BYTEBitmapDataValue: 101
INTimageIdThe ID of the bitmap
INTwidthAndTypeEncoded width and image type
INTheightAndEncodingEncoded height and data encoding
BYTE[]bitmapThe raw or encoded bitmap data

NamedVariable Add a string name for an ID 3 Fields, total size 9 bytes

TypeNameDescription
BYTENamedVariableValue: 137
INTvarIdid to label
INTvarTypeThe type of variable
UTF8nameString

IntegerConstant A integer and its associated id 2 Fields, total size 9 bytes

TypeNameDescription
BYTEIntegerConstantValue: 140
INTidid of the Int constant
INTvalue32-bit int value

BooleanConstant A boolean and its associated id 2 Fields, total size 6 bytes

TypeNameDescription
BYTEBooleanConstantValue: 143
INTidid of Int
BYTEvalue8-bit 0 or 1

DataMapIds Encode a collection of named variable IDs 3 Fields, total size 9 bytes

TypeNameDescription
BYTEDataMapIdsValue: 145
INTidThe ID of the map
INTlengthNumber of entries
REPEATED DATA
TypeNameDescription
UTF8nameThe name of the entry
INTtypeThe type of the entry
INTidThe ID of the variable

|

IdListData A list of IDs 3 Fields, total size 9 + null x 4 bytes

TypeNameDescription
BYTEIdListDataValue: 146
INTidThe ID of the list
INTlengthNumber of IDs
INT[]idsThe array of IDs

IdListData A list of floats 3 Fields, total size 9 + null x 4 bytes

TypeNameDescription
BYTEIdListDataValue: 147
INTidThe ID of the list
INTlengthNumber of floats
FLOAT[]valuesThe array of floats

LongConstant A long and its associated id 2 Fields, total size 13 bytes

TypeNameDescription
BYTELongConstantValue: 148
INTidid of the Long constant
LONGvalueThe long Value

DataMapLookup Look up a value in a data map 3 Fields, total size 13 bytes

TypeNameDescription
BYTEDataMapLookupValue: 154
INTidThe ID of the output value
INTdataMapIdThe ID of the data map
INTstringIdThe ID of the string to look up

FontData (added in v7) Embed raw font data in the document 3 Fields, total size 9 bytes

TypeNameDescription
BYTEFontDataValue: 189
INTfontIdThe ID of the font
INTtypeThe type of the font (unused)
BYTE[]fontDataThe raw font file data

DataDynamicListFloat (added in v7) A dynamic list of floats 2 Fields, total size 9 bytes

TypeNameDescription
BYTEDataDynamicListFloatValue: 197
INTidThe ID of the list
FLOATlengthThe length of the list

UpdateDynamicFloatList (added in v7) Update a value in a dynamic float list 3 Fields, total size 13 bytes

TypeNameDescription
BYTEUpdateDynamicFloatListValue: 198
INTarrayIdThe ID of the array
FLOATindexThe index to update
FLOATvalueThe new value

Paint & Styles Operations Management of paint properties, shaders, and complex color definitions (themes, expressions). Operations in this category: | ID | Name | Version | Size (bytes) | ---- | ---- | ---- | ---- | | 40 | PaintData | v6 | 1 + null x 4 | 45 | ShaderData | v6 | 25 + null x 4 + null x 4 | 134 | ColorExpression | v6 | 25 | 138 | ColorConstant | v6 | 9 | 180 | ColorAttribute | v6 | 11 | 196 | ColorTheme | v7 | 21 ## PaintData Encode a Paint object with various properties 1 Fields, total size 1 + null x 4 bytes

TypeNameDescription
BYTEPaintDataValue: 40
INT[]paintBundleThe encoded paint properties

PaintData Illustration The PaintData operation encodes properties like style (Fill/Stroke), color, and stroke width. #### Fill vs Stroke

ShaderData Define a shader with associated uniforms 11 Fields, total size 25 + null x 4 + null x 4 bytes

TypeNameDescription
BYTEShaderDataValue: 45
INTshaderIDThe ID of the shader
INTshaderTextIdThe ID of the shader source text
INTsizesEncoded sizes of uniform maps (float, int, bitmap)
UTF8floatUniformName[0..n]Name of float uniform
INTfloatUniformLength[0..n]Length of float uniform
FLOAT[]floatUniformValues[0..n]Values of float uniform
UTF8intUniformName[0..n]Name of int uniform
INTintUniformLength[0..n]Length of int uniform
INT[]intUniformValues[0..n]Values of int uniform
UTF8bitmapUniformName[0..n]Name of bitmap uniform
INTbitmapUniformValue[0..n]ID of bitmap uniform

ShaderData Illustration The ShaderData operation defines complex color effects like gradients or image-based patterns. #### Linear Gradient Example

ColorExpression Define a color via dynamic expression (HSV, ARGB, or Interpolation) 6 Fields, total size 25 bytes

TypeNameDescription
BYTEColorExpressionValue: 134
INTidThe ID of the resulting color
INTmodeThe color calculation mode
INTparam1First parameter (color1, hue, or alpha depending on mode)
INTparam2Second parameter (color2, saturation, or red depending on mode)
INTparam3Third parameter (tween, value, or green depending on mode)
INTparam4Fourth parameter (blue, only used in ARGB modes)

mode | Name | Value | | ---- | ---- | | COLOR_COLOR_INTERPOLATE | 0 | ID_COLOR_INTERPOLATE | 1 | COLOR_ID_INTERPOLATE | 2 | ID_ID_INTERPOLATE | 3 | HSV_MODE | 4 | ARGB_MODE | 5 | IDARGB_MODE | 6 ## ColorConstant Define a static color and associate it with an ID 2 Fields, total size 9 bytes

TypeNameDescription
BYTEColorConstantValue: 138
INTcolorIdThe ID of the color
INTcolor32-bit ARGB color value

ColorAttribute Extract components (Hue, RGB, Alpha) from a color 3 Fields, total size 11 bytes

TypeNameDescription
BYTEColorAttributeValue: 180
INTidThe ID to output the result to
INTcolorIdThe ID of the source color
SHORTtypeThe component to extract

type | Name | Value | | ---- | ---- | | COLOR_HUE | 0 | COLOR_SATURATION | 1 | COLOR_BRIGHTNESS | 2 | COLOR_RED | 3 | COLOR_GREEN | 4 | COLOR_BLUE | 5 | COLOR_ALPHA | 6 ## ColorTheme [EXPERIMENTAL] (added in v7) !!! WARNING Experimental operation Define a color that adapts to the current theme (light/dark) 6 Fields, total size 21 bytes

TypeNameDescription
BYTEColorThemeValue: 196
INTidThe ID of the color
INTgroupIdThe ID of the color group name string
SHORTlightModeIndexThe ID of the color in the light group
SHORTdarkModeIndexThe ID of the color in the dark group
INTlightModeFallback32-bit ARGB fallback color for light mode
INTdarkModeFallback32-bit ARGB fallback color for dark mode

Canvas Operations Low-level drawing primitives for shapes, paths, text, and bitmaps, as well as clipping and layer management. Operations in this category: | ID | Name | Version | Size (bytes) | ---- | ---- | ---- | ---- | | 42 | DrawRect | v6 | 17 | 44 | DrawBitmap | v6 | 25 | 46 | DrawCircle | v6 | 13 | 47 | DrawLine | v6 | 17 | 51 | DrawRoundRect | v6 | 25 | 52 | DrawSector | v6 | 25 | 56 | DrawOval | v6 | 17 | 66 | DrawBitmapInt | v6 | 41 | 124 | DrawPath | v6 | 5 | 125 | DrawTweenPath | v6 | 21 | 139 | DrawContent | v6 | 1 | 149 | DrawBitmapScaled | v6 | 49 | 152 | DrawArc | v6 | 25 | 158 | PathTween | v6 | 17 | 159 | PathCreate | v6 | 13 | 160 | PathAppend | v6 | 9 + null x 4 | 173 | CanvasOperations | v6 | 1 | 175 | PathCombine | v6 | 14 | 190 | DrawToBitmap | v7 | 13 ## DrawRect Draw the specified rectangle 4 Fields, total size 17 bytes

TypeNameDescription
BYTEDrawRectValue: 42
FLOATleftThe left side of the rectangle
FLOATtopThe top of the rectangle
FLOATrightThe right side of the rectangle
FLOATbottomThe bottom of the rectangle

DrawRect Illustration The DrawRect operation renders a rectangle defined by its left, top, right, and bottom coordinates.

DrawBitmap Draw a bitmap 6 Fields, total size 25 bytes

TypeNameDescription
BYTEDrawBitmapValue: 44
INTimageIdThe ID of the bitmap
FLOATleftThe left side of the image
FLOATtopThe top of the image
FLOATrightThe right side of the image
FLOATbottomThe bottom of the image
INTdescriptionIdThe ID of the content description string

DrawCircle Draw a Circle 3 Fields, total size 13 bytes

TypeNameDescription
BYTEDrawCircleValue: 46
FLOATcenterXThe x-coordinate of the center of the circle to be drawn
FLOATcenterYThe y-coordinate of the center of the circle to be drawn
FLOATradiusThe radius of the circle to be drawn

DrawCircle Illustration The DrawCircle operation renders a circle centered at (centerX, centerY) with a given radius.

DrawLine Draw a line segment 4 Fields, total size 17 bytes

TypeNameDescription
BYTEDrawLineValue: 47
FLOATstartXThe x-coordinate of the start point of the line
FLOATstartYThe y-coordinate of the start point of the line
FLOATendXThe x-coordinate of the end point of the line
FLOATendYThe y-coordinate of the end point of the line

DrawLine Illustration The DrawLine operation renders a single straight line segment between (startX, startY) and (endX, endY).

DrawRoundRect Draw the specified round-rect 6 Fields, total size 25 bytes

TypeNameDescription
BYTEDrawRoundRectValue: 51
FLOATleftThe left side of the rect
FLOATtopThe top of the rect
FLOATrightThe right side of the rect
FLOATbottomThe bottom of the rect
FLOATrxThe x-radius of the oval used to round the corners
FLOATryThe y-radius of the oval used to round the corners

DrawRoundRect Illustration The DrawRoundRect operation renders a rectangle with rounded corners, defined by its bounds and the radii rx and ry.

DrawSector Draw the specified sector (pie shape)which will be scaled to fit inside the specified oval 6 Fields, total size 25 bytes

TypeNameDescription
BYTEDrawSectorValue: 52
FLOATleftThe left side of the Oval
FLOATtopThe top of the Oval
FLOATrightThe right side of the Oval
FLOATbottomThe bottom of the Oval
FLOATstartAngleStarting angle (in degrees) where the arc begins
FLOATsweepAngleSweep angle (in degrees) measured clockwise

DrawSector Illustration The DrawSector operation renders a "pie" shape within a specified oval bounding box, starting from startAngle and sweeping through sweepAngle.

DrawOval Draw the specified oval 4 Fields, total size 17 bytes

TypeNameDescription
BYTEDrawOvalValue: 56
FLOATleftThe left side of the oval
FLOATtopThe top of the oval
FLOATrightThe right side of the oval
FLOATbottomThe bottom of the oval

DrawOval Illustration The DrawOval operation renders an oval that fits within the specified bounding box.

DrawBitmapInt Draw a bitmap using integer coordinates 10 Fields, total size 41 bytes

TypeNameDescription
BYTEDrawBitmapIntValue: 66
INTimageIdThe ID of the bitmap
INTsrcLeftThe left side of the source image
INTsrcTopThe top of the source image
INTsrcRightThe right side of the source image
INTsrcBottomThe bottom of the source image
INTdstLeftThe left side of the destination
INTdstTopThe top of the destination
INTdstRightThe right side of the destination
INTdstBottomThe bottom of the destination
INTcdIdThe ID of the content description string

DrawPath Draw a path 1 Fields, total size 5 bytes

TypeNameDescription
BYTEDrawPathValue: 124
INTidThe ID of the path to draw

DrawTweenPath Draw an interpolated path between two paths 5 Fields, total size 21 bytes

TypeNameDescription
BYTEDrawTweenPathValue: 125
INTpath1IdThe ID of the first path
INTpath2IdThe ID of the second path
FLOATtweenInterpolation value [0..1]
FLOATstartTrim the start of the path [0..1]
FLOATstopTrim the end of the path [0..1]

DrawContent Draw the component content 0 Fields, total size 1 bytes

TypeNameDescription
BYTEDrawContentValue: 139

DrawBitmapScaled Draw a bitmap with scaling and alignment options 12 Fields, total size 49 bytes

TypeNameDescription
BYTEDrawBitmapScaledValue: 149
INTimageIdThe ID of the bitmap
FLOATsrcLeftThe left side of the source image
FLOATsrcTopThe top of the source image
FLOATsrcRightThe right side of the source image
FLOATsrcBottomThe bottom of the source image
FLOATdstLeftThe left side of the destination
FLOATdstTopThe top of the destination
FLOATdstRightThe right side of the destination
FLOATdstBottomThe bottom of the destination
INTscaleTypeType of scaling to apply
FLOATscaleFactorFactor for fixed scale
INTcdIdThe ID of the content description string

scaleType | Name | Value | | ---- | ---- | | SCALE_NONE | 0 | SCALE_INSIDE | 1 | SCALE_FILL_WIDTH | 2 | SCALE_FILL_HEIGHT | 3 | SCALE_FIT | 4 | SCALE_CROP | 5 | SCALE_FILL_BOUNDS | 6 | SCALE_FIXED_SCALE | 7 ### DrawBitmapScaled Illustration The DrawBitmapScaled operation handles rendering images within a destination area using different scaling algorithms. To illustrate this, a "House" image with a 1:2 aspect ratio (tall) is used.

DrawArc Draw the specified arcwhich will be scaled to fit inside the specified oval 6 Fields, total size 25 bytes

TypeNameDescription
BYTEDrawArcValue: 152
FLOATleftThe left side of the Oval
FLOATtopThe top of the Oval
FLOATrightThe right side of the Oval
FLOATbottomThe bottom of the Oval
FLOATstartAngleStarting angle (in degrees) where the arc begins
FLOATsweepAngleSweep angle (in degrees) measured clockwise

DrawArc Illustration The DrawArc operation renders an arc within a specified oval bounding box, starting from startAngle and sweeping through sweepAngle (degrees).

PathTween Interpolate between two paths and store the result in a new path ID 4 Fields, total size 17 bytes

TypeNameDescription
BYTEPathTweenValue: 158
INToutIdThe ID of the resulting interpolated path
INTpathId1The ID of the first source path
INTpathId2The ID of the second source path
FLOATtweenThe interpolation factor [0..1]

PathTween Illustration The PathTween operation interpolates between two source paths (Path 1 and Path 2) based on a tween factor (0.0 to 1.0).

PathCreate Start the creation of a dynamic path 3 Fields, total size 13 bytes

TypeNameDescription
BYTEPathCreateValue: 159
INTidThe ID of the path to create
FLOATstartXThe X coordinate of the starting point
FLOATstartYThe Y coordinate of the starting point

PathCreate Illustration The PathCreate operation begins the definition of a path, followed by PathAppend operations to add segments like lines or curves.

PathAppend Append segments to an existing dynamic path 3 Fields, total size 9 + null x 4 bytes

TypeNameDescription
BYTEPathAppendValue: 160
INTidThe ID of the path to append to
INTlengthThe number of elements in the path data
FLOAT[]pathDataThe sequence of commands and coordinates

PathAppend Illustration The PathAppend operation adds segments to an existing path. #### LineTo Simple straight line segment.

QuadraticTo A curve with a single control point. The dashed lines show the tangents from the endpoints.

CubicTo A curve with two control points, allowing for more complex shapes like "S" curves.

CanvasOperations A collection of canvas operations 0 Fields, total size 1 bytes

TypeNameDescription
BYTECanvasOperationsValue: 173

PathCombine Combine two paths using a boolean operation (Union, Intersect, etc.) 4 Fields, total size 14 bytes

TypeNameDescription
BYTEPathCombineValue: 175
INToutIdThe ID of the resulting path
INTpathId1The ID of the first source path
INTpathId2The ID of the second source path
BYTEoperationThe boolean operation to perform

operation | Name | Value | | ---- | ---- | | OP_DIFFERENCE | 0 | OP_INTERSECT | 1 | OP_REVERSE_DIFFERENCE | 2 | OP_UNION | 3 | OP_XOR | 4 ### PathCombine Illustration The PathCombine operation performs boolean logic between two paths to create a new complex shape.

DrawToBitmap (added in v7) Draw to a bitmap 3 Fields, total size 13 bytes

TypeNameDescription
BYTEDrawToBitmapValue: 190
INTbitmapIdThe bitmap to draw to or 0 to draw to the canvas
INTmodeFlags to support configuration of bitmap
INTcolorset the initial of the bitmap

Text Operations Operations for defining, manipulating, measuring, and rendering text and font data. This includes support for static strings, dynamic formatting, text-based expressions, spatial measurement of text bounds, and high-fidelity rendering using both standard and bitmap fonts across various canvas geometries. Operations in this category: | ID | Name | Version | Size (bytes) | ---- | ---- | ---- | ---- | | 43 | DrawText | v6 | 29 | 48 | DrawBitmapFontText | v6 | 25 | 49 | DrawBitmapFontTextOnPath | v7 | 25 | 53 | DrawTextOnPath | v6 | 17 | 57 | DrawTextOnCircle | v6 | 33 | 102 | TextData | v6 | 5 | 133 | DrawTextAnchored | v6 | 25 | 135 | TextFromFloat | v6 | 17 | 136 | TextMerge | v6 | 13 | 151 | TextFromFloat | v6 | 13 | 153 | TextLookupInt | v6 | 13 | 155 | TextMeasure | v6 | 13 | 156 | TextLength | v6 | 9 | 167 | BitmapFontData | v6 | 29 | 170 | TextMeasure | v6 | 13 | 182 | TextSubtext | v7 | 17 | 183 | BitmapTextMeasure | v7 | 21 | 184 | DrawBitmapTextAnchored | v7 | 33 | 199 | TextTransform | v7 | 21 | 208 | TextLayout | v6 | 45 ## DrawText Draw a run of text, all in a single direction 8 Fields, total size 29 bytes

TypeNameDescription
BYTEDrawTextValue: 43
INTtextIdThe ID of the text to render
INTstartThe start index of the text to render
INTendThe end index of the text to render
INTcontextStartThe index of the start of the shaping context
INTcontextEndThe index of the end of the shaping context
FLOATxThe x position at which to draw the text
FLOATyThe y position at which to draw the text
BOOLEANrtlWhether the run is in RTL direction

DrawText Illustration The DrawText operation renders a run of text at a specific (x, y) coordinate.

DrawBitmapFontText Draw text using a bitmap font 6 Fields, total size 25 bytes

TypeNameDescription
BYTEDrawBitmapFontTextValue: 48
INTtextIdThe ID of the text to render
INTbitmapFontIdThe ID of the bitmap font
INTstartThe start index of the text to render
INTendThe end index of the text to render
FLOATxThe x position at which to draw the text
FLOATyThe y position at which to draw the text

DrawBitmapFontTextOnPath (added in v7) Draw text using a bitmap font along a path 6 Fields, total size 25 bytes

TypeNameDescription
BYTEDrawBitmapFontTextOnPathValue: 49
INTtextIdThe ID of the text to render
INTbitmapFontIdThe ID of the bitmap font
INTpathIdThe ID of the path to follow
INTstartThe start index of the text to render
INTendThe end index of the text to render
FLOATyAdjVertical adjustment relative to the path

DrawTextOnPath Draw text along a path 4 Fields, total size 17 bytes

TypeNameDescription
BYTEDrawTextOnPathValue: 53
INTtextIdThe ID of the text
INTpathIdThe ID of the path
FLOAThOffsetHorizontal offset along the path
FLOATvOffsetVertical offset relative to the path

DrawTextOnPath Illustration The DrawTextOnPath operation renders text along a specified path. The text follows the curve, maintaining its orientation relative to the path's tangent.

DrawTextOnCircle Draw text along a circle 8 Fields, total size 33 bytes

TypeNameDescription
BYTEDrawTextOnCircleValue: 57
INTtextIdThe ID of the text
FLOATcenterXThe x coordinate of the center
FLOATcenterYThe y coordinate of the center
FLOATradiusThe radius of the circle
FLOATstartAngleThe start angle in degrees
FLOATwarpRadiusOffsetThe warp radius offset
INTalignmentThe alignment of the text
INTplacementThe placement of the text

alignment | Name | Value | | ---- | ---- | | START | 0 | CENTER | 1 | END | 2 ### placement | Name | Value | | ---- | ---- | | OUTSIDE | 0 | INSIDE | 1 ### DrawTextOnCircle Illustration The DrawTextOnCircle operation renders curved text along the circumference of a circle.

TextData Define a static string and associate it with an ID 2 Fields, total size 5 bytes

TypeNameDescription
BYTETextDataValue: 102
INTtextIdThe ID of the text
UTF8textThe string value

DrawTextAnchored Draw text centered about an anchor point 6 Fields, total size 25 bytes

TypeNameDescription
BYTEDrawTextAnchoredValue: 133
INTtextIdThe ID of the text to render
FLOATxThe x-position of the anchor point
FLOATyThe y-position of the anchor point
FLOATpanXThe horizontal pan from left(-1) to right(1), 0 being centered
FLOATpanYThe vertical pan from top(-1) to bottom(1), 0 being centered
INTflagsBehavior flags

flags | Name | Value | | ---- | ---- | | ANCHOR_TEXT_RTL | 1 | ANCHOR_MONOSPACE_MEASURE | 2 | MEASURE_EVERY_TIME | 4 | BASELINE_RELATIVE | 8 ### DrawTextAnchored Illustration The DrawTextAnchored operation renders text relative to an anchor point (x, y) using horizontal (panX) and vertical (panY) values ranging from -1.0 to 1.0. #### Center Aligned (panX: 0, panY: 0)

Top-Left Aligned (panX: -1, panY: -1)

Bottom-Right Aligned (panX: 1, panY: 1)

TextFromFloat Convert a float value into a formatted string 5 Fields, total size 17 bytes

TypeNameDescription
BYTETextFromFloatValue: 135
INTtextIdThe ID of the resulting text
FLOATvalueThe float value to convert
SHORTdigitsBeforeNumber of digits before the decimal point
SHORTdigitsAfterNumber of digits after the decimal point
INTflagsFormatting and padding flags

TextMerge Merge two strings into one 3 Fields, total size 13 bytes

TypeNameDescription
BYTETextMergeValue: 136
INTtextIdThe ID of the resulting text
INTsrcId1The ID of the first source string
INTsrcId2The ID of the second source string

TextFromFloat Look up a string from a collection via index 3 Fields, total size 13 bytes

TypeNameDescription
BYTETextFromFloatValue: 151
INTtextIdThe ID of the resulting text
INTdataSetIdThe ID of the string collection
FLOATindexThe index of the string to retrieve

TextLookupInt Look up a string from a collection via an integer index variable 3 Fields, total size 13 bytes

TypeNameDescription
BYTETextLookupIntValue: 153
INTtextIdThe ID of the resulting text
INTdataSetIdThe ID of the string collection
INTindexIdThe ID of the integer index variable

TextMeasure Measure text dimensions and store the result in a float variable 3 Fields, total size 13 bytes

TypeNameDescription
BYTETextMeasureValue: 155
INTidThe ID of the float variable to store the result
INTtextIdThe ID of the text to measure
INTtypeThe type of measurement (WIDTH, HEIGHT, etc.)

type | Name | Value | | ---- | ---- | | MEASURE_WIDTH | 0 | MEASURE_HEIGHT | 1 | MEASURE_LEFT | 2 | MEASURE_RIGHT | 3 | MEASURE_TOP | 4 | MEASURE_BOTTOM | 5 ### TextMeasure Illustration The TextMeasure operation calculates dimensions of a text string, such as its width, height, or relative positions like the baseline.

TextLength Get the length of a string and store it in a float variable 2 Fields, total size 9 bytes

TypeNameDescription
BYTETextLengthValue: 156
INTlengthIdThe ID of the float variable to store the length
INTtextIdThe ID of the text to measure

BitmapFontData Define a bitmap font with glyph metadata and optional kerning 13 Fields, total size 29 bytes

TypeNameDescription
BYTEBitmapFontDataValue: 167
INTidThe ID of the bitmap font
INTversionAndNumGlyphsEncoded version and number of glyphs
UTF8chars[0..n]The characters for each glyph
INTbitmapId[0..n]The bitmap ID for each glyph
SHORTmarginLeft[0..n]Left margin for each glyph
SHORTmarginTop[0..n]Top margin for each glyph
SHORTmarginRight[0..n]Right margin for each glyph
SHORTmarginBottom[0..n]Bottom margin for each glyph
SHORTwidth[0..n]Width for each glyph
SHORTheight[0..n]Height for each glyph
SHORTkerningSizeNumber of entries in the kerning table
UTF8glyphPair[0..n]Glyph pair for kerning
SHORTadjustment[0..n]Horizontal adjustment for kerning pair
TypeNameDescription
BYTETextMeasureValue: 170
INTidThe ID of the float variable to store the result
INTtextIdThe ID of the text variable to measure
SHORTtypeThe type of property to extract
SHORTunusedunused field

TextSubtext (added in v7) Extract a substring from a source string 4 Fields, total size 17 bytes

TypeNameDescription
BYTETextSubtextValue: 182
INTtextIdThe ID of the resulting substring
INTsrcId1The ID of the source string
FLOATstartThe start index of the substring
FLOATlenThe length of the substring (or -1 for remainder)

BitmapTextMeasure (added in v7) Measure text dimensions specifically for bitmap fonts 5 Fields, total size 21 bytes

TypeNameDescription
BYTEBitmapTextMeasureValue: 183
INTidThe ID of the float variable to store the result
INTtextIdThe ID of the text to measure
INTbitmapFontIdThe ID of the bitmap font
INTtypeThe type of measurement (WIDTH, HEIGHT, etc.)
FLOATglyphSpacingHorizontal spacing adjustment between glyphs in pixels

DrawBitmapTextAnchored (added in v7) Draw bitmap font text anchored to a point with alignment (pan) 8 Fields, total size 33 bytes

TypeNameDescription
BYTEDrawBitmapTextAnchoredValue: 184
INTtextIdThe ID of the text to render
INTbitmapFontIdThe ID of the bitmap font
FLOATstartThe start index of the text to render
FLOATendThe end index of the text to render
FLOATxThe x-position of the anchor point
FLOATyThe y-position of the anchor point
FLOATpanXThe horizontal pan from left(-1) to right(1), 0 being centered
FLOATpanYThe vertical pan from top(-1) to bottom(1), 0 being centered

TextTransform [EXPERIMENTAL] (added in v7) !!! WARNING Experimental operation Transform a string (case conversion, trimming, etc.) 5 Fields, total size 21 bytes

TypeNameDescription
BYTETextTransformValue: 199
INTtextIdThe ID of the resulting transformed text
INTsrcId1The ID of the source string
FLOATstartThe start index of the transformation range
FLOATlenThe length of the transformation range
INToperationThe type of transformation to apply

operation | Name | Value | | ---- | ---- | | TEXT_TO_LOWERCASE | 1 | TEXT_TO_UPPERCASE | 2 | TEXT_TRIM | 3 | TEXT_CAPITALIZE | 4 | TEXT_UPPERCASE_FIRST_CHAR | 5 ## TextLayout Text layout implementation 11 Fields, total size 45 bytes

TypeNameDescription
BYTETextLayoutValue: 208
INTcomponentIdUnique ID for this component
INTanimationIdID used to match components for animation purposes
INTtextIdThe ID of the text to display
INTcolorThe text color (ARGB)
FLOATfontSizeThe font size in pixels
INTfontStyleThe font style (0=normal, 1=italic)
FLOATfontWeightThe font weight [1..1000]
INTfontFamilyIdThe ID of the font family name string
INTtextAlignThe text alignment and flags
INToverflowThe overflow strategy
INTmaxLinesThe maximum number of lines

Layout Operations High-level structural components (Box, Row, Column, etc.) used to build the UI hierarchy. Operations in this category: | ID | Name | Version | Size (bytes) | ---- | ---- | ---- | ---- | | 2 | ComponentStart | v6 | 17 | 200 | RootLayout | v6 | 5 | 201 | LayoutContent | v6 | 5 | 209 | HostAction | v6 | 5 | 210 | HostNamedAction | v6 | 9 | 216 | HostActionMetadata | v6 | 9 | 217 | StateLayout | v6 | 21 ## ComponentStart Basic component encapsulating draw commands. This is not resizable. 4 Fields, total size 17 bytes

TypeNameDescription
BYTEComponentStartValue: 2
INTtypeType of component
INTcomponentIdUnique ID for this component
FLOATwidthWidth of the component
FLOATheightHeight of the component

RootLayout Root element for a document. Other components / layout managers are children in the component tree starting from this Root component. 1 Fields, total size 5 bytes

TypeNameDescription
BYTERootLayoutValue: 200
INTcomponentIdUnique ID for this component

LayoutContent Container for child components. BoxLayout, RowLayout and ColumnLayout expect a LayoutComponentContent as a child, encapsulating the components that need to be laid out. 1 Fields, total size 5 bytes

TypeNameDescription
BYTELayoutContentValue: 201
INTcomponentIdUnique ID for this component

HostAction Host action. This operation represents a host action 1 Fields, total size 5 bytes

TypeNameDescription
BYTEHostActionValue: 209
INTACTION_IDHost Action ID

HostNamedAction Host Named action. This operation represents a host action 2 Fields, total size 9 bytes

TypeNameDescription
BYTEHostNamedActionValue: 210
INTTEXT_IDNamed Host Action Text ID
INTVALUE_IDNamed Host Action Value ID

HostActionMetadata Host action + metadata. This operation represents a host action that can also provides some metadata 2 Fields, total size 9 bytes

TypeNameDescription
BYTEHostActionMetadataValue: 216
INTACTION_IDHost Action ID
INTMETADATAHost Action Text Metadata ID

StateLayout A layout that switches between child layouts based on an index 5 Fields, total size 21 bytes

TypeNameDescription
BYTEStateLayoutValue: 217
INTcomponentIdUnique ID for this component
INTanimationIdID for animation purposes
INThorizontalPositioningHorizontal positioning value
INTverticalPositioningVertical positioning value
INTindexIdThe ID of the variable providing the current state index

Layout Managers Higher-level components that manage the positioning and sizing of their children according to specific algorithms (Row, Column, Box, etc.). Operations in this category: | ID | Name | Version | Size (bytes) | ---- | ---- | ---- | ---- | | 176 | FitBoxLayout | v6 | 17 | 202 | BoxLayout | v6 | 17 | 203 | RowLayout | v6 | 21 | 204 | ColumnLayout | v6 | 21 | 205 | CanvasLayout | v6 | 9 | 230 | CollapsibleRow | v6 | 21 | 233 | CollapsibleColumn | v6 | 21 | 234 | ImageLayout | v6 | 21 | 239 | CoreText | v7 | 85 + null x 4 + null x 4 | 240 | FlowLayout | v7 | 21 ## FitBoxLayout FitBox layout implementation. Only displays the first child component that fits in the available space. 4 Fields, total size 17 bytes

TypeNameDescription
BYTEFitBoxLayoutValue: 176
INTcomponentIdUnique ID for this component
INTanimationIdID used to match components for animation purposes
INThorizontalPositioningHorizontal positioning value
INTverticalPositioningVertical positioning value

horizontalPositioning | Name | Value | | ---- | ---- | | START | 1 | CENTER | 2 | END | 3 ### verticalPositioning | Name | Value | | ---- | ---- | | TOP | 4 | CENTER | 2 | BOTTOM | 5 ### FitBox Layout Algorithm FitBox is a specialized container that only renders the **first** child component that completely fits within the available space. #### Visual Illustration (Animated Fitting Logic)

Measurement and Selection 1. **Fitting Logic**: - The layout iterates through its children in order. - For each child, it checks its minimum required dimensions (defined by WidthIn or HeightIn modifiers). - The first child whose minimum width and height are less than or equal to the FitBox's available constraints is selected. 2. **Visibility Control**: - The selected child is marked as VISIBLE. - All other children are marked as GONE. - If no child fits, the FitBox itself may become GONE. 3. **Sizing**: - The FitBox takes the measured size of the single selected child. ## BoxLayout Box layout implementation. Child components are laid out independently from one another, and painted in their hierarchy order (first children drawnbefore the latter). Horizontal and Vertical positioningare supported. 4 Fields, total size 17 bytes

TypeNameDescription
BYTEBoxLayoutValue: 202
INTCOMPONENT_IDunique id for this component
INTANIMATION_IDid used to match components, for animation purposes
INTHORIZONTAL_POSITIONINGhorizontal positioning value
INTVERTICAL_POSITIONINGvertical positioning value

HORIZONTAL_POSITIONING | Name | Value | | ---- | ---- | | START | 1 | CENTER | 2 | END | 3 ### VERTICAL_POSITIONING | Name | Value | | ---- | ---- | | TOP | 4 | CENTER | 2 | BOTTOM | 5 ### Box Layout Algorithm The Box Layout manager positions child components independently within its own bounds. It is the most basic container, allowing components to be stacked or positioned relative to the Box's edges. #### Visual Illustration (Alignment)

Measurement Phase The measurement process is handled in computeWrapSize and computeSize. 1. **Independent Measurement**: - Each child component is measured independently with the available width and height of the Box. - If a child has a dynamic LayoutCompute modifier, its size is calculated based on the provided expressions before final measurement. 2. **Intrinsic Size (Wrap Content)**: - If the Box is set to wrap its content, its width will be the maximum width among all its visible children. - Similarly, its height will be the maximum height among all its visible children. #### Layout Phase In the internalLayoutMeasure method, children are positioned based on the Box's alignment rules. 1. **Alignment**: - **Horizontal Positioning**: Children can be aligned to the START, CENTER, or END of the Box. - **Vertical Positioning**: Children can be aligned to the TOP, CENTER, or BOTTOM of the Box. - Each child is positioned using these global rules relative to the Box's internal area (after padding). 2. **Stacking**: - Components are painted in their hierarchy order. The first child in the list is drawn first, and subsequent children are drawn on top if they overlap. ### Examples

| | | | Top | | | Center | | | Bottom | |

RowLayout Row layout implementation, positioning components one after the other horizontally. It supports weight and horizontal/vertical positioning. 5 Fields, total size 21 bytes

TypeNameDescription
BYTERowLayoutValue: 203
INTcomponentIdUnique ID for this component
INTanimationIdID used to match components for animation purposes
INThorizontalPositioningHorizontal positioning value
INTverticalPositioningVertical positioning value
FLOATspacedByHorizontal spacing between components

horizontalPositioning | Name | Value | | ---- | ---- | | START | 1 | CENTER | 2 | END | 3 | SPACE_BETWEEN | 6 | SPACE_EVENLY | 7 | SPACE_AROUND | 8 ### verticalPositioning | Name | Value | | ---- | ---- | | TOP | 4 | CENTER | 2 | BOTTOM | 5 ### Row Layout Algorithm The Row Layout manager positions child components horizontally one after another. It supports intrinsic sizing, weight-based distribution, and various horizontal and vertical alignment strategies. #### Visual Illustration (Weights)

Measurement Phase The measurement process is handled in computeWrapSize and computeSize. 1. **Weight Distribution**: - The layout first identifies children with horizontal weights (WidthModifier.weight). - Children **without** weights are measured first with the available width. The accumulated width of these children is subtracted from the total available space. - The remaining space is then distributed among the weighted children proportional to their weight value. - Each weighted child is measured with its calculated fixed width. 2. **Intrinsic Size**: - The width of the Row is the sum of all children's measured widths plus the spacedBy gaps between them. - The height of the Row is the maximum height among all measured children. #### Layout Phase Once children are measured, the internalLayoutMeasure method determines their final (x, y) coordinates. 1. **Horizontal Positioning**: - **START**: Children are packed at the beginning of the row. - **CENTER**: The entire block of children is centered horizontally. - **END**: Children are packed at the end of the row. - **SPACE_BETWEEN**: The first child is at the start, the last at the end, and the remaining space is distributed evenly between children. - **SPACE_EVENLY**: Space is distributed such that the gap between any two items and the edges is equal. - **SPACE_AROUND**: Space is distributed such that the gap between items is equal, and the gap at the ends is half of the internal gap. 2. **Vertical Positioning**: - Applied individually to each child within the calculated Row height. - **TOP**: Child is at the top. - **CENTER**: Child is vertically centered. - **BOTTOM**: Child is at the bottom. - **Baseline Alignment**: If children have AlignBy modifiers, they are aligned based on their specified baseline or anchor. 3. **Spacing**: - The spacedBy value is added between each child in all positioning modes. ### Examples

| | | | Start | | | Center | | | End | | | SpaceEvenly | | | SpaceAround | | | SpaceBetween | |

ColumnLayout Column layout implementation, positioning components one after the other vertically. It supports weight and horizontal/vertical positioning. 5 Fields, total size 21 bytes

TypeNameDescription
BYTEColumnLayoutValue: 204
INTcomponentIdUnique ID for this component
INTanimationIdID used to match components for animation purposes
INThorizontalPositioningHorizontal positioning value
INTverticalPositioningVertical positioning value
FLOATspacedByHorizontal spacing between components

horizontalPositioning | Name | Value | | ---- | ---- | | START | 1 | CENTER | 2 | END | 3 ### verticalPositioning | Name | Value | | ---- | ---- | | TOP | 4 | CENTER | 2 | BOTTOM | 5 | SPACE_BETWEEN | 6 | SPACE_EVENLY | 7 | SPACE_AROUND | 8 ### Column Layout Algorithm The Column Layout manager positions child components vertically one after another. It is the vertical counterpart to the Row Layout. #### Visual Illustration (Weights)

Measurement Phase 1. **Weight Distribution**: - The layout identifies children with vertical weights (HeightModifier.weight). - Children **without** weights are measured first. Their combined height is subtracted from the total available height. - The remaining vertical space is distributed among weighted children proportional to their weights. 2. **Intrinsic Size**: - The height of the Column is the sum of all children's measured heights plus the spacedBy vertical gaps. - The width of the Column is the maximum width among all measured children. #### Layout Phase 1. **Vertical Positioning**: - **TOP**: Children are packed at the top. - **CENTER**: The block of children is centered vertically. - **BOTTOM**: Children are packed at the bottom. - **SPACE_BETWEEN**, **SPACE_EVENLY**, **SPACE_AROUND**: Similar to Row Layout, but applied vertically to distribute children across the available height. 2. **Horizontal Positioning**: - Applied individually to each child within the Column's width. - **START**, **CENTER**, **END**: Aligns children horizontally within the column. 3. **Spacing**: - The spacedBy value is added between each child vertically. ### Examples

|

| | | Top |

|

| | | Center |

|

| | | Bottom |

|

| | | SpaceEvenly |

|

| | | SpaceAround |

|

| | | SpaceBetween |

|

CanvasLayout Canvas implementation. Encapsulates drawing operations. 2 Fields, total size 9 bytes

TypeNameDescription
BYTECanvasLayoutValue: 205
INTcomponentIdUnique ID for this component
INTanimationIdID used to match components for animation purposes

Canvas Layout Algorithm Canvas Layout is a container optimized for custom drawing operations while still supporting child components. #### Visual Illustration

Layout Logic 1. **Drawing Encapsulation**: - Unlike other layouts, CanvasLayout primarily serves as a scope for Draw operations (DrawRect, DrawCircle, etc.). - All drawing instructions contained within the Canvas are executed relative to the Canvas's top-left corner. 2. **Child Positioning**: - Children of a CanvasLayout are by default positioned at (0, 0) and sized to fill the entire Canvas area if standard LayoutComponentContent is used. - However, if LayoutCompute modifiers are used, children can be positioned anywhere on top of the custom drawing. ## CollapsibleRow A row layout that can hide children if space is insufficient 5 Fields, total size 21 bytes

TypeNameDescription
BYTECollapsibleRowValue: 230
INTcomponentIdUnique ID for this component
INTanimationIdID for animation purposes
INThorizontalPositioningHorizontal positioning value
INTverticalPositioningVertical positioning value
FLOATspacedByHorizontal spacing between components

Collapsible Row Layout Algorithm Collapsible Row extends Row Layout with the ability to automatically hide children that do not fit within the available horizontal space. #### Basic Overflow Animation

Priority-Based Hiding Animation In this example, **Item 2** has a higher priority value (lower importance), so it is hidden **first**. When it disappears, the layout collapses and moves Item 3 into its place.

Measurement Phase 1. **Priority Sorting**: - If children have CollapsiblePriority modifiers, they are sorted by priority (lowest values are kept first). - If priorities are equal, the original hierarchy order is used. 2. **Overflow Detection**: - Children are measured one by one. - The layout keeps track of the accumulated width. - As soon as a child's width would cause the total to exceed the available width, that child and all subsequent children (in priority order) are marked as GONE. #### Layout Phase - The remaining VISIBLE children are laid out exactly like a standard Row Layout, using the specified horizontal and vertical positioning. ## CollapsibleColumn A column layout that can hide children if space is insufficient 5 Fields, total size 21 bytes

TypeNameDescription
BYTECollapsibleColumnValue: 233
INTcomponentIdUnique ID for this component
INTanimationIdID for animation purposes
INThorizontalPositioningHorizontal positioning value
INTverticalPositioningVertical positioning value
FLOATspacedByVertical spacing between components

Collapsible Column Layout Algorithm Collapsible Column extends Column Layout by hiding children that exceed the available vertical space. #### Basic Overflow Animation

Priority-Based Hiding Animation In this example, **Item 2** has a higher priority value (lower importance), so it is hidden **first**. Notice how Item 3 shifts up to fill the gap when Item 2 is removed.

Measurement Phase 1. **Priority Sorting**: - Children are sorted based on their CollapsiblePriority modifier. 2. **Overflow Detection**: - The layout measures children and accumulates their heights. - Any child that would cause the total height to exceed the Column's maximum height is marked as GONE. #### Layout Phase - Visible children are positioned vertically according to standard Column Layout rules (Top, Center, Bottom, etc.). ## ImageLayout Image layout implementation 5 Fields, total size 21 bytes

TypeNameDescription
BYTEImageLayoutValue: 234
INTcomponentIdUnique ID for this component
INTanimationIdID used to match components for animation purposes
INTbitmapIdThe ID of the bitmap to display
INTscaleTypeThe scale type to apply
FLOATalphaThe alpha transparency [0..1]

Image Layout Algorithm Image Layout handles the display and scaling of bitmap resources. #### Visual Illustration (Scale Modes)

Sizing 1. **Wrap Content**: - If sizing is not constrained, the component takes the intrinsic width and height of the source bitmap. 2. **Scaling**: - Calculates a destination rectangle within the component's bounds based on the scaleType. - Supports typical scaling modes like Fit, CenterCrop, and Fill. #### Rendering - Applies alpha transparency. - Clips the bitmap to the component's bounds if the scaled image exceeds them. ## CoreText [EXPERIMENTAL] (added in v7) !!! WARNING Experimental operation Core text layout implementation with advanced styling 26 Fields, total size 85 + null x 4 + null x 4 bytes

TypeNameDescription
BYTECoreTextValue: 239
INTtextIdThe ID of the text to display
INTcomponentIdUnique ID for this component
INTanimationIdID for animation purposes
INTcolorThe text color (ARGB)
INTcolorIdThe ID of the color variable
FLOATfontSizeThe font size
FLOATminFontSizeMinimum font size for autosize
FLOATmaxFontSizeMaximum font size for autosize
INTfontStyleThe font style
FLOATfontWeightThe font weight
INTfontFamilyThe ID of the font family
INTtextAlignText alignment
INToverflowOverflow behavior
INTmaxLinesMaximum number of lines
FLOATletterSpacingLetter spacing
FLOATlineHeightAddLine height addition
FLOATlineHeightMultiplierLine height multiplier
INTlineBreakStrategyLine break strategy
INThyphenationFrequencyHyphenation frequency
INTjustificationModeJustification mode
BOOLEANunderlineWhether to underline
BOOLEANstrikethroughWhether to strikethrough
INT[]fontAxisFont axis tags
FLOAT[]fontAxisValuesFont axis values
BOOLEANautosizeWhether to enable autosize
INTflagsBehavior flags

Core Text Layout Algorithm Core Text is a leaf layout component responsible for high-fidelity text rendering and measurement. #### Visual Illustration (Autosize and Alignment)

Measurement Phase 1. **Complex Text Analysis**: - The algorithm checks for features requiring complex layout: line breaks (\n), tabs (\t), letter spacing, varied line heights, or overflow ellipsis. - If these are present, it uses a complex layout engine to calculate line breaks and word wrapping. 2. **Autosize**: - If autosize is enabled, the layout performs a binary search between minFontSize and maxFontSize. - It finds the largest font size that allows the text to fit within the provided maxWidth and maxHeight without causing unexpected hyphenation or overflow. 3. **Intrinsic Size**: - The measured size is the bounding box of the rendered text glyphs. #### Styling and Alignment - Supports ARGB colors (static or dynamic via ID). - Supports font weights, styles (italic), and variable font axes. - Horizontal alignment (Left, Center, Right, Justify) is applied during the text layout process. ## FlowLayout [EXPERIMENTAL] (added in v7) !!! WARNING Experimental operation Flow layout implementation. Positions components one after the other horizontally and wraps to the next line if space is exhausted. 5 Fields, total size 21 bytes

TypeNameDescription
BYTEFlowLayoutValue: 240
INTcomponentIdUnique ID for this component
INTanimationIdID for animation purposes
INThorizontalPositioningHorizontal positioning value
INTverticalPositioningVertical positioning value
FLOATspacedByHorizontal spacing between components

horizontalPositioning | Name | Value | | ---- | ---- | | START | 1 | CENTER | 2 | END | 3 | SPACE_BETWEEN | 6 | SPACE_EVENLY | 7 | SPACE_AROUND | 8 ### verticalPositioning | Name | Value | | ---- | ---- | | TOP | 4 | CENTER | 2 | BOTTOM | 5 ### Flow Layout Algorithm The Flow Layout manager positions child components horizontally and automatically wraps them to a new "row" when the available width is exhausted. #### Visual Illustration

Measurement Phase 1. **Segmentation**: - The algorithm first iterates through children to determine which ones fit on the current line. - If a child (including its minimum width if weighted) exceeds the remaining width in the current line, a new line is started. - This results in a list of "rows," where each row is a collection of components. 2. **Wrap Sizing**: - The total width is the maximum width of any individual row. - The total height is the sum of the heights of all rows. #### Layout Phase 1. **Row Processing**: - Each segment (row) identified in the measurement phase is treated like an individual Row Layout. - Horizontal alignment (START, CENTER, END, etc.) is applied to components within each row. - Vertical alignment (TOP, CENTER, BOTTOM) determines how the entire block of rows is positioned within the Flow Layout's total height. 2. **Spacing**: - Horizontal spacing between components in a row is controlled by spacedBy. # Modifier Operations Augmentations applied to components to change their dimensions, appearance, or behavior. Operations in this category: | ID | Name | Version | Size (bytes) | ---- | ---- | ---- | ---- | | 16 | WidthModifierOperation | v6 | 9 | 54 | RoundedClipRectModifierOperation | v6 | 17 | 55 | BackgroundModifierOperation | v6 | 37 | 58 | PaddingModifierOperation | v6 | 17 | 59 | ClickModifier | v6 | 1 | 67 | HeightModifierOperation | v6 | 9 | 107 | BorderModifierOperation | v6 | 45 | 108 | ClipRectModifierOperation | v6 | 1 | 174 | DrawContentOperation | v6 | 1 | 211 | ComponentVisibilityOperation | v6 | 5 | 219 | TouchModifier | v6 | 1 | 220 | TouchUpModifier | v6 | 1 | 221 | OffsetModifierOperation | v6 | 9 | 223 | ZIndexModifierOperation | v6 | 5 | 224 | GraphicsLayerModifierOperation | v6 | 5 | 225 | TouchCancelModifier | v6 | 1 | 226 | ScrollModifierOperation | v6 | 17 | 228 | MarqueeModifierOperation | v6 | 25 | 229 | RippleModifier | v6 | 1 | 231 | WidthInModifierOperation | v6 | 9 | 232 | HeightInModifierOperation | v6 | 9 | 235 | CollapsiblePriorityModifierOperation | v6 | 9 | 237 | AlignByModifierOperation | v7 | 9 | 238 | LayoutCompute | v7 | 9 ## WidthModifierOperation Set the width dimension on a component 2 Fields, total size 9 bytes

TypeNameDescription
BYTEWidthModifierOperationValue: 16
INTtypeThe type of dimension rule (0=FIXED, 1=WRAP, etc.)
FLOATvalueThe width value

RoundedClipRectModifierOperation Clip the component's content to its rounded rectangular bounds 4 Fields, total size 17 bytes

TypeNameDescription
BYTERoundedClipRectModifierOperationValue: 54
FLOATtopStartThe topStart radius of the rectangle
FLOATtopEndThe topEnd radius of the rectangle
FLOATbottomStartThe bottomStart radius of the rectangle
FLOATbottomEndThe bottomEnd radius of the rectangle

RoundedClipRect Illustration The RoundedClipRect modifier restricts the drawing area of a component to its own bounds with rounded corners.

BackgroundModifierOperation Define a background color or shape for a component 9 Fields, total size 37 bytes

TypeNameDescription
BYTEBackgroundModifierOperationValue: 55
INTflagsBehavior flags
INTcolorIdThe ID of the color if flags include COLOR_REF
INTreserve1Reserved for future use
INTreserve2Reserved for future use
FLOATrRed component [0..1]
FLOATgGreen component [0..1]
FLOATbBlue component [0..1]
FLOATaAlpha component [0..1]
INTshapeTypeThe shape type (0=RECTANGLE, 1=CIRCLE)

Background Modifier Illustration The Background modifier applies a color and shape behind a component. #### Rectangle Shape

Circle Shape

PaddingModifierOperation Define padding around a component 4 Fields, total size 17 bytes

TypeNameDescription
BYTEPaddingModifierOperationValue: 58
FLOATleftLeft padding
FLOATtopTop padding
FLOATrightRight padding
FLOATbottomBottom padding

Padding Modifier Illustration The Padding modifier adds space around a component's content.

ClickModifier Click modifier. This operation contains a list of action operations executed on click 0 Fields, total size 1 bytes

TypeNameDescription
BYTEClickModifierValue: 59

HeightModifierOperation Set the height dimension on a component 2 Fields, total size 9 bytes

TypeNameDescription
BYTEHeightModifierOperationValue: 67
INTtypeThe type of dimension rule (0=FIXED, 1=WRAP, etc.)
FLOATvalueThe height value

BorderModifierOperation Define a border for a component 11 Fields, total size 45 bytes

TypeNameDescription
BYTEBorderModifierOperationValue: 107
INTflagsBehavior flags
INTcolorIdThe ID of the color if flags include COLOR_REF
INTreserve1Reserved for future use
INTreserve2Reserved for future use
FLOATborderWidthWidth of the border
FLOATroundedCornerRadius for rounded corners
FLOATrRed component [0..1]
FLOATgGreen component [0..1]
FLOATbBlue component [0..1]
FLOATaAlpha component [0..1]
INTshapeTypeThe shape type (0=RECTANGLE, 1=CIRCLE)

Border Modifier Illustration The Border modifier draws a stroke around the component's edge with a specific width and corner radius.

ClipRectModifierOperation Clip the component's content to its rectangular bounds 0 Fields, total size 1 bytes

TypeNameDescription
BYTEClipRectModifierOperationValue: 108

ClipRect Illustration The ClipRect modifier restricts the drawing area of a component to its own rectangular bounds.

DrawContentOperation A modifier that triggers drawing of the component's content 0 Fields, total size 1 bytes

TypeNameDescription
BYTEDrawContentOperationValue: 174

ComponentVisibilityOperation Set component visibility from a provided integer variable 1 Fields, total size 5 bytes

TypeNameDescription
BYTEComponentVisibilityOperationValue: 211
INTvisibilityIdThe ID of the integer variable representing visibility

ComponentVisibility Illustration The ComponentVisibility modifier controls whether a component is visible, hidden but still taking up space, or completely removed from the layout.

TouchModifier Touch down modifier. This operation contains a list of action operations executed on touch down 0 Fields, total size 1 bytes

TypeNameDescription
BYTETouchModifierValue: 219

TouchUpModifier Touch up modifier. This operation contains a list of action operations executed on touch up 0 Fields, total size 1 bytes

TypeNameDescription
BYTETouchUpModifierValue: 220

OffsetModifierOperation Shift the component's position 2 Fields, total size 9 bytes

TypeNameDescription
BYTEOffsetModifierOperationValue: 221
FLOATxX offset
FLOATyY offset

Offset Modifier Illustration The Offset modifier shifts the position of a component by a specific amount in X and Y without affecting its layout in the parent.

ZIndexModifierOperation Define the Z-Index of a component 1 Fields, total size 5 bytes

TypeNameDescription
BYTEZIndexModifierOperationValue: 223
FLOATvalueThe Z-Index value

ZIndex Illustration The ZIndex modifier determines the stacking order of overlapping components. Components with a higher Z-Index are drawn on top of those with a lower value.

GraphicsLayerModifierOperation Define transformations (scale, rotation, alpha) for a component 3 Fields, total size 5 bytes

TypeNameDescription
BYTEGraphicsLayerModifierOperationValue: 224
INTlengthNumber of attributes
REPEATED DATA
TypeNameDescription
INTattributeIdThe ID and type of the attribute
FLOATattributeValueThe value of the attribute

| | REPEATED DATA |

TypeNameDescription
INTattributeIdThe ID and type of the attribute
INTattributeValueThe value of the attribute

|

GraphicsLayer Illustration The GraphicsLayer modifier applies advanced transformations and effects like rotation, scaling, and transparency to a component.

TouchCancelModifier Touch cancel modifier. This operation contains a list of action operations executed on touch cancel 0 Fields, total size 1 bytes

TypeNameDescription
BYTETouchCancelModifierValue: 225

ScrollModifierOperation Define a scrolling behavior for a component 4 Fields, total size 17 bytes

TypeNameDescription
BYTEScrollModifierOperationValue: 226
INTdirectionDirection of the scroll (0=VERTICAL, 1=HORIZONTAL)
FLOATpositionThe current scroll position (expression)
FLOATmaxThe maximum scroll position
FLOATnotchMaxThe maximum notch position

Scroll Modifier Illustration The Scroll modifier allows a component to have a larger internal content area than its physical viewport bounds.

MarqueeModifierOperation Define a scrolling marquee effect for a component 6 Fields, total size 25 bytes

TypeNameDescription
BYTEMarqueeModifierOperationValue: 228
INTiterationsNumber of iterations
INTanimationModeAnimation mode
FLOATrepeatDelayMillisRepeat delay in ms
FLOATinitialDelayMillisInitial delay in ms
FLOATspacingSpacing between marquee iterations
FLOATvelocityVelocity of the marquee animation

Marquee Illustration The Marquee modifier creates a scrolling animation for text that is too long to fit within its container.

RippleModifier Ripple modifier. This modifier will do a ripple animation on touch down 0 Fields, total size 1 bytes

TypeNameDescription
BYTERippleModifierValue: 229

WidthInModifierOperation Add additional constraints to the width 2 Fields, total size 9 bytes

TypeNameDescription
BYTEWidthInModifierOperationValue: 231
FLOATminThe minimum width, -1 if not applied
FLOATmaxThe maximum width, -1 if not applied

HeightInModifierOperation Add additional constraints to the height 2 Fields, total size 9 bytes

TypeNameDescription
BYTEHeightInModifierOperationValue: 232
FLOATminThe minimum height, -1 if not applied
FLOATmaxThe maximum height, -1 if not applied

CollapsiblePriorityModifierOperation Add additional priority to children of collapsible layouts 2 Fields, total size 9 bytes

TypeNameDescription
BYTECollapsiblePriorityModifierOperationValue: 235
INTorientationHorizontal(0) or Vertical (1)
FLOATpriorityThe associated priority

AlignByModifierOperation [EXPERIMENTAL] (added in v7) !!! WARNING Experimental operation Align a component based on a specific baseline or anchor 2 Fields, total size 9 bytes

TypeNameDescription
BYTEAlignByModifierOperationValue: 237
FLOATlineThe ID of the float variable or baseline ID to align by
INTflagsAlignment flags

LayoutCompute [EXPERIMENTAL] (added in v7) !!! WARNING Experimental operation Compute component position and measure via dynamic expressions 3 Fields, total size 9 bytes

TypeNameDescription
BYTELayoutComputeValue: 238
INTtypeType of computation (0=MEASURE, 1=POSITION)
INTboundsIdThe ID of the float list variable to store the bounds
BOOLEANanimateChangesWhether to animate layout changes

Actions & Events Operations Interactive side effects, including host-side actions and dynamic state updates. Operations in this category: | ID | Name | Version | Size (bytes) | ---- | ---- | ---- | ---- | | 212 | ValueIntegerChangeActionOperation | v6 | 9 | 213 | ValueStringChangeActionOperation | v6 | 9 | 218 | ValueIntegerExpressionChangeActionOperation | v6 | 17 | 222 | ValueFloatChangeActionOperation | v6 | 9 | 227 | ValueFloatExpressionChangeActionOperation | v6 | 9 ## ValueIntegerChangeActionOperation Action that sets a new value for an integer variable 2 Fields, total size 9 bytes

TypeNameDescription
BYTEValueIntegerChangeActionOperationValue: 212
INTtargetValueIdThe ID of the integer variable to update
INTvalueThe new integer value to assign

ValueStringChangeActionOperation Action that sets a new value for a string variable 2 Fields, total size 9 bytes

TypeNameDescription
BYTEValueStringChangeActionOperationValue: 213
INTtargetValueIdThe ID of the string variable to update
INTvalueIdThe ID of the new string value to assign

ValueIntegerExpressionChangeActionOperation Action that updates an integer variable via a dynamic expression 2 Fields, total size 17 bytes

TypeNameDescription
BYTEValueIntegerExpressionChangeActionOperationValue: 218
LONGtargetValueIdThe ID of the integer variable to update
LONGvalueExpressionIdThe ID of the expression to evaluate

ValueFloatChangeActionOperation Action that sets a new value for a float variable 2 Fields, total size 9 bytes

TypeNameDescription
BYTEValueFloatChangeActionOperationValue: 222
INTtargetValueIdThe ID of the float variable to update
FLOATvalueThe new float value to assign

ValueFloatExpressionChangeActionOperation Action that updates a float variable via a dynamic expression 2 Fields, total size 9 bytes

TypeNameDescription
BYTEValueFloatExpressionChangeActionOperationValue: 227
INTtargetValueIdThe ID of the float variable to update
INTvalueExpressionIdThe ID of the expression to evaluate

Animation & Particles Operations Specialized systems for time-based transitions, impulses, and complex particle effects. Operations in this category: | ID | Name | Version | Size (bytes) | ---- | ---- | ---- | ---- | | 14 | AnimationSpec | v6 | 29 | 161 | ParticlesCreate | v6 | 21 + null x 4 | 163 | ParticlesLoop | v6 | 17 + null x 4 + null x 4 | 164 | ImpulseOperation | v6 | 9 | 165 | ImpulseProcess | v6 | 1 | 194 | ParticlesCompare | v7 | 27 + null x 4 + null x 4 + null x 4 ## AnimationSpec Define the animation specifications for a component 7 Fields, total size 29 bytes

TypeNameDescription
BYTEAnimationSpecValue: 14
INTanimationIdThe ID of the animation
FLOATmotionDurationDuration of the motion animation in ms
INTmotionEasingTypeThe type of easing for motion
FLOATvisibilityDurationDuration of visibility animation in ms
INTvisibilityEasingTypeThe type of easing for visibility
INTenterAnimationThe entry animation type
INTexitAnimationThe exit animation type

AnimationSpec Illustration The AnimationSpec defines easing curves and durations for motion and visibility transitions. #### Easing Curves (Cubic Bezier)

ParticlesCreate Create a particle system 6 Fields, total size 21 + null x 4 bytes

TypeNameDescription
BYTEParticlesCreateValue: 161
INTidThe ID of the particle system
INTparticleCountNumber of particles to create
INTvarCountNumber of variables associated with each particle
INTvarId[0..n]The ID of each associated variable
INTequLen[0..n]The length of the initialization equation for each variable
FLOAT[]equations[0..n]The initialization equations (RPN)

Particles Illustration The ParticlesCreate operation defines a particle emitter that generates short-lived visual elements with dynamic velocity, spread, and life.

ParticlesLoop Update and recycle particles in a system 6 Fields, total size 17 + null x 4 + null x 4 bytes

TypeNameDescription
BYTEParticlesLoopValue: 163
INTidThe ID of the particle system
INTrestartLenThe length of the restart equation (recycles particle if > 0)
FLOAT[]restartEquationThe restart equation (RPN)
INTvarCountThe number of update equations
INTequLen[0..n]The length of each update equation
FLOAT[]equations[0..n]The update equations (RPN)

ImpulseOperation Execute a list of actions once, and a process block for a fixed duration 2 Fields, total size 9 bytes

TypeNameDescription
BYTEImpulseOperationValue: 164
FLOATdurationDuration of the impulse
FLOATstartAtThe start time of the impulse

ImpulseProcess A block of operations executed during an active impulse 0 Fields, total size 1 bytes

TypeNameDescription
BYTEImpulseProcessValue: 165

ParticlesCompare (added in v7) Compare particles and execute conditional logic 10 Fields, total size 27 + null x 4 + null x 4 + null x 4 bytes

TypeNameDescription
BYTEParticlesCompareValue: 194
INTidThe ID of the particle system
SHORTflagsConfiguration flags
FLOATminThe minimum index to process
FLOATmaxThe maximum index to process
INTexpLenThe length of the comparison expression
FLOAT[]expressionThe comparison expression (RPN)
INTres1CountThe number of equations in the first result block
FLOAT[]res1EquationsThe equations for the first result block
INTres2CountThe number of equations in the second result block
FLOAT[]res2EquationsThe equations for the second result block

Logic & Expressions Operations Dynamic calculations, conditional execution, loops, and measurement utilities. Operations in this category: | ID | Name | Version | Size (bytes) | ---- | ---- | ---- | ---- | | 81 | FloatExpression | v6 | 9 | 144 | IntegerExpression | v6 | 13 + null x 4 | 150 | ComponentValue | v6 | 13 | 157 | TouchExpression | v6 | 37 | 171 | ImageAttribute | v6 | 13 | 172 | TimeAttribute | v6 | 13 | 178 | ConditionalOperations | v6 | 10 | 192 | IdLookup | v7 | 13 | 215 | Loop | v6 | 17 ## FloatExpression Define a float via dynamic expression and optional animation 6 Fields, total size 9 bytes

TypeNameDescription
BYTEFloatExpressionValue: 81
INTidThe ID of the resulting float
SHORTexpression_lengthThe length of the expression
SHORTanimation_lengthThe length of the animation spec
REPEATED FLOATexpressionSequence of floats representing an expression (RPN)
REPEATED FLOATanimationSpecSequence of floats representing an animation curve
TypeNameDescription
FLOATdurationTime in sec
INTbitsWRAP
REPEATED FLOATspecSPEC PARAMETERS
FLOATinitialValueInitial value
FLOATwrapValueWrap value

|

IntegerExpression Define an integer via dynamic expression 4 Fields, total size 13 + null x 4 bytes

TypeNameDescription
BYTEIntegerExpressionValue: 144
INTidThe ID of the resulting integer
INTmaskBitmask representing whether each value is a constant or an ID
INTlengthThe number of elements in the expression
INT[]valuesThe array of constants, IDs, and operators (RPN)

ComponentValue Expose a component's layout property (width, height, etc.) as a variable 3 Fields, total size 13 bytes

TypeNameDescription
BYTEComponentValueValue: 150
INTtypeThe type of value to expose
INTcomponentIdThe ID of the component to reference
INTvalueIdThe ID of the variable to store the value in

type | Name | Value | | ---- | ---- | | WIDTH | 0 | HEIGHT | 1 | POS_X | 2 | POS_Y | 3 | POS_ROOT_X | 4 | POS_ROOT_Y | 5 | CONTENT_WIDTH | 6 | CONTENT_HEIGHT | 7 ## TouchExpression Define a float value derived from touch interactions 12 Fields, total size 37 bytes

TypeNameDescription
BYTETouchExpressionValue: 157
INTidThe ID of the resulting float variable
FLOATvalueThe initial value
FLOATminThe minimum allowed value
FLOATmaxThe maximum allowed value
FLOATvelocityIdReserved for velocity ID
INTtouchEffectsHaptic feedback and touch behavior flags
INTexpression_lengthThe length of the touch mapping expression
REPEATED FLOATexpressionSequence of floats representing touch mapping (RPN)
INTstopModeAndLenEncoded stop mode and length of stop spec
REPEATED FLOATstopSpecParameters for stop behavior (e.g., notches)
INTeasingLenThe length of the easing spec
REPEATED FLOATeasingSpecParameters for deceleration easing
TypeNameDescription
BYTEImageAttributeValue: 171
INTidThe ID of the float variable to store the result
INTimageIdThe ID of the image variable to extract from
SHORTtypeThe type of property to extract (0=WIDTH, 1=HEIGHT)
SHORTargsLengthThe number of additional arguments
REPEATED INTargsThe additional arguments
TypeNameDescription
BYTETimeAttributeValue: 172
INTidThe ID of the float variable to store the result
INTtimeIdThe ID of the time variable to extract from
SHORTtypeThe type of time information to extract
SHORTargsLengthThe number of additional arguments
REPEATED INTargsThe additional arguments

ConditionalOperations Execute a list of operations if a condition is met 3 Fields, total size 10 bytes

TypeNameDescription
BYTEConditionalOperationsValue: 178
BYTEtypeThe type of comparison (EQ, NEQ, LT, etc.)
FLOATvarAThe first value to compare
FLOATvarBThe second value to compare

type | Name | Value | | ---- | ---- | | TYPE_EQ | 0 | TYPE_NEQ | 1 | TYPE_LT | 2 | TYPE_LTE | 3 | TYPE_GT | 4 | TYPE_GTE | 5 ## IdLookup (added in v7) Look up an ID from an ID collection via index 3 Fields, total size 13 bytes

TypeNameDescription
BYTEIdLookupValue: 192
INTtextIdThe ID of the integer variable to store the result
FLOATdataSetThe ID of the collection
FLOATindexThe index of the ID to retrieve

Loop Execute a list of operations in a loop 4 Fields, total size 17 bytes

TypeNameDescription
BYTELoopValue: 215
INTindexIdThe ID of the variable to store the loop index
FLOATfromStarting value
FLOATstepIncrement value
FLOATuntilStop value (exclusive)

Matrix Operations Coordinate system transformations, including translation, scaling, rotation, skewing, and matrix math. Operations in this category: | ID | Name | Version | Size (bytes) | ---- | ---- | ---- | ---- | | 126 | MatrixScale | v6 | 17 | 127 | MatrixTranslate | v6 | 9 | 128 | MatrixSkew | v6 | 9 | 129 | MatrixRotate | v6 | 13 | 130 | MatrixSave | v6 | 1 | 131 | MatrixRestore | v6 | 1 | 181 | MatrixFromPath | v7 | 17 | 186 | MatrixConstant | v7 | 9 + null x 4 | 187 | MatrixExpression | v7 | 9 + null x 4 | 188 | MatrixVectorMath | v7 | 15 + null x 4 + null x 4 ## MatrixScale Scale the following draw commands 4 Fields, total size 17 bytes

TypeNameDescription
BYTEMatrixScaleValue: 126
FLOATscaleXThe amount to scale in X
FLOATscaleYThe amount to scale in Y
FLOATpivotXThe x-coordinate for the pivot point
FLOATpivotYThe y-coordinate for the pivot point

MatrixScale Illustration The MatrixScale operation scales the coordinate system by scaleX and scaleY relative to a pivot point (pivotX, pivotY).

MatrixTranslate Preconcat the current matrix with the specified translation 2 Fields, total size 9 bytes

TypeNameDescription
BYTEMatrixTranslateValue: 127
FLOATdxThe distance to translate in X
FLOATdyThe distance to translate in Y

MatrixTranslate Illustration The MatrixTranslate operation moves the coordinate system by dx and dy.

MatrixSkew Current matrix with the specified skew. 2 Fields, total size 9 bytes

TypeNameDescription
BYTEMatrixSkewValue: 128
FLOATskewXThe amount to skew in X
FLOATskewYThe amount to skew in Y

MatrixSkew Illustration The MatrixSkew operation applies a skew (shear) transformation to the coordinate system.

MatrixRotate Apply rotation to matrix 3 Fields, total size 13 bytes

TypeNameDescription
BYTEMatrixRotateValue: 129
FLOATrotateAngle to rotate
FLOATpivotXX Pivot point
FLOATpivotYY Pivot point

MatrixRotate Illustration The MatrixRotate operation rotates the coordinate system by rotate degrees relative to a pivot point (pivotX, pivotY).

MatrixSave Save the matrix and clip to a stack 0 Fields, total size 1 bytes

TypeNameDescription
BYTEMatrixSaveValue: 130

MatrixSave/Restore Illustration MatrixSave pushes the current transformation and clip state onto a stack. MatrixRestore pops the state, returning the coordinate system to its previous configuration.

MatrixRestore Restore the matrix and clip 0 Fields, total size 1 bytes

TypeNameDescription
BYTEMatrixRestoreValue: 131

MatrixFromPath (added in v7) Set the matrix relative to a path position and tangent 4 Fields, total size 17 bytes

TypeNameDescription
BYTEMatrixFromPathValue: 181
INTpathIdThe ID of the path
FLOATpercentThe position on the path [0..1]
FLOATvOffsetVertical offset from the path
INTflagsFlags for position/tangent

flags | Name | Value | | ---- | ---- | | POSITION_MATRIX_FLAG | 1 | TANGENT_MATRIX_FLAG | 2 ### MatrixFromPath Illustration The MatrixFromPath operation calculates a matrix that aligns an object to a specific point and tangent along a path.

MatrixConstant (added in v7) A constant matrix and its associated ID 3 Fields, total size 9 + null x 4 bytes

TypeNameDescription
BYTEMatrixConstantValue: 186
INTmatrixIdThe ID of the matrix
INTtypeThe type of matrix
FLOAT[]valuesThe matrix values

MatrixConstant Illustration The MatrixConstant operation defines a static transformation matrix. In RemoteCompose, matrices are typically 3x3 (9 values) for 2D transformations, following the standard row-major indexing: | | | | |:---:|:---:|:---:| | **MSCALE_X** (0) | **MSKEW_X** (1) | **MTRANS_X** (2) | | **MSKEW_Y** (3) | **MSCALE_Y** (4) | **MTRANS_Y** (5) | | **MPERSP_0** (6) | **MPERSP_1** (7) | **MPERSP_2** (8) |

MatrixExpression (added in v7) A matrix defined by an expression 3 Fields, total size 9 + null x 4 bytes

TypeNameDescription
BYTEMatrixExpressionValue: 187
INTmatrixIdThe ID of the matrix
INTtypeThe type of matrix
FLOAT[]expressionThe matrix expression

MatrixVectorMath (added in v7) Evaluates a matrix * vector and outputs a vector 6 Fields, total size 15 + null x 4 + null x 4 bytes

TypeNameDescription
BYTEMatrixVectorMathValue: 188
INTmatrixIdThe ID of the matrix
SHORTopTypeThe type of operation (0=multiply)
INToutLengthThe length of the output vector
INT[]outputsThe IDs to write the output vector
INTinLengthThe length of the input vector
FLOAT[]inputsThe input vector values

Accessibility Operations Semantics and properties used to expose UI information to assistive technologies. Operations in this category: | ID | Name | Version | Size (bytes) | ---- | ---- | ---- | ---- | | 250 | CoreSemantics | v6 | 15 ## CoreSemantics Define accessibility semantics for a component 7 Fields, total size 15 bytes

TypeNameDescription
BYTECoreSemanticsValue: 250
INTcontentDescriptionIdID of the content description string
BYTEroleThe accessibility role (BUTTON, CHECKBOX, etc.)
INTtextIdID of the text string
INTstateDescriptionIdID of the state description string
BYTEmodeSemantics merge mode (SET, MERGE)
BOOLEANenabledWhether the component is enabled
BOOLEANclickableWhether the component is clickable

Miscellaneous Operations System-level feedback operations like Haptic Feedback. Operations in this category: | ID | Name | Version | Size (bytes) | ---- | ---- | ---- | ---- | | 177 | HapticFeedback | v6 | 5 ## HapticFeedback Generate an haptic feedback 1 Fields, total size 5 bytes

TypeNameDescription
BYTEHapticFeedbackValue: 177
INThapticFeedbackTypeType of haptic feedback

List of Version 6 Operations The following 119 operations were added in version 6 of the format. | ID | Name | Category | Description | | ---- | ---- | ---- | ---- | | 0 | Header | Document Protocol Operations | Document metadata, containing the version, original size & density, capabilities mask | | 2 | ComponentStart | Layout Operations | Basic component encapsulating draw commands. This is not resizable. | | 14 | AnimationSpec | Animation & Particles Operations | Define the animation specifications for a component | | 16 | WidthModifierOperation | Modifier Operations | Set the width dimension on a component | | 40 | PaintData | Paint & Styles Operations | Encode a Paint object with various properties | | 42 | DrawRect | Canvas Operations | Draw the specified rectangle | | 43 | DrawText | Text Operations | Draw a run of text, all in a single direction | | 44 | DrawBitmap | Canvas Operations | Draw a bitmap | | 45 | ShaderData | Paint & Styles Operations | Define a shader with associated uniforms | | 46 | DrawCircle | Canvas Operations | Draw a Circle | | 47 | DrawLine | Canvas Operations | Draw a line segment | | 48 | DrawBitmapFontText | Text Operations | Draw text using a bitmap font | | 51 | DrawRoundRect | Canvas Operations | Draw the specified round-rect | | 52 | DrawSector | Canvas Operations | Draw the specified sector (pie shape)which will be scaled to fit inside the specified oval | | 53 | DrawTextOnPath | Text Operations | Draw text along a path | | 54 | RoundedClipRectModifierOperation | Modifier Operations | Clip the component's content to its rounded rectangular bounds | | 55 | BackgroundModifierOperation | Modifier Operations | Define a background color or shape for a component | | 56 | DrawOval | Canvas Operations | Draw the specified oval | | 57 | DrawTextOnCircle | Text Operations | Draw text along a circle | | 58 | PaddingModifierOperation | Modifier Operations | Define padding around a component | | 59 | ClickModifier | Modifier Operations | Click modifier. This operation contains a list of action operations executed on click | | 63 | Theme | Document Protocol Operations | Set a theme | | 64 | ClickArea | Protocol Operations | Define a region you can click on | | 65 | RootContentBehavior | Protocol Operations | If sizing is SIZING_SCALE, mode is one of SCALE_* values. If sizing is SIZING_LAYOUT, mode is one of LAYOUT_* values. | | 66 | DrawBitmapInt | Canvas Operations | Draw a bitmap using integer coordinates | | 67 | HeightModifierOperation | Modifier Operations | Set the height dimension on a component | | 80 | FloatConstant | Data Operations | A float and its associated id | | 81 | FloatExpression | Logic & Expressions Operations | Define a float via dynamic expression and optional animation | | 101 | BitmapData | Data Operations | Embed or reference bitmap image data | | 102 | TextData | Text Operations | Define a static string and associate it with an ID | | 103 | RootContentDescription | Protocol Operations | Content description of root | | 107 | BorderModifierOperation | Modifier Operations | Define a border for a component | | 108 | ClipRectModifierOperation | Modifier Operations | Clip the component's content to its rectangular bounds | | 124 | DrawPath | Canvas Operations | Draw a path | | 125 | DrawTweenPath | Canvas Operations | Draw an interpolated path between two paths | | 126 | MatrixScale | Matrix Operations | Scale the following draw commands | | 127 | MatrixTranslate | Matrix Operations | Preconcat the current matrix with the specified translation | | 128 | MatrixSkew | Matrix Operations | Current matrix with the specified skew. | | 129 | MatrixRotate | Matrix Operations | Apply rotation to matrix | | 130 | MatrixSave | Matrix Operations | Save the matrix and clip to a stack | | 131 | MatrixRestore | Matrix Operations | Restore the matrix and clip | | 133 | DrawTextAnchored | Text Operations | Draw text centered about an anchor point | | 134 | ColorExpression | Paint & Styles Operations | Define a color via dynamic expression (HSV, ARGB, or Interpolation) | | 135 | TextFromFloat | Text Operations | Convert a float value into a formatted string | | 136 | TextMerge | Text Operations | Merge two strings into one | | 137 | NamedVariable | Data Operations | Add a string name for an ID | | 138 | ColorConstant | Paint & Styles Operations | Define a static color and associate it with an ID | | 139 | DrawContent | Canvas Operations | Draw the component content | | 140 | IntegerConstant | Data Operations | A integer and its associated id | | 143 | BooleanConstant | Data Operations | A boolean and its associated id | | 144 | IntegerExpression | Logic & Expressions Operations | Define an integer via dynamic expression | | 145 | DataMapIds | Data Operations | Encode a collection of named variable IDs | | 146 | IdListData | Data Operations | A list of IDs | | 147 | IdListData | Data Operations | A list of floats | | 148 | LongConstant | Data Operations | A long and its associated id | | 149 | DrawBitmapScaled | Canvas Operations | Draw a bitmap with scaling and alignment options | | 150 | ComponentValue | Logic & Expressions Operations | Expose a component's layout property (width, height, etc.) as a variable | | 151 | TextFromFloat | Text Operations | Look up a string from a collection via index | | 152 | DrawArc | Canvas Operations | Draw the specified arcwhich will be scaled to fit inside the specified oval | | 153 | TextLookupInt | Text Operations | Look up a string from a collection via an integer index variable | | 154 | DataMapLookup | Data Operations | Look up a value in a data map | | 155 | TextMeasure | Text Operations | Measure text dimensions and store the result in a float variable | | 156 | TextLength | Text Operations | Get the length of a string and store it in a float variable | | 157 | TouchExpression | Logic & Expressions Operations | Define a float value derived from touch interactions | | 158 | PathTween | Canvas Operations | Interpolate between two paths and store the result in a new path ID | | 159 | PathCreate | Canvas Operations | Start the creation of a dynamic path | | 160 | PathAppend | Canvas Operations | Append segments to an existing dynamic path | | 161 | ParticlesCreate | Animation & Particles Operations | Create a particle system | | 163 | ParticlesLoop | Animation & Particles Operations | Update and recycle particles in a system | | 164 | ImpulseOperation | Animation & Particles Operations | Execute a list of actions once, and a process block for a fixed duration | | 165 | ImpulseProcess | Animation & Particles Operations | A block of operations executed during an active impulse | | 167 | BitmapFontData | Text Operations | Define a bitmap font with glyph metadata and optional kerning | | 170 | TextMeasure | Text Operations | Extract text-related properties (width, length, etc.) | | 171 | ImageAttribute | Logic & Expressions Operations | Extract image-related properties (width, height) | | 172 | TimeAttribute | Logic & Expressions Operations | Extract time-related information (seconds, hours, etc.) | | 173 | CanvasOperations | Canvas Operations | A collection of canvas operations | | 174 | DrawContentOperation | Modifier Operations | A modifier that triggers drawing of the component's content | | 175 | PathCombine | Canvas Operations | Combine two paths using a boolean operation (Union, Intersect, etc.) | | 176 | FitBoxLayout | Layout Managers | FitBox layout implementation. Only displays the first child component that fits in the available space. | | 177 | HapticFeedback | Miscellaneous Operations | Generate an haptic feedback | | 178 | ConditionalOperations | Logic & Expressions Operations | Execute a list of operations if a condition is met | | 179 | DebugMessage | Protocol Operations | Print debugging messages | | 180 | ColorAttribute | Paint & Styles Operations | Extract components (Hue, RGB, Alpha) from a color | | 200 | RootLayout | Layout Operations | Root element for a document. Other components / layout managers are children in the component tree starting from this Root component. | | 201 | LayoutContent | Layout Operations | Container for child components. BoxLayout, RowLayout and ColumnLayout expect a LayoutComponentContent as a child, encapsulating the components that need to be laid out. | | 202 | BoxLayout | Layout Managers | Box layout implementation. Child components are laid out independently from one another, and painted in their hierarchy order (first children drawnbefore the latter). Horizontal and Vertical positioningare supported. | | 203 | RowLayout | Layout Managers | Row layout implementation, positioning components one after the other horizontally. It supports weight and horizontal/vertical positioning. | | 204 | ColumnLayout | Layout Managers | Column layout implementation, positioning components one after the other vertically. It supports weight and horizontal/vertical positioning. | | 205 | CanvasLayout | Layout Managers | Canvas implementation. Encapsulates drawing operations. | | 208 | TextLayout | Text Operations | Text layout implementation | | 209 | HostAction | Layout Operations | Host action. This operation represents a host action | | 210 | HostNamedAction | Layout Operations | Host Named action. This operation represents a host action | | 211 | ComponentVisibilityOperation | Modifier Operations | Set component visibility from a provided integer variable | | 212 | ValueIntegerChangeActionOperation | Actions & Events Operations | Action that sets a new value for an integer variable | | 213 | ValueStringChangeActionOperation | Actions & Events Operations | Action that sets a new value for a string variable | | 214 | ContainerEnd | Document Protocol Operations | End tag for a container component (Row, Column, etc.) | | 215 | Loop | Logic & Expressions Operations | Execute a list of operations in a loop | | 216 | HostActionMetadata | Layout Operations | Host action + metadata. This operation represents a host action that can also provides some metadata | | 217 | StateLayout | Layout Operations | A layout that switches between child layouts based on an index | | 218 | ValueIntegerExpressionChangeActionOperation | Actions & Events Operations | Action that updates an integer variable via a dynamic expression | | 219 | TouchModifier | Modifier Operations | Touch down modifier. This operation contains a list of action operations executed on touch down | | 220 | TouchUpModifier | Modifier Operations | Touch up modifier. This operation contains a list of action operations executed on touch up | | 221 | OffsetModifierOperation | Modifier Operations | Shift the component's position | | 222 | ValueFloatChangeActionOperation | Actions & Events Operations | Action that sets a new value for a float variable | | 223 | ZIndexModifierOperation | Modifier Operations | Define the Z-Index of a component | | 224 | GraphicsLayerModifierOperation | Modifier Operations | Define transformations (scale, rotation, alpha) for a component | | 225 | TouchCancelModifier | Modifier Operations | Touch cancel modifier. This operation contains a list of action operations executed on touch cancel | | 226 | ScrollModifierOperation | Modifier Operations | Define a scrolling behavior for a component | | 227 | ValueFloatExpressionChangeActionOperation | Actions & Events Operations | Action that updates a float variable via a dynamic expression | | 228 | MarqueeModifierOperation | Modifier Operations | Define a scrolling marquee effect for a component | | 229 | RippleModifier | Modifier Operations | Ripple modifier. This modifier will do a ripple animation on touch down | | 230 | CollapsibleRow | Layout Managers | A row layout that can hide children if space is insufficient | | 231 | WidthInModifierOperation | Modifier Operations | Add additional constraints to the width | | 232 | HeightInModifierOperation | Modifier Operations | Add additional constraints to the height | | 233 | CollapsibleColumn | Layout Managers | A column layout that can hide children if space is insufficient | | 234 | ImageLayout | Layout Managers | Image layout implementation | | 235 | CollapsiblePriorityModifierOperation | Modifier Operations | Add additional priority to children of collapsible layouts | | 236 | RunAction | Operations | This operation runs child actions | | 250 | CoreSemantics | Accessibility Operations | Define accessibility semantics for a component | # List of Version 7 Operations The following 22 operations were added in version 7 of the format. | ID | Name | Category | Description | | ---- | ---- | ---- | ---- | | 49 | DrawBitmapFontTextOnPath | Text Operations | Draw text using a bitmap font along a path | | 181 | MatrixFromPath | Matrix Operations | Set the matrix relative to a path position and tangent | | 182 | TextSubtext | Text Operations | Extract a substring from a source string | | 183 | BitmapTextMeasure | Text Operations | Measure text dimensions specifically for bitmap fonts | | 184 | DrawBitmapTextAnchored | Text Operations | Draw bitmap font text anchored to a point with alignment (pan) | | 185 | Rem | Document Protocol Operations | Embed a remark or comment string in the document | | 186 | MatrixConstant | Matrix Operations | A constant matrix and its associated ID | | 187 | MatrixExpression | Matrix Operations | A matrix defined by an expression | | 188 | MatrixVectorMath | Matrix Operations | Evaluates a matrix * vector and outputs a vector | | 189 | FontData | Data Operations | Embed raw font data in the document | | 190 | DrawToBitmap | Canvas Operations | Draw to a bitmap | | 191 | WakeIn | Protocol Operations | Wake up the render loop after a certain amount of time | | 192 | IdLookup | Logic & Expressions Operations | Look up an ID from an ID collection via index | | 194 | ParticlesCompare | Animation & Particles Operations | Compare particles and execute conditional logic | | 196 | ColorTheme | Paint & Styles Operations | Define a color that adapts to the current theme (light/dark) | | 197 | DataDynamicListFloat | Data Operations | A dynamic list of floats | | 198 | UpdateDynamicFloatList | Data Operations | Update a value in a dynamic float list | | 199 | TextTransform | Text Operations | Transform a string (case conversion, trimming, etc.) | | 237 | AlignByModifierOperation | Modifier Operations | Align a component based on a specific baseline or anchor | | 238 | LayoutCompute | Modifier Operations | Compute component position and measure via dynamic expressions | | 239 | CoreText | Layout Managers | Core text layout implementation with advanced styling | | 240 | FlowLayout | Layout Managers | Flow layout implementation. Positions components one after the other horizontally and wraps to the next line if space is exhausted. | # Experimental Operations The following 6 operations are considered experimental and may change in future versions. | ID | Name | Version | Category | Description | | ---- | ---- | ---- | ---- | ---- | | 196 | ColorTheme | v7 | Paint & Styles Operations | Define a color that adapts to the current theme (light/dark) | | 199 | TextTransform | v7 | Text Operations | Transform a string (case conversion, trimming, etc.) | | 237 | AlignByModifierOperation | v7 | Modifier Operations | Align a component based on a specific baseline or anchor | | 238 | LayoutCompute | v7 | Modifier Operations | Compute component position and measure via dynamic expressions | | 239 | CoreText | v7 | Layout Managers | Core text layout implementation with advanced styling | | 240 | FlowLayout | v7 | Layout Managers | Flow layout implementation. Positions components one after the other horizontally and wraps to the next line if space is exhausted. | # Appendix 1: FloatExpressions | Name | Value | Value | EXAMPLE| | ---- | ---- | ---- | ---- | | ADD | Nan(1) | addition | 3,2,ADD -> 5| | SUB | Nan(2) | subtraction | 3,2,SUB -> 1| | MUL | Nan(3) | multiplication | 3,2,MUL -> 1| | DIV | Nan(4) | division | 3,2,DIV -> 1.5 | | MOD | Nan(5) | Modulus | 3,2,DIV -> 1| | MIN | Nan(6) | Minimum | 3,2,MIN -> 2| | MAX | Nan(7) | Maximum | 3,2,MAX -> 3 | | POW | Nan(8) | power | 3,2,POW -> 9 | | SQRT | Nan(9) | square root | 2,SQRT-> 1.414 | | ABS | Nan(10) | absolute value | -2,ABS -> 2 | | SIGN | Nan(11) | sign | -3, SIGN -> -1 | | COPY_SIGN | Nan(12) | transfer sign |7, -3, COPY_SIGN -> -7 | | EXP | Nan(13) | exponent | 1, EXP -> 2.7182 | | FLOOR | Nan(14) | floor | 32.3,FLOOR -> 32 | | LOG | Nan(15) | log() | 100, LOG -> 2 | | LN | Nan(16) | ln() | 100, LN -> 4.605| | ROUND | Nan(17) | round | 3.5, ROUND -> 4 | | SIN | Nan(18) | sin | 3.141/2, SIN -> 1.00 | | COS | Nan(19) | cosine | 3.141/2, COS -> 0.0 | | TAN | Nan(20) | tan | 3.141/4, TAN -> 1.0 | | ASIN | Nan(21) | asin | 1, ASIN -> 1.57 | | ACOS | Nan(22) | acos | 1, ACOS -> 0 | | ATAN | Nan(23) | atan | 1, ATAN -> 0.785 | | ATAN2 | Nan(24) | atan2 | x,y,ATAN2 - > atan2(x,y) | | MAD | Nan(25) | Multiple and add |7, -3, 2, MAD -> -7 | | IFELSE | Nan(26) | ?: | 1,2,0,IFELES -> 1 | | CLAMP | Nan(27) | clamp |v,min,max,CLAMP -> v | | CBRT | Nan(28) | Cube root | | | DEG | Nan(29) | radians to degree | | | RAD | Nan(30 | degrees to radians | | | CEIL | Nan(31) | Ceiling |3.14, CEIL -> 4 | **Array operation** Array operation examples are for [1,2,3,4,5] | Name | Value | Value | EXAMPLE| | ---- | ---- | ---- | ---- | | A_DEREF | Nan(32) | Get a value from array | 2, a, A_DEREF -> 3| | A_MAX | Nan(33) | Maximum of array | a, A_MAX -> 5| | A_MIN | Nan(34) | Minimum of array | a, A_MIN -> 1| | A_SUM | Nan(35) | Sum of array | a, A_SUM -> 15| | A_AVG | Nan(36) | Average of array | a, A_AVG -> 3| | A_LEN | Nan(37) | Length of array | a, A_LEN -> 5| WIP # Appendix 2: IntegerExpressions | Name | Value | Value | EXAMPLE| | ---- | ---- | ---- | ---- | | ADD | Nan(1) | addition | 3,2,ADD -> 5| | SUB | Nan(2) | subtraction | 3,2,SUB -> 1| | MUL | Nan(3) | multiplication | 3,2,MUL -> 1| | DIV | Nan(4) | division | 3,2,DIV -> 1 | | MOD | Nan(5) | Modulus | 3,2,DIV -> 1| | SHL | Nan(5) | Modulus | 3,2,SHL -> 1| | SHR | Nan(5) | Modulus | 3,2,SHR -> 1| | USHR | Nan(5) | Modulus | 3,2,USHR -> 1| | OR | Nan(5) | Modulus | 3,2,OR -> 1| | AND | Nan(5) | Modulus | 3,2,AND -> 1| | XOR | Nan(5) | Modulus | 3,2,XOR -> 1| | COPY_SIGN | Nan(5) | Modulus | 3,2,COPY_SIGN -> 1| | MIN | Nan(5) | Modulus | 3,2,MIN -> 2| | MAX | Nan(5) | Modulus | 3,2,MAX -> 3| | NEG | Nan(5) | Modulus | 2,NEG -> -2| | ABS | Nan(5) | Modulus | -2,ABS -> 2| | INCR | Nan(5) | Modulus | 2,INCR -> 3| | DECR | Nan(5) | Modulus | 2,DECR -> 1| | NOT | Nan(5) | Modulus | 2,NOT -> FFFFFFFD| | SIGN | Nan(5) | Modulus | 2,SIGN -> 1| | CLAMP | Nan(5) | Modulus | 4,2,3CLAMP -> 3| | IFELSE | Nan(5) | Modulus | 3,2,IFELSE -> 1| | MAD | Nan(5) | Modulus | 4,3,2,MAD -> 1|