From af82fb814ead9bb0e7337e4090809007565c45d2 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 31 Aug 2026 17:49:14 +0000
Subject: [PATCH 01/39] Add FlatBuffers schema and dependency-free C#
FlatBuffers writer/reader
Co-authored-by: jonwis <18537118+jonwis@users.noreply.github.com>
---
.../FlatBufferFormatException.cs | 33 ++
source/CompDataFlatbuffer/FlatBufferTable.cs | 325 +++++++++++
source/CompDataFlatbuffer/FlatBufferWriter.cs | 474 ++++++++++++++++
source/CompDataFlatbuffer/Schema.cs | 385 +++++++++++++
source/CompDataFlatbuffer/SchemaEnums.cs | 139 +++++
source/LottieFlatbuffer/lottie_comp.fbs | 529 ++++++++++++++++++
6 files changed, 1885 insertions(+)
create mode 100644 source/CompDataFlatbuffer/FlatBufferFormatException.cs
create mode 100644 source/CompDataFlatbuffer/FlatBufferTable.cs
create mode 100644 source/CompDataFlatbuffer/FlatBufferWriter.cs
create mode 100644 source/CompDataFlatbuffer/Schema.cs
create mode 100644 source/CompDataFlatbuffer/SchemaEnums.cs
create mode 100644 source/LottieFlatbuffer/lottie_comp.fbs
diff --git a/source/CompDataFlatbuffer/FlatBufferFormatException.cs b/source/CompDataFlatbuffer/FlatBufferFormatException.cs
new file mode 100644
index 00000000..62756e2c
--- /dev/null
+++ b/source/CompDataFlatbuffer/FlatBufferFormatException.cs
@@ -0,0 +1,33 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+#nullable enable
+
+using System;
+
+namespace CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer
+{
+ ///
+ /// Thrown when a buffer is not a valid serialized composition.
+ ///
+#if PUBLIC_CompDataFlatbuffer
+ public
+#endif
+ sealed class FlatBufferFormatException : Exception
+ {
+ public FlatBufferFormatException()
+ {
+ }
+
+ public FlatBufferFormatException(string message)
+ : base(message)
+ {
+ }
+
+ public FlatBufferFormatException(string message, Exception innerException)
+ : base(message, innerException)
+ {
+ }
+ }
+}
diff --git a/source/CompDataFlatbuffer/FlatBufferTable.cs b/source/CompDataFlatbuffer/FlatBufferTable.cs
new file mode 100644
index 00000000..8338ac78
--- /dev/null
+++ b/source/CompDataFlatbuffer/FlatBufferTable.cs
@@ -0,0 +1,325 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+#nullable enable
+
+using System;
+using System.Text;
+
+namespace CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer
+{
+ ///
+ /// A minimal reader for the FlatBuffers binary wire format. All accesses are
+ /// bounds checked; a malformed buffer causes a
+ /// rather than undefined behavior.
+ ///
+ readonly struct FlatBufferTable
+ {
+ readonly byte[] _buffer;
+ readonly int _position;
+
+ internal FlatBufferTable(byte[] buffer, int position)
+ {
+ _buffer = buffer;
+ _position = position;
+ }
+
+ internal bool IsNull => _buffer is null;
+
+ ///
+ /// Gets the root table of a buffer, checking its file identifier.
+ ///
+ /// The buffer.
+ /// The expected 4 character file identifier.
+ /// The root table.
+ internal static FlatBufferTable GetRoot(byte[] buffer, string fileIdentifier)
+ {
+ if (buffer is null)
+ {
+ throw new ArgumentNullException(nameof(buffer));
+ }
+
+ if (buffer.Length < 8)
+ {
+ throw new FlatBufferFormatException("Buffer is too small.");
+ }
+
+ for (var i = 0; i < 4; i++)
+ {
+ if (buffer[4 + i] != (byte)fileIdentifier[i])
+ {
+ throw new FlatBufferFormatException("Unrecognized file identifier.");
+ }
+ }
+
+ var rootOffset = ReadInt32(buffer, 0);
+ return new FlatBufferTable(buffer, CheckedAdd(buffer, 0, rootOffset));
+ }
+
+ ///
+ /// Returns the absolute position of the data of the field with the given
+ /// id, or 0 if the field is not present.
+ ///
+ /// The id of the field.
+ /// The position of the field's data, or 0.
+ internal int FieldPosition(int field)
+ {
+ var vtable = _position - ReadInt32(_buffer, _position);
+ if (vtable < 0 || vtable + 4 > _buffer.Length)
+ {
+ throw new FlatBufferFormatException("Invalid vtable offset.");
+ }
+
+ var vtableSize = ReadUInt16(_buffer, vtable);
+ var fieldIndex = 4 + (field * 2);
+ if (fieldIndex + 2 > vtableSize)
+ {
+ return 0;
+ }
+
+ var fieldOffset = ReadUInt16(_buffer, vtable + fieldIndex);
+ if (fieldOffset == 0)
+ {
+ return 0;
+ }
+
+ var result = _position + fieldOffset;
+ if (result < 0 || result >= _buffer.Length)
+ {
+ throw new FlatBufferFormatException("Field is outside the buffer.");
+ }
+
+ return result;
+ }
+
+ internal byte GetUInt8(int field, byte defaultValue)
+ {
+ var position = FieldPosition(field);
+ return position == 0 ? defaultValue : _buffer[position];
+ }
+
+ internal byte? GetOptionalUInt8(int field)
+ {
+ var position = FieldPosition(field);
+ return position == 0 ? (byte?)null : _buffer[position];
+ }
+
+ internal bool GetBool(int field, bool defaultValue)
+ => GetUInt8(field, (byte)(defaultValue ? 1 : 0)) != 0;
+
+ internal bool? GetOptionalBool(int field)
+ {
+ var value = GetOptionalUInt8(field);
+ return value.HasValue ? value.Value != 0 : (bool?)null;
+ }
+
+ internal ushort GetUInt16(int field, ushort defaultValue)
+ {
+ var position = FieldPosition(field);
+ return position == 0 ? defaultValue : ReadUInt16(_buffer, position);
+ }
+
+ internal int GetInt32(int field, int defaultValue)
+ {
+ var position = FieldPosition(field);
+ return position == 0 ? defaultValue : ReadInt32(_buffer, position);
+ }
+
+ internal int? GetOptionalInt32(int field)
+ {
+ var position = FieldPosition(field);
+ return position == 0 ? (int?)null : ReadInt32(_buffer, position);
+ }
+
+ internal uint GetUInt32(int field, uint defaultValue)
+ {
+ var position = FieldPosition(field);
+ return position == 0 ? defaultValue : unchecked((uint)ReadInt32(_buffer, position));
+ }
+
+ internal long GetInt64(int field, long defaultValue)
+ {
+ var position = FieldPosition(field);
+ if (position == 0)
+ {
+ return defaultValue;
+ }
+
+ var low = unchecked((uint)ReadInt32(_buffer, position));
+ var high = ReadInt32(_buffer, position + 4);
+ return unchecked((long)(((ulong)(uint)high << 32) | low));
+ }
+
+ internal float GetFloat(int field, float defaultValue)
+ {
+ var position = FieldPosition(field);
+ return position == 0 ? defaultValue : BitConverter.Int32BitsToSingle(ReadInt32(_buffer, position));
+ }
+
+ internal float? GetOptionalFloat(int field)
+ {
+ var position = FieldPosition(field);
+ return position == 0 ? (float?)null : BitConverter.Int32BitsToSingle(ReadInt32(_buffer, position));
+ }
+
+ ///
+ /// Returns the position of an inline struct field, or 0 if not present.
+ /// Use the ReadStructFloat and ReadStructUInt8 methods to read its fields.
+ ///
+ /// The id of the field.
+ /// The position of the struct, or 0.
+ internal int GetStructPosition(int field) => FieldPosition(field);
+
+ internal float ReadStructFloat(int structPosition, int offset)
+ => BitConverter.Int32BitsToSingle(ReadInt32(_buffer, structPosition + offset));
+
+ internal byte ReadStructUInt8(int structPosition, int offset)
+ {
+ if (structPosition + offset >= _buffer.Length)
+ {
+ throw new FlatBufferFormatException("Struct is outside the buffer.");
+ }
+
+ return _buffer[structPosition + offset];
+ }
+
+ internal FlatBufferTable GetTable(int field)
+ {
+ var position = FieldPosition(field);
+ return position == 0
+ ? default
+ : new FlatBufferTable(_buffer, CheckedAdd(_buffer, position, ReadInt32(_buffer, position)));
+ }
+
+ internal string? GetString(int field)
+ {
+ var position = FieldPosition(field);
+ if (position == 0)
+ {
+ return null;
+ }
+
+ var stringPosition = CheckedAdd(_buffer, position, ReadInt32(_buffer, position));
+ var length = ReadInt32(_buffer, stringPosition);
+ if (length < 0 || stringPosition + 4 + length > _buffer.Length)
+ {
+ throw new FlatBufferFormatException("String is outside the buffer.");
+ }
+
+ return Encoding.UTF8.GetString(_buffer, stringPosition + 4, length);
+ }
+
+ ///
+ /// Returns the number of elements in a vector field.
+ ///
+ /// The id of the field.
+ /// The number of elements, or 0 if the field is not present.
+ internal int VectorLength(int field)
+ {
+ var position = FieldPosition(field);
+ if (position == 0)
+ {
+ return 0;
+ }
+
+ var vector = CheckedAdd(_buffer, position, ReadInt32(_buffer, position));
+ var length = ReadInt32(_buffer, vector);
+ if (length < 0)
+ {
+ throw new FlatBufferFormatException("Invalid vector length.");
+ }
+
+ return length;
+ }
+
+ internal byte GetVectorUInt8(int field, int index)
+ {
+ var position = VectorElementPosition(field, index, sizeof(byte));
+ return _buffer[position];
+ }
+
+ internal float GetVectorFloat(int field, int index)
+ => BitConverter.Int32BitsToSingle(ReadInt32(_buffer, VectorElementPosition(field, index, sizeof(float))));
+
+ internal uint GetVectorUInt32(int field, int index)
+ => unchecked((uint)ReadInt32(_buffer, VectorElementPosition(field, index, sizeof(uint))));
+
+ internal FlatBufferTable GetVectorTable(int field, int index)
+ {
+ var position = VectorElementPosition(field, index, sizeof(int));
+ return new FlatBufferTable(_buffer, CheckedAdd(_buffer, position, ReadInt32(_buffer, position)));
+ }
+
+ internal string GetVectorString(int field, int index)
+ {
+ var position = VectorElementPosition(field, index, sizeof(int));
+ var stringPosition = CheckedAdd(_buffer, position, ReadInt32(_buffer, position));
+ var length = ReadInt32(_buffer, stringPosition);
+ if (length < 0 || stringPosition + 4 + length > _buffer.Length)
+ {
+ throw new FlatBufferFormatException("String is outside the buffer.");
+ }
+
+ return Encoding.UTF8.GetString(_buffer, stringPosition + 4, length);
+ }
+
+ static int ReadInt32(byte[] buffer, int position)
+ {
+ if (position < 0 || position + 4 > buffer.Length)
+ {
+ throw new FlatBufferFormatException("Read is outside the buffer.");
+ }
+
+ return buffer[position] |
+ (buffer[position + 1] << 8) |
+ (buffer[position + 2] << 16) |
+ (buffer[position + 3] << 24);
+ }
+
+ static ushort ReadUInt16(byte[] buffer, int position)
+ {
+ if (position < 0 || position + 2 > buffer.Length)
+ {
+ throw new FlatBufferFormatException("Read is outside the buffer.");
+ }
+
+ return unchecked((ushort)(buffer[position] | (buffer[position + 1] << 8)));
+ }
+
+ static int CheckedAdd(byte[] buffer, int position, int offset)
+ {
+ var result = (long)position + offset;
+ if (result < 0 || result >= buffer.Length)
+ {
+ throw new FlatBufferFormatException("Offset is outside the buffer.");
+ }
+
+ return (int)result;
+ }
+
+ int VectorElementPosition(int field, int index, int elementSize)
+ {
+ var position = FieldPosition(field);
+ if (position == 0)
+ {
+ throw new FlatBufferFormatException("Vector is not present.");
+ }
+
+ var vector = CheckedAdd(_buffer, position, ReadInt32(_buffer, position));
+ var length = ReadInt32(_buffer, vector);
+ if (index < 0 || index >= length)
+ {
+ throw new FlatBufferFormatException("Vector index is out of range.");
+ }
+
+ var result = vector + 4 + (index * elementSize);
+ if (result < 0 || result + elementSize > _buffer.Length)
+ {
+ throw new FlatBufferFormatException("Vector element is outside the buffer.");
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/source/CompDataFlatbuffer/FlatBufferWriter.cs b/source/CompDataFlatbuffer/FlatBufferWriter.cs
new file mode 100644
index 00000000..e4fbbc4e
--- /dev/null
+++ b/source/CompDataFlatbuffer/FlatBufferWriter.cs
@@ -0,0 +1,474 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+#nullable enable
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer
+{
+ ///
+ /// A minimal writer for the FlatBuffers binary wire format. Buffers produced
+ /// by this writer are readable by any FlatBuffers implementation, including
+ /// the C++ code generated from lottie_comp.fbs.
+ ///
+ ///
+ /// The wire format is described at https://flatbuffers.dev/flatbuffers_internals.html.
+ /// Data is written from the end of the buffer towards its start, so all
+ /// offsets returned by this class are measured backwards from the end of the
+ /// buffer.
+ ///
+ sealed class FlatBufferWriter
+ {
+ // The offsets of the vtables that have been written so far. Used to
+ // share identical vtables between tables.
+ readonly List _vtables = new List();
+
+ // The field offsets of the table that is currently being built.
+ readonly List _currentVTable = new List();
+
+ byte[] _buffer;
+
+ // The number of bytes at the end of _buffer that contain data.
+ int _used;
+
+ // The offset of the start of the table that is currently being built,
+ // or -1 if no table is being built.
+ int _tableStart = -1;
+
+ int _minAlign = 1;
+
+ internal FlatBufferWriter(int initialSize = 4096)
+ {
+ _buffer = new byte[Math.Max(initialSize, 32)];
+ }
+
+ ///
+ /// Starts a table with the given number of fields. Fields are added with
+ /// the Add methods, then the table is completed by calling .
+ ///
+ /// The number of fields declared by the table in the schema.
+ internal void StartTable(int fieldCount)
+ {
+ if (_tableStart >= 0)
+ {
+ throw new InvalidOperationException("Nested table construction is not supported.");
+ }
+
+ _currentVTable.Clear();
+ for (var i = 0; i < fieldCount; i++)
+ {
+ _currentVTable.Add(0);
+ }
+
+ _tableStart = _used;
+ }
+
+ ///
+ /// Completes the table that is being built and returns its offset.
+ ///
+ /// The offset of the table.
+ internal int EndTable()
+ {
+ if (_tableStart < 0)
+ {
+ throw new InvalidOperationException("No table is being built.");
+ }
+
+ // Reserve space for the offset to the vtable.
+ Prep(sizeof(int), 0);
+ EnsureSpace(sizeof(int));
+ _used += sizeof(int);
+ var tableEnd = _used;
+
+ // Trailing empty fields are implied by the length of the vtable.
+ var fieldCount = _currentVTable.Count;
+ while (fieldCount > 0 && _currentVTable[fieldCount - 1] == 0)
+ {
+ fieldCount--;
+ }
+
+ // Write the vtable: the size of the vtable, the size of the table,
+ // then the offset of each field within the table.
+ var vtableSize = (fieldCount + 2) * sizeof(short);
+ Prep(sizeof(short), vtableSize);
+ for (var i = fieldCount - 1; i >= 0; i--)
+ {
+ var fieldOffset = _currentVTable[i];
+ WriteInt16(checked((short)(fieldOffset == 0 ? 0 : tableEnd - fieldOffset)));
+ }
+
+ WriteInt16(checked((short)(tableEnd - _tableStart)));
+ WriteInt16(checked((short)vtableSize));
+
+ var vtableOffset = _used;
+
+ // Share an identical vtable if one has already been written.
+ var sharedVTableOffset = FindMatchingVTable(vtableOffset, vtableSize);
+ if (sharedVTableOffset >= 0)
+ {
+ _used = vtableOffset - vtableSize;
+ vtableOffset = sharedVTableOffset;
+ }
+ else
+ {
+ _vtables.Add(vtableOffset);
+ }
+
+ // Patch the signed offset from the table to its vtable.
+ WriteInt32At(tableEnd, vtableOffset - tableEnd);
+
+ _tableStart = -1;
+ return tableEnd;
+ }
+
+ internal void AddUInt8(int field, byte value, byte defaultValue)
+ {
+ if (value != defaultValue)
+ {
+ Prep(sizeof(byte), 0);
+ WriteByte(value);
+ Slot(field);
+ }
+ }
+
+ internal void AddUInt8(int field, byte? value)
+ {
+ if (value.HasValue)
+ {
+ Prep(sizeof(byte), 0);
+ WriteByte(value.Value);
+ Slot(field);
+ }
+ }
+
+ internal void AddBool(int field, bool value, bool defaultValue)
+ => AddUInt8(field, (byte)(value ? 1 : 0), (byte)(defaultValue ? 1 : 0));
+
+ internal void AddBool(int field, bool? value)
+ => AddUInt8(field, value.HasValue ? (byte)(value.Value ? 1 : 0) : (byte?)null);
+
+ internal void AddUInt16(int field, ushort value, ushort defaultValue)
+ {
+ if (value != defaultValue)
+ {
+ Prep(sizeof(short), 0);
+ WriteInt16(unchecked((short)value));
+ Slot(field);
+ }
+ }
+
+ internal void AddInt32(int field, int value, int defaultValue)
+ {
+ if (value != defaultValue)
+ {
+ Prep(sizeof(int), 0);
+ WriteInt32(value);
+ Slot(field);
+ }
+ }
+
+ internal void AddInt32(int field, int? value)
+ {
+ if (value.HasValue)
+ {
+ Prep(sizeof(int), 0);
+ WriteInt32(value.Value);
+ Slot(field);
+ }
+ }
+
+ internal void AddUInt32(int field, uint value, uint defaultValue)
+ => AddInt32(field, unchecked((int)value), unchecked((int)defaultValue));
+
+ internal void AddInt64(int field, long value, long defaultValue)
+ {
+ if (value != defaultValue)
+ {
+ Prep(sizeof(long), 0);
+ WriteInt64(value);
+ Slot(field);
+ }
+ }
+
+ internal void AddFloat(int field, float value, float defaultValue)
+ {
+ if (!value.Equals(defaultValue))
+ {
+ Prep(sizeof(float), 0);
+ WriteInt32(BitConverter.SingleToInt32Bits(value));
+ Slot(field);
+ }
+ }
+
+ internal void AddFloat(int field, float? value)
+ {
+ if (value.HasValue)
+ {
+ Prep(sizeof(float), 0);
+ WriteInt32(BitConverter.SingleToInt32Bits(value.Value));
+ Slot(field);
+ }
+ }
+
+ ///
+ /// Adds a reference to a previously created table, vector or string.
+ /// An of 0 means "not present".
+ ///
+ /// The id of the field.
+ /// The offset of the referenced data.
+ internal void AddOffset(int field, int offset)
+ {
+ if (offset != 0)
+ {
+ Prep(sizeof(int), 0);
+ WriteInt32(_used + sizeof(int) - offset);
+ Slot(field);
+ }
+ }
+
+ ///
+ /// Prepares to write an inline struct of the given size and alignment.
+ /// The struct's fields must then be written in reverse declaration order
+ /// using the Write methods, followed by .
+ ///
+ /// The alignment of the struct.
+ /// The size of the struct.
+ internal void StartStruct(int alignment, int size) => Prep(alignment, size);
+
+ ///
+ /// Adds an inline struct field whose data was just written by
+ /// and the Write methods.
+ ///
+ /// The id of the field.
+ internal void AddStruct(int field) => Slot(field);
+
+ internal void WriteFloat(float value) => WriteInt32(BitConverter.SingleToInt32Bits(value));
+
+ internal void WriteUInt8(byte value) => WriteByte(value);
+
+ internal int CreateString(string value)
+ {
+ var bytes = Encoding.UTF8.GetBytes(value);
+
+ // Strings are null terminated for the convenience of C++ readers.
+ Prep(sizeof(int), bytes.Length + 1);
+ WriteByte(0);
+ EnsureSpace(bytes.Length);
+ _used += bytes.Length;
+ Array.Copy(bytes, 0, _buffer, _buffer.Length - _used, bytes.Length);
+ WriteInt32(bytes.Length);
+ return _used;
+ }
+
+ internal int CreateByteVector(IReadOnlyList values)
+ {
+ StartVector(sizeof(byte), values.Count, sizeof(byte));
+ for (var i = values.Count - 1; i >= 0; i--)
+ {
+ WriteByte(values[i]);
+ }
+
+ return EndVector(values.Count);
+ }
+
+ internal int CreateFloatVector(IReadOnlyList values)
+ {
+ StartVector(sizeof(float), values.Count, sizeof(float));
+ for (var i = values.Count - 1; i >= 0; i--)
+ {
+ WriteInt32(BitConverter.SingleToInt32Bits(values[i]));
+ }
+
+ return EndVector(values.Count);
+ }
+
+ internal int CreateUInt32Vector(IReadOnlyList values)
+ {
+ StartVector(sizeof(uint), values.Count, sizeof(uint));
+ for (var i = values.Count - 1; i >= 0; i--)
+ {
+ WriteInt32(unchecked((int)values[i]));
+ }
+
+ return EndVector(values.Count);
+ }
+
+ ///
+ /// Creates a vector of offsets to previously created tables or strings.
+ ///
+ /// The offsets of the referenced data.
+ /// The offset of the vector.
+ internal int CreateOffsetVector(IReadOnlyList offsets)
+ {
+ StartVector(sizeof(int), offsets.Count, sizeof(int));
+ for (var i = offsets.Count - 1; i >= 0; i--)
+ {
+ Prep(sizeof(int), 0);
+ WriteInt32(_used + sizeof(int) - offsets[i]);
+ }
+
+ return EndVector(offsets.Count);
+ }
+
+ ///
+ /// Completes the buffer, making its root.
+ ///
+ /// The offset of the root table.
+ /// The 4 character file identifier.
+ /// The completed buffer.
+ internal byte[] Finish(int rootTable, string fileIdentifier)
+ {
+ if (fileIdentifier is null || fileIdentifier.Length != 4)
+ {
+ throw new ArgumentException("File identifier must be 4 characters.", nameof(fileIdentifier));
+ }
+
+ Prep(_minAlign, sizeof(int) + 4);
+ for (var i = 3; i >= 0; i--)
+ {
+ WriteByte((byte)fileIdentifier[i]);
+ }
+
+ WriteInt32(_used + sizeof(int) - rootTable);
+
+ var result = new byte[_used];
+ Array.Copy(_buffer, _buffer.Length - _used, result, 0, _used);
+ return result;
+ }
+
+ void StartVector(int elementSize, int count, int alignment)
+ {
+ Prep(sizeof(int), elementSize * count);
+ Prep(alignment, elementSize * count);
+ }
+
+ int EndVector(int count)
+ {
+ WriteInt32(count);
+ return _used;
+ }
+
+ // Records the offset of the field that was just written.
+ void Slot(int field)
+ {
+ if (field >= _currentVTable.Count)
+ {
+ throw new ArgumentOutOfRangeException(nameof(field));
+ }
+
+ _currentVTable[field] = _used;
+ }
+
+ // Pads so that, after writing additionalBytes more bytes, the write
+ // position will be aligned to the given alignment.
+ void Prep(int alignment, int additionalBytes)
+ {
+ if (alignment > _minAlign)
+ {
+ _minAlign = alignment;
+ }
+
+ var alignSize = ((~(_used + additionalBytes)) + 1) & (alignment - 1);
+ EnsureSpace(alignSize + additionalBytes);
+ for (var i = 0; i < alignSize; i++)
+ {
+ WriteByte(0);
+ }
+ }
+
+ int FindMatchingVTable(int vtableOffset, int vtableSize)
+ {
+ foreach (var candidate in _vtables)
+ {
+ if (ReadInt16At(candidate) != vtableSize)
+ {
+ continue;
+ }
+
+ var match = true;
+ for (var i = sizeof(short); i < vtableSize; i += sizeof(short))
+ {
+ if (ReadInt16At(candidate - i) != ReadInt16At(vtableOffset - i))
+ {
+ match = false;
+ break;
+ }
+ }
+
+ if (match)
+ {
+ return candidate;
+ }
+ }
+
+ return -1;
+ }
+
+ void EnsureSpace(int size)
+ {
+ if (_used + size <= _buffer.Length)
+ {
+ return;
+ }
+
+ var newSize = _buffer.Length;
+ while (newSize < _used + size)
+ {
+ newSize *= 2;
+ }
+
+ var newBuffer = new byte[newSize];
+ Array.Copy(_buffer, _buffer.Length - _used, newBuffer, newSize - _used, _used);
+ _buffer = newBuffer;
+ }
+
+ void WriteByte(byte value)
+ {
+ EnsureSpace(sizeof(byte));
+ _used += sizeof(byte);
+ _buffer[_buffer.Length - _used] = value;
+ }
+
+ void WriteInt16(short value)
+ {
+ EnsureSpace(sizeof(short));
+ _used += sizeof(short);
+ var index = _buffer.Length - _used;
+ _buffer[index] = unchecked((byte)value);
+ _buffer[index + 1] = unchecked((byte)(value >> 8));
+ }
+
+ void WriteInt32(int value)
+ {
+ EnsureSpace(sizeof(int));
+ _used += sizeof(int);
+ WriteInt32At(_used, value);
+ }
+
+ void WriteInt64(long value)
+ {
+ // The buffer is written backwards, so the high word is written first.
+ WriteInt32(unchecked((int)(value >> 32)));
+ WriteInt32(unchecked((int)value));
+ }
+
+ void WriteInt32At(int offset, int value)
+ {
+ var index = _buffer.Length - offset;
+ _buffer[index] = unchecked((byte)value);
+ _buffer[index + 1] = unchecked((byte)(value >> 8));
+ _buffer[index + 2] = unchecked((byte)(value >> 16));
+ _buffer[index + 3] = unchecked((byte)(value >> 24));
+ }
+
+ short ReadInt16At(int offset)
+ {
+ var index = _buffer.Length - offset;
+ return unchecked((short)(_buffer[index] | (_buffer[index + 1] << 8)));
+ }
+ }
+}
diff --git a/source/CompDataFlatbuffer/Schema.cs b/source/CompDataFlatbuffer/Schema.cs
new file mode 100644
index 00000000..84b3451a
--- /dev/null
+++ b/source/CompDataFlatbuffer/Schema.cs
@@ -0,0 +1,385 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+#nullable enable
+
+namespace CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer
+{
+ ///
+ /// Field ids, enum values and constants of the lottie_comp.fbs schema.
+ /// These must be kept in sync with lottie_comp.fbs; field ids are the
+ /// 0-based declaration order of the fields of each table.
+ ///
+ static class Schema
+ {
+ ///
+ /// The version of the schema that this code reads and writes. Bumped for
+ /// every additive change to lottie_comp.fbs.
+ ///
+ internal const ushort Version = 1;
+
+ ///
+ /// The 4 character identifier stored at offset 4 of every buffer.
+ ///
+ internal const string FileIdentifier = "LCMP";
+
+ ///
+ /// The file extension used for serialized compositions.
+ ///
+ internal const string FileExtension = ".lcomp";
+
+ ///
+ /// The value of an index or reference field that refers to nothing.
+ ///
+ internal const uint NullIndex = 0xFFFFFFFF;
+
+ ///
+ /// The number of bits used to store the index part of an object reference.
+ ///
+ internal const int ObjectReferenceIndexBits = 28;
+
+ internal static uint PackObjectReference(ObjectCategory category, int index)
+ => ((uint)category << ObjectReferenceIndexBits) | (uint)index;
+
+ internal static ObjectCategory UnpackCategory(uint reference)
+ => (ObjectCategory)(reference >> ObjectReferenceIndexBits);
+
+ internal static int UnpackIndex(uint reference)
+ => (int)(reference & ((1u << ObjectReferenceIndexBits) - 1));
+
+ internal static class Animator
+ {
+ internal const int FieldCount = 3;
+ internal const int Property = 0;
+ internal const int Animation = 1;
+ internal const int Controller = 2;
+ }
+
+ internal static class CompObj
+ {
+ internal const int FieldCount = 3;
+ internal const int Comment = 0;
+ internal const int Animators = 1;
+ internal const int Properties = 2;
+ }
+
+ internal static class PropertyValue
+ {
+ internal const int FieldCount = 5;
+ internal const int Name = 0;
+ internal const int Type = 1;
+ internal const int Scalar = 2;
+ internal const int Vector = 3;
+ internal const int Color = 4;
+ }
+
+ internal static class ReferenceParameter
+ {
+ internal const int FieldCount = 2;
+ internal const int Name = 0;
+ internal const int Target = 1;
+ }
+
+ internal static class SourceParameter
+ {
+ internal const int FieldCount = 2;
+ internal const int Name = 0;
+ internal const int Brush = 1;
+ }
+
+ internal static class KeyFrame
+ {
+ internal const int FieldCount = 8;
+ internal const int Progress = 0;
+ internal const int Easing = 1;
+ internal const int Kind = 2;
+ internal const int Expression = 3;
+ internal const int Scalar = 4;
+ internal const int Vector = 5;
+ internal const int Color = 6;
+ internal const int Path = 7;
+ }
+
+ internal static class Visual
+ {
+ internal const int FieldCount = 18;
+ internal const int Base = 0;
+ internal const int Kind = 1;
+ internal const int BorderMode = 2;
+ internal const int CenterPoint = 3;
+ internal const int Clip = 4;
+ internal const int IsVisible = 5;
+ internal const int Offset = 6;
+ internal const int Opacity = 7;
+ internal const int RotationAngleInDegrees = 8;
+ internal const int RotationAxis = 9;
+ internal const int Scale = 10;
+ internal const int Size = 11;
+ internal const int TransformMatrix = 12;
+ internal const int Children = 13;
+ internal const int Shapes = 14;
+ internal const int ViewBox = 15;
+ internal const int Brush = 16;
+ internal const int Shadow = 17;
+ }
+
+ internal static class Shape
+ {
+ internal const int FieldCount = 20;
+ internal const int Base = 0;
+ internal const int Kind = 1;
+ internal const int CenterPoint = 2;
+ internal const int Offset = 3;
+ internal const int RotationAngleInDegrees = 4;
+ internal const int Scale = 5;
+ internal const int TransformMatrix = 6;
+ internal const int Shapes = 7;
+ internal const int FillBrush = 8;
+ internal const int StrokeBrush = 9;
+ internal const int Geometry = 10;
+ internal const int IsStrokeNonScaling = 11;
+ internal const int StrokeDashOffset = 12;
+ internal const int StrokeDashArray = 13;
+ internal const int StrokeDashCap = 14;
+ internal const int StrokeStartCap = 15;
+ internal const int StrokeEndCap = 16;
+ internal const int StrokeLineJoin = 17;
+ internal const int StrokeMiterLimit = 18;
+ internal const int StrokeThickness = 19;
+ }
+
+ internal static class Geometry
+ {
+ internal const int FieldCount = 11;
+ internal const int Base = 0;
+ internal const int Kind = 1;
+ internal const int TrimStart = 2;
+ internal const int TrimEnd = 3;
+ internal const int TrimOffset = 4;
+ internal const int Path = 5;
+ internal const int Offset = 6;
+ internal const int Size = 7;
+ internal const int CornerRadius = 8;
+ internal const int Center = 9;
+ internal const int Radius = 10;
+ }
+
+ internal static class Brush
+ {
+ internal const int FieldCount = 23;
+ internal const int Base = 0;
+ internal const int Kind = 1;
+ internal const int Color = 2;
+ internal const int AnchorPoint = 3;
+ internal const int CenterPoint = 4;
+ internal const int ColorStops = 5;
+ internal const int ExtendMode = 6;
+ internal const int InterpolationSpace = 7;
+ internal const int MappingMode = 8;
+ internal const int Offset = 9;
+ internal const int RotationAngleInDegrees = 10;
+ internal const int Scale = 11;
+ internal const int TransformMatrix = 12;
+ internal const int StartPoint = 13;
+ internal const int EndPoint = 14;
+ internal const int EllipseCenter = 15;
+ internal const int EllipseRadius = 16;
+ internal const int GradientOriginOffset = 17;
+ internal const int Surface = 18;
+ internal const int Source = 19;
+ internal const int Mask = 20;
+ internal const int Effect = 21;
+ internal const int SourceParameters = 22;
+ }
+
+ internal static class GradientStop
+ {
+ internal const int FieldCount = 3;
+ internal const int Base = 0;
+ internal const int Color = 1;
+ internal const int Offset = 2;
+ }
+
+ internal static class ViewBox
+ {
+ internal const int FieldCount = 2;
+ internal const int Base = 0;
+ internal const int Size = 1;
+ }
+
+ internal static class Clip
+ {
+ internal const int FieldCount = 9;
+ internal const int Base = 0;
+ internal const int Kind = 1;
+ internal const int CenterPoint = 2;
+ internal const int Scale = 3;
+ internal const int LeftInset = 4;
+ internal const int RightInset = 5;
+ internal const int TopInset = 6;
+ internal const int BottomInset = 7;
+ internal const int Geometry = 8;
+ }
+
+ internal static class Shadow
+ {
+ internal const int FieldCount = 8;
+ internal const int Base = 0;
+ internal const int Kind = 1;
+ internal const int BlurRadius = 2;
+ internal const int Color = 3;
+ internal const int Mask = 4;
+ internal const int Offset = 5;
+ internal const int Opacity = 6;
+ internal const int SourcePolicy = 7;
+ }
+
+ internal static class Surface
+ {
+ internal const int FieldCount = 7;
+ internal const int Base = 0;
+ internal const int Kind = 1;
+ internal const int SourceVisual = 2;
+ internal const int SourceSize = 3;
+ internal const int SourceOffset = 4;
+ internal const int Uri = 5;
+ internal const int Bytes = 6;
+ }
+
+ internal static class Effect
+ {
+ internal const int FieldCount = 5;
+ internal const int Base = 0;
+ internal const int Kind = 1;
+ internal const int Sources = 2;
+ internal const int Mode = 3;
+ internal const int BlurAmount = 4;
+ }
+
+ internal static class Easing
+ {
+ internal const int FieldCount = 9;
+ internal const int Base = 0;
+ internal const int Kind = 1;
+ internal const int ControlPoint1 = 2;
+ internal const int ControlPoint2 = 3;
+ internal const int StepCount = 4;
+ internal const int InitialStep = 5;
+ internal const int FinalStep = 6;
+ internal const int IsInitialStepSingleFrame = 7;
+ internal const int IsFinalStepSingleFrame = 8;
+ }
+
+ internal static class Animation
+ {
+ internal const int FieldCount = 8;
+ internal const int Base = 0;
+ internal const int Kind = 1;
+ internal const int Target = 2;
+ internal const int ReferenceParameters = 3;
+ internal const int Expression = 4;
+ internal const int DurationTicks = 5;
+ internal const int KeyFrames = 6;
+ internal const int InterpolationColorSpace = 7;
+ }
+
+ internal static class PropertySet
+ {
+ internal const int FieldCount = 3;
+ internal const int Base = 0;
+ internal const int Owner = 1;
+ internal const int Values = 2;
+ }
+
+ internal static class Controller
+ {
+ internal const int FieldCount = 5;
+ internal const int Base = 0;
+ internal const int TargetObject = 1;
+ internal const int TargetProperty = 2;
+ internal const int IsPaused = 3;
+ internal const int IsCustom = 4;
+ }
+
+ internal static class PropertyBinding
+ {
+ internal const int FieldCount = 7;
+ internal const int Name = 0;
+ internal const int DisplayName = 1;
+ internal const int ActualType = 2;
+ internal const int ExposedType = 3;
+ internal const int DefaultScalar = 4;
+ internal const int DefaultVector = 5;
+ internal const int DefaultColor = 6;
+ }
+
+ internal static class Marker
+ {
+ internal const int FieldCount = 3;
+ internal const int Name = 0;
+ internal const int Progress = 1;
+ internal const int DurationProgress = 2;
+ }
+
+ internal static class Metadata
+ {
+ internal const int FieldCount = 8;
+ internal const int Name = 0;
+ internal const int Width = 1;
+ internal const int Height = 2;
+ internal const int DurationTicks = 3;
+ internal const int FramesPerSecond = 4;
+ internal const int PropertyBindings = 5;
+ internal const int Markers = 6;
+ internal const int ThemingPropertySet = 7;
+ }
+
+ internal static class Composition
+ {
+ internal const int FieldCount = 21;
+ internal const int SchemaVersion = 0;
+ internal const int RequiredUapVersion = 1;
+ internal const int Metadata = 2;
+ internal const int RootVisual = 3;
+ internal const int Strings = 4;
+ internal const int Visuals = 5;
+ internal const int Shapes = 6;
+ internal const int Geometries = 7;
+ internal const int CanvasGeometries = 8;
+ internal const int Brushes = 9;
+ internal const int GradientStops = 10;
+ internal const int ViewBoxes = 11;
+ internal const int Clips = 12;
+ internal const int Shadows = 13;
+ internal const int Surfaces = 14;
+ internal const int Effects = 15;
+ internal const int Easings = 16;
+ internal const int Animations = 17;
+ internal const int PropertySets = 18;
+ internal const int Controllers = 19;
+ internal const int CustomControllers = 20;
+ }
+
+ internal static class CanvasGeometry
+ {
+ internal const int FieldCount = 16;
+ internal const int Kind = 0;
+ internal const int A = 1;
+ internal const int B = 2;
+ internal const int CombineMode = 3;
+ internal const int Matrix = 4;
+ internal const int Source = 5;
+ internal const int Geometries = 6;
+ internal const int FillRule = 7;
+ internal const int Ops = 8;
+ internal const int Operands = 9;
+ internal const int X = 10;
+ internal const int Y = 11;
+ internal const int W = 12;
+ internal const int H = 13;
+ internal const int RadiusX = 14;
+ internal const int RadiusY = 15;
+ }
+ }
+}
diff --git a/source/CompDataFlatbuffer/SchemaEnums.cs b/source/CompDataFlatbuffer/SchemaEnums.cs
new file mode 100644
index 00000000..ddafef6d
--- /dev/null
+++ b/source/CompDataFlatbuffer/SchemaEnums.cs
@@ -0,0 +1,139 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+#nullable enable
+
+namespace CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer
+{
+ ///
+ /// Identifies the node vector that a packed object reference points into.
+ /// Must be kept in sync with the ObjectCategory enum in lottie_comp.fbs.
+ ///
+ enum ObjectCategory : byte
+ {
+ Visual = 0,
+ Shape = 1,
+ Geometry = 2,
+ Brush = 3,
+ Animation = 4,
+ Easing = 5,
+ PropertySet = 6,
+ Surface = 7,
+ Clip = 8,
+ Controller = 9,
+ Shadow = 10,
+ Effect = 11,
+ GradientStop = 12,
+ ViewBox = 13,
+ }
+
+ enum VisualKind : byte
+ {
+ Container = 0,
+ Sprite = 1,
+ Shape = 2,
+ Layer = 3,
+ }
+
+ enum ShapeKind : byte
+ {
+ Container = 0,
+ Sprite = 1,
+ }
+
+ enum GeometryKind : byte
+ {
+ Path = 0,
+ Rectangle = 1,
+ RoundedRectangle = 2,
+ Ellipse = 3,
+ }
+
+ enum BrushKind : byte
+ {
+ Color = 0,
+ LinearGradient = 1,
+ RadialGradient = 2,
+ Surface = 3,
+ Mask = 4,
+ Effect = 5,
+ }
+
+ enum ClipKind : byte
+ {
+ Inset = 0,
+ Geometric = 1,
+ }
+
+ enum ShadowKind : byte
+ {
+ Drop = 0,
+ }
+
+ enum SurfaceKind : byte
+ {
+ VisualSurface = 0,
+ LoadedImageFromUri = 1,
+ LoadedImageFromStream = 2,
+ }
+
+ enum EffectKind : byte
+ {
+ Composite = 0,
+ GaussianBlur = 1,
+ }
+
+ enum EasingKind : byte
+ {
+ Linear = 0,
+ CubicBezier = 1,
+ Step = 2,
+ }
+
+ enum AnimationKind : byte
+ {
+ Scalar = 0,
+ Vector2 = 1,
+ Vector3 = 2,
+ Vector4 = 3,
+ Color = 4,
+ Boolean = 5,
+ Path = 6,
+ Expression = 7,
+ }
+
+ enum KeyFrameKind : byte
+ {
+ Value = 0,
+ Expression = 1,
+ }
+
+ enum CanvasGeometryKind : byte
+ {
+ Combination = 0,
+ Ellipse = 1,
+ Group = 2,
+ Path = 3,
+ RoundedRectangle = 4,
+ TransformedGeometry = 5,
+ }
+
+ ///
+ /// The opcodes of the flattened CanvasPathBuilder command stream.
+ ///
+ enum PathOp : byte
+ {
+ /// Consumes 2 operands: x, y.
+ BeginFigure = 0,
+
+ /// Consumes 1 operand: the CanvasFigureLoop.
+ EndFigure = 1,
+
+ /// Consumes 2 operands: x, y.
+ AddLine = 2,
+
+ /// Consumes 6 operands: cp1.x, cp1.y, cp2.x, cp2.y, end.x, end.y.
+ AddCubicBezier = 3,
+ }
+}
diff --git a/source/LottieFlatbuffer/lottie_comp.fbs b/source/LottieFlatbuffer/lottie_comp.fbs
new file mode 100644
index 00000000..1aa8d4dc
--- /dev/null
+++ b/source/LottieFlatbuffer/lottie_comp.fbs
@@ -0,0 +1,529 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+//
+// Serialized form of a translated Lottie animation (a WinCompData object graph).
+//
+// Design notes
+// ------------
+// * The graph is stored as a set of flat node vectors - one per node category -
+// and all references between nodes are indices into those vectors rather than
+// FlatBuffers offsets. This lets an interpreter keep a single realization cache
+// per category that is indexed identically to the serialized data, so
+// reference-identity caching is an array lookup rather than a hash lookup.
+// * Each category is a single table with a "kind" discriminator rather than a
+// union of per-kind tables. This keeps the interpreter to one switch per
+// category and lets the shared property-application code be written once.
+// * Absent fields mean "property was never set", exactly matching the nullable
+// properties of the WinCompData object model.
+//
+// Versioning rules
+// ----------------
+// Changes MUST be additive: new fields are appended to the end of a table, and
+// new enum values are appended to the end of an enum. SCHEMA_VERSION is bumped
+// for every additive change; readers reject buffers whose schema_version is
+// greater than the version they were built against.
+
+namespace CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema;
+
+// ---------------------------------------------------------------------------
+// Value types.
+// ---------------------------------------------------------------------------
+
+struct Vec2 { x: float; y: float; }
+struct Vec3 { x: float; y: float; z: float; }
+struct Vec4 { x: float; y: float; z: float; w: float; }
+struct Mat3x2 { m11: float; m12: float; m21: float; m22: float; m31: float; m32: float; }
+struct Mat4x4 {
+ m11: float; m12: float; m13: float; m14: float;
+ m21: float; m22: float; m23: float; m24: float;
+ m31: float; m32: float; m33: float; m34: float;
+ m41: float; m42: float; m43: float; m44: float;
+}
+struct Color { a: ubyte; r: ubyte; g: ubyte; b: ubyte; }
+
+// ---------------------------------------------------------------------------
+// Enums. Values match the corresponding WinCompData enums.
+// ---------------------------------------------------------------------------
+
+// Identifies the node vector that an object reference points into.
+// An object reference is packed into a uint as (category << 28) | index.
+// The value 0xFFFFFFFF means "no reference".
+enum ObjectCategory : ubyte {
+ Visual = 0,
+ Shape = 1,
+ Geometry = 2,
+ Brush = 3,
+ Animation = 4,
+ Easing = 5,
+ PropertySet = 6,
+ Surface = 7,
+ Clip = 8,
+ Controller = 9,
+ Shadow = 10,
+ Effect = 11,
+ GradientStop = 12,
+ ViewBox = 13,
+}
+
+enum VisualKind : ubyte { Container = 0, Sprite = 1, Shape = 2, Layer = 3 }
+enum ShapeKind : ubyte { Container = 0, Sprite = 1 }
+enum GeometryKind : ubyte { Path = 0, Rectangle = 1, RoundedRectangle = 2, Ellipse = 3 }
+enum BrushKind : ubyte { Color = 0, LinearGradient = 1, RadialGradient = 2, Surface = 3, Mask = 4, Effect = 5 }
+enum ClipKind : ubyte { Inset = 0, Geometric = 1 }
+enum ShadowKind : ubyte { Drop = 0 }
+enum SurfaceKind : ubyte { VisualSurface = 0, LoadedImageFromUri = 1, LoadedImageFromStream = 2 }
+enum EffectKind : ubyte { Composite = 0, GaussianBlur = 1 }
+enum EasingKind : ubyte { Linear = 0, CubicBezier = 1, Step = 2 }
+
+enum AnimationKind : ubyte {
+ Scalar = 0,
+ Vector2 = 1,
+ Vector3 = 2,
+ Vector4 = 3,
+ Color = 4,
+ Boolean = 5,
+ Path = 6,
+ Expression = 7,
+}
+
+enum KeyFrameKind : ubyte { Value = 0, Expression = 1 }
+
+enum CanvasGeometryKind : ubyte {
+ Combination = 0,
+ Ellipse = 1,
+ Group = 2,
+ Path = 3,
+ RoundedRectangle = 4,
+ TransformedGeometry = 5,
+}
+
+// Opcodes of the flattened CanvasPathBuilder command stream. Each opcode
+// consumes a fixed number of floats from the operand vector.
+enum PathOp : ubyte {
+ BeginFigure = 0, // 2 operands: x, y
+ EndFigure = 1, // 1 operand: CanvasFigureLoop as a float
+ AddLine = 2, // 2 operands: x, y
+ AddCubicBezier = 3, // 6 operands: cp1.x, cp1.y, cp2.x, cp2.y, end.x, end.y
+}
+
+// Mirrors WinCompData.MetaData.PropertySetValueType.
+enum PropertyValueType : ubyte {
+ None = 0,
+ Color = 1,
+ Scalar = 2,
+ Vector2 = 3,
+ Vector3 = 4,
+ Vector4 = 5,
+}
+
+// ---------------------------------------------------------------------------
+// Shared structures.
+// ---------------------------------------------------------------------------
+
+// An animation bound to a property of an object.
+table Animator {
+ property: uint; // string index of the animated property name
+ animation: uint; // index into LottieComposition.animations
+ controller: uint = 0xFFFFFFFF; // index into LottieComposition.controllers
+}
+
+// State common to every CompositionObject. Omitted when empty.
+table CompObj {
+ comment: uint = 0xFFFFFFFF; // string index
+ animators: [Animator];
+
+ // The CompositionPropertySet of the object, if it has any values or
+ // animations. Index into LottieComposition.property_sets.
+ properties: uint = 0xFFFFFFFF;
+}
+
+// A named value in a CompositionPropertySet.
+table PropertyValue {
+ name: uint; // string index
+ type: PropertyValueType;
+ scalar: float;
+ vector: Vec4;
+ color: Color;
+}
+
+// A named reference parameter of a CompositionAnimation.
+table ReferenceParameter {
+ name: uint; // string index
+ target: uint; // packed object reference
+}
+
+// A named source of a CompositionEffectBrush.
+table SourceParameter {
+ name: uint; // string index
+ brush: uint; // index into LottieComposition.brushes
+}
+
+table KeyFrame {
+ progress: float;
+ easing: uint = 0xFFFFFFFF; // index into LottieComposition.easings
+ kind: KeyFrameKind;
+ expression: uint = 0xFFFFFFFF; // string index, for expression key frames
+ scalar: float; // Scalar and Boolean values
+ vector: Vec4; // Vector2, Vector3 and Vector4 values
+ color: Color;
+ path: uint = 0xFFFFFFFF; // index into LottieComposition.canvas_geometries
+}
+
+// ---------------------------------------------------------------------------
+// Node tables.
+// ---------------------------------------------------------------------------
+
+table Visual {
+ base: CompObj;
+ kind: VisualKind;
+
+ // Visual.
+ border_mode: ubyte = null;
+ center_point: Vec3;
+ clip: uint = 0xFFFFFFFF;
+ is_visible: bool = null;
+ offset: Vec3;
+ opacity: float = null;
+ rotation_angle_in_degrees: float = null;
+ rotation_axis: Vec3;
+ scale: Vec3;
+ size: Vec2;
+ transform_matrix: Mat4x4;
+
+ // ContainerVisual and LayerVisual.
+ children: [uint];
+
+ // ShapeVisual.
+ shapes: [uint];
+ view_box: uint = 0xFFFFFFFF;
+
+ // SpriteVisual.
+ brush: uint = 0xFFFFFFFF;
+
+ // SpriteVisual and LayerVisual.
+ shadow: uint = 0xFFFFFFFF;
+}
+
+table Shape {
+ base: CompObj;
+ kind: ShapeKind;
+
+ // CompositionShape.
+ center_point: Vec2;
+ offset: Vec2;
+ rotation_angle_in_degrees: float = null;
+ scale: Vec2;
+ transform_matrix: Mat3x2;
+
+ // CompositionContainerShape.
+ shapes: [uint];
+
+ // CompositionSpriteShape.
+ fill_brush: uint = 0xFFFFFFFF;
+ stroke_brush: uint = 0xFFFFFFFF;
+ geometry: uint = 0xFFFFFFFF;
+ is_stroke_non_scaling: bool = null;
+ stroke_dash_offset: float = null;
+ stroke_dash_array: [float];
+ stroke_dash_cap: ubyte = null;
+ stroke_start_cap: ubyte = null;
+ stroke_end_cap: ubyte = null;
+ stroke_line_join: ubyte = null;
+ stroke_miter_limit: float = null;
+ stroke_thickness: float = null;
+}
+
+table Geometry {
+ base: CompObj;
+ kind: GeometryKind;
+
+ // CompositionGeometry.
+ trim_start: float = null;
+ trim_end: float = null;
+ trim_offset: float = null;
+
+ // CompositionPathGeometry.
+ path: uint = 0xFFFFFFFF; // index into canvas_geometries
+
+ // CompositionRectangleGeometry and CompositionRoundedRectangleGeometry.
+ offset: Vec2;
+ size: Vec2;
+
+ // CompositionRoundedRectangleGeometry.
+ corner_radius: Vec2;
+
+ // CompositionEllipseGeometry.
+ center: Vec2;
+ radius: Vec2;
+}
+
+table Brush {
+ base: CompObj;
+ kind: BrushKind;
+
+ // CompositionColorBrush.
+ color: Color;
+
+ // CompositionGradientBrush.
+ anchor_point: Vec2;
+ center_point: Vec2;
+ color_stops: [uint];
+ extend_mode: ubyte = null;
+ interpolation_space: ubyte = null;
+ mapping_mode: ubyte = null;
+ offset: Vec2;
+ rotation_angle_in_degrees: float = null;
+ scale: Vec2;
+ transform_matrix: Mat3x2;
+
+ // CompositionLinearGradientBrush.
+ start_point: Vec2;
+ end_point: Vec2;
+
+ // CompositionRadialGradientBrush.
+ ellipse_center: Vec2;
+ ellipse_radius: Vec2;
+ gradient_origin_offset: Vec2;
+
+ // CompositionSurfaceBrush.
+ surface: uint = 0xFFFFFFFF;
+
+ // CompositionMaskBrush.
+ source: uint = 0xFFFFFFFF;
+ mask: uint = 0xFFFFFFFF;
+
+ // CompositionEffectBrush.
+ effect: uint = 0xFFFFFFFF;
+ source_parameters: [SourceParameter];
+}
+
+table GradientStop {
+ base: CompObj;
+ color: Color;
+ offset: float;
+}
+
+table ViewBox {
+ base: CompObj;
+ size: Vec2;
+}
+
+table Clip {
+ base: CompObj;
+ kind: ClipKind;
+
+ // CompositionClip.
+ center_point: Vec2;
+ scale: Vec2;
+
+ // InsetClip.
+ left_inset: float = null;
+ right_inset: float = null;
+ top_inset: float = null;
+ bottom_inset: float = null;
+
+ // CompositionGeometricClip.
+ geometry: uint = 0xFFFFFFFF;
+}
+
+table Shadow {
+ base: CompObj;
+ kind: ShadowKind;
+
+ // DropShadow.
+ blur_radius: float = null;
+ color: Color;
+ mask: uint = 0xFFFFFFFF;
+ offset: Vec3;
+ opacity: float = null;
+ source_policy: ubyte = null;
+}
+
+table Surface {
+ base: CompObj;
+ kind: SurfaceKind;
+
+ // CompositionVisualSurface.
+ source_visual: uint = 0xFFFFFFFF;
+ source_size: Vec2;
+ source_offset: Vec2;
+
+ // LoadedImageSurfaceFromUri.
+ uri: uint = 0xFFFFFFFF; // string index
+
+ // LoadedImageSurfaceFromStream.
+ bytes: [ubyte];
+}
+
+table Effect {
+ base: CompObj;
+ kind: EffectKind;
+
+ // Names (string indices) of the CompositionEffectSourceParameters.
+ sources: [uint];
+
+ // CompositeEffect.
+ mode: ubyte; // CanvasComposite
+
+ // GaussianBlurEffect.
+ blur_amount: float;
+}
+
+table Easing {
+ base: CompObj;
+ kind: EasingKind;
+
+ // CubicBezierEasingFunction.
+ control_point_1: Vec2;
+ control_point_2: Vec2;
+
+ // StepEasingFunction.
+ step_count: int = null;
+ initial_step: int = null;
+ final_step: int = null;
+ is_initial_step_single_frame: bool = null;
+ is_final_step_single_frame: bool = null;
+}
+
+table Animation {
+ base: CompObj;
+ kind: AnimationKind;
+ target: uint = 0xFFFFFFFF; // string index
+ reference_parameters: [ReferenceParameter];
+
+ // ExpressionAnimation.
+ expression: uint = 0xFFFFFFFF; // string index
+
+ // KeyFrameAnimation.
+ duration_ticks: long;
+ key_frames: [KeyFrame];
+
+ // ColorKeyFrameAnimation.
+ interpolation_color_space: ubyte = null;
+}
+
+table PropertySet {
+ base: CompObj;
+
+ // The object that owns this property set, or 0xFFFFFFFF if the property set
+ // is standalone (created by Compositor.CreatePropertySet).
+ owner: uint = 0xFFFFFFFF; // packed object reference
+ values: [PropertyValue];
+}
+
+table Controller {
+ base: CompObj;
+
+ // The object and property that this controller controls. Absent for a
+ // custom controller.
+ target_object: uint = 0xFFFFFFFF; // packed object reference
+ target_property: uint = 0xFFFFFFFF; // string index
+ is_paused: bool;
+ is_custom: bool;
+}
+
+// ---------------------------------------------------------------------------
+// Metadata.
+// ---------------------------------------------------------------------------
+
+table PropertyBinding {
+ name: uint; // string index of the binding name
+ display_name: uint; // string index
+ actual_type: PropertyValueType;
+ exposed_type: PropertyValueType;
+ default_scalar: float;
+ default_vector: Vec4;
+ default_color: Color;
+}
+
+table Marker {
+ name: uint; // string index
+ progress: float; // start of the marker, 0..1
+ duration_progress: float; // duration of the marker, 0..1
+}
+
+table Metadata {
+ name: uint = 0xFFFFFFFF; // string index of the composition name
+ width: float;
+ height: float;
+ duration_ticks: long;
+ frames_per_second: float;
+ property_bindings: [PropertyBinding];
+ markers: [Marker];
+
+ // The property set that holds the theming properties, or 0xFFFFFFFF.
+ theming_property_set: uint = 0xFFFFFFFF; // index into property_sets
+}
+
+// ---------------------------------------------------------------------------
+// Root.
+// ---------------------------------------------------------------------------
+
+table LottieComposition {
+ schema_version: ushort;
+ required_uap_version: ushort;
+ metadata: Metadata;
+
+ // Index into visuals of the root of the tree.
+ root_visual: uint = 0xFFFFFFFF;
+
+ strings: [string];
+ visuals: [Visual];
+ shapes: [Shape];
+ geometries: [Geometry];
+ canvas_geometries: [CanvasGeometry];
+ brushes: [Brush];
+ gradient_stops: [GradientStop];
+ view_boxes: [ViewBox];
+ clips: [Clip];
+ shadows: [Shadow];
+ surfaces: [Surface];
+ effects: [Effect];
+ easings: [Easing];
+ animations: [Animation];
+ property_sets: [PropertySet];
+ controllers: [Controller];
+
+ // Indices into controllers of the custom animation controllers, in the order
+ // that a host should expose them.
+ custom_controllers: [uint];
+}
+
+table CanvasGeometry {
+ kind: CanvasGeometryKind;
+
+ // Combination.
+ a: uint = 0xFFFFFFFF;
+ b: uint = 0xFFFFFFFF;
+ combine_mode: ubyte;
+
+ // Combination and TransformedGeometry.
+ matrix: Mat3x2;
+
+ // TransformedGeometry.
+ source: uint = 0xFFFFFFFF;
+
+ // Group.
+ geometries: [uint];
+
+ // Group and Path.
+ fill_rule: ubyte; // CanvasFilledRegionDetermination
+
+ // Path.
+ ops: [ubyte];
+ operands: [float];
+
+ // Ellipse (x, y, radius_x, radius_y) and
+ // RoundedRectangle (x, y, w, h, radius_x, radius_y).
+ x: float;
+ y: float;
+ w: float;
+ h: float;
+ radius_x: float;
+ radius_y: float;
+}
+
+root_type LottieComposition;
+file_identifier "LCMP";
+file_extension "lcomp";
From 720203b7d19a14ecffa8c5d52b30d518368e8ef0 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 31 Aug 2026 17:54:30 +0000
Subject: [PATCH 02/39] Use official Google.FlatBuffers tooling instead of
hand-rolled reader/writer
Co-authored-by: jonwis <18537118+jonwis@users.noreply.github.com>
---
build/RegenerateFlatbuffers.ps1 | 45 +
.../CompDataFlatbuffer.dll.csproj | 24 +
.../CompDataFlatbuffer.projitems | 19 +
.../CompDataFlatbuffer.shproj | 13 +
.../FlatBufferFormatException.cs | 33 -
source/CompDataFlatbuffer/FlatBufferTable.cs | 325 ---
source/CompDataFlatbuffer/FlatBufferWriter.cs | 474 ----
source/CompDataFlatbuffer/Format.cs | 79 +
.../Generated/lottie_comp_generated.cs | 2051 +++++++++++++++++
source/CompDataFlatbuffer/Schema.cs | 385 ----
source/CompDataFlatbuffer/SchemaEnums.cs | 139 --
11 files changed, 2231 insertions(+), 1356 deletions(-)
create mode 100644 build/RegenerateFlatbuffers.ps1
create mode 100644 dlls/CompDataFlatbuffer/CompDataFlatbuffer.dll.csproj
create mode 100644 source/CompDataFlatbuffer/CompDataFlatbuffer.projitems
create mode 100644 source/CompDataFlatbuffer/CompDataFlatbuffer.shproj
delete mode 100644 source/CompDataFlatbuffer/FlatBufferFormatException.cs
delete mode 100644 source/CompDataFlatbuffer/FlatBufferTable.cs
delete mode 100644 source/CompDataFlatbuffer/FlatBufferWriter.cs
create mode 100644 source/CompDataFlatbuffer/Format.cs
create mode 100644 source/CompDataFlatbuffer/Generated/lottie_comp_generated.cs
delete mode 100644 source/CompDataFlatbuffer/Schema.cs
delete mode 100644 source/CompDataFlatbuffer/SchemaEnums.cs
diff --git a/build/RegenerateFlatbuffers.ps1 b/build/RegenerateFlatbuffers.ps1
new file mode 100644
index 00000000..8cc52934
--- /dev/null
+++ b/build/RegenerateFlatbuffers.ps1
@@ -0,0 +1,45 @@
+# Regenerates the FlatBuffers code for lottie_comp.fbs.
+#
+# The generated C# and C++ sources are checked in so that contributors do not
+# need flatc installed in order to build. Run this script after any change to
+# source/LottieFlatbuffer/lottie_comp.fbs, and check in the result.
+#
+# The version of flatc MUST match the version of the Google.FlatBuffers NuGet
+# package referenced by dlls/CompDataFlatbuffer/CompDataFlatbuffer.dll.csproj,
+# because the generated C# calls a version-stamped validation method
+# (FlatBufferConstants.FLATBUFFERS_) that only exists in the matching
+# package.
+#
+# Download flatc from https://github.com/google/flatbuffers/releases/tag/v25.2.10
+
+[CmdletBinding()]
+param(
+ # Path to the flatc executable. Defaults to whatever is on the PATH.
+ [string]$Flatc = "flatc"
+)
+
+$ErrorActionPreference = "Stop"
+
+$expectedVersion = "25.2.10"
+
+$repoRoot = Resolve-Path (Join-Path $PSScriptRoot "..")
+$schema = Join-Path $repoRoot "source/LottieFlatbuffer/lottie_comp.fbs"
+$csharpOut = Join-Path $repoRoot "source/CompDataFlatbuffer/Generated"
+$cppOut = Join-Path $repoRoot "dlls/LottieRuntime/Generated"
+
+$actualVersion = (& $Flatc --version) -replace '^flatc version ', ''
+if ($actualVersion.Trim() -ne $expectedVersion) {
+ throw "flatc version $expectedVersion is required, but '$Flatc' is version $($actualVersion.Trim())."
+}
+
+New-Item -ItemType Directory -Force -Path $csharpOut, $cppOut | Out-Null
+
+# --gen-onefile keeps the checked in C# to a single file rather than one file
+# per type spread over a namespace directory tree.
+& $Flatc --csharp --gen-onefile -o $csharpOut $schema
+if ($LASTEXITCODE -ne 0) { throw "flatc failed to generate C#." }
+
+& $Flatc --cpp --scoped-enums -o $cppOut $schema
+if ($LASTEXITCODE -ne 0) { throw "flatc failed to generate C++." }
+
+Write-Host "Generated FlatBuffers code from $schema"
diff --git a/dlls/CompDataFlatbuffer/CompDataFlatbuffer.dll.csproj b/dlls/CompDataFlatbuffer/CompDataFlatbuffer.dll.csproj
new file mode 100644
index 00000000..cb3d2170
--- /dev/null
+++ b/dlls/CompDataFlatbuffer/CompDataFlatbuffer.dll.csproj
@@ -0,0 +1,24 @@
+
+
+
+ net9.0
+ Debug;Release
+ latest
+ PUBLIC_CompDataFlatbuffer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/CompDataFlatbuffer/CompDataFlatbuffer.projitems b/source/CompDataFlatbuffer/CompDataFlatbuffer.projitems
new file mode 100644
index 00000000..add80aa3
--- /dev/null
+++ b/source/CompDataFlatbuffer/CompDataFlatbuffer.projitems
@@ -0,0 +1,19 @@
+
+
+
+ $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
+ true
+ 5a3f2c41-9a2e-4c2d-9f4a-1d1a0f6b3c77
+
+
+ CompDataFlatbuffer
+
+
+
+
+
+
+
+
+
diff --git a/source/CompDataFlatbuffer/CompDataFlatbuffer.shproj b/source/CompDataFlatbuffer/CompDataFlatbuffer.shproj
new file mode 100644
index 00000000..5a214f6b
--- /dev/null
+++ b/source/CompDataFlatbuffer/CompDataFlatbuffer.shproj
@@ -0,0 +1,13 @@
+
+
+
+ 5a3f2c41-9a2e-4c2d-9f4a-1d1a0f6b3c77
+ 14.0
+
+
+
+
+
+
+
+
diff --git a/source/CompDataFlatbuffer/FlatBufferFormatException.cs b/source/CompDataFlatbuffer/FlatBufferFormatException.cs
deleted file mode 100644
index 62756e2c..00000000
--- a/source/CompDataFlatbuffer/FlatBufferFormatException.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-#nullable enable
-
-using System;
-
-namespace CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer
-{
- ///
- /// Thrown when a buffer is not a valid serialized composition.
- ///
-#if PUBLIC_CompDataFlatbuffer
- public
-#endif
- sealed class FlatBufferFormatException : Exception
- {
- public FlatBufferFormatException()
- {
- }
-
- public FlatBufferFormatException(string message)
- : base(message)
- {
- }
-
- public FlatBufferFormatException(string message, Exception innerException)
- : base(message, innerException)
- {
- }
- }
-}
diff --git a/source/CompDataFlatbuffer/FlatBufferTable.cs b/source/CompDataFlatbuffer/FlatBufferTable.cs
deleted file mode 100644
index 8338ac78..00000000
--- a/source/CompDataFlatbuffer/FlatBufferTable.cs
+++ /dev/null
@@ -1,325 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-#nullable enable
-
-using System;
-using System.Text;
-
-namespace CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer
-{
- ///
- /// A minimal reader for the FlatBuffers binary wire format. All accesses are
- /// bounds checked; a malformed buffer causes a
- /// rather than undefined behavior.
- ///
- readonly struct FlatBufferTable
- {
- readonly byte[] _buffer;
- readonly int _position;
-
- internal FlatBufferTable(byte[] buffer, int position)
- {
- _buffer = buffer;
- _position = position;
- }
-
- internal bool IsNull => _buffer is null;
-
- ///
- /// Gets the root table of a buffer, checking its file identifier.
- ///
- /// The buffer.
- /// The expected 4 character file identifier.
- /// The root table.
- internal static FlatBufferTable GetRoot(byte[] buffer, string fileIdentifier)
- {
- if (buffer is null)
- {
- throw new ArgumentNullException(nameof(buffer));
- }
-
- if (buffer.Length < 8)
- {
- throw new FlatBufferFormatException("Buffer is too small.");
- }
-
- for (var i = 0; i < 4; i++)
- {
- if (buffer[4 + i] != (byte)fileIdentifier[i])
- {
- throw new FlatBufferFormatException("Unrecognized file identifier.");
- }
- }
-
- var rootOffset = ReadInt32(buffer, 0);
- return new FlatBufferTable(buffer, CheckedAdd(buffer, 0, rootOffset));
- }
-
- ///
- /// Returns the absolute position of the data of the field with the given
- /// id, or 0 if the field is not present.
- ///
- /// The id of the field.
- /// The position of the field's data, or 0.
- internal int FieldPosition(int field)
- {
- var vtable = _position - ReadInt32(_buffer, _position);
- if (vtable < 0 || vtable + 4 > _buffer.Length)
- {
- throw new FlatBufferFormatException("Invalid vtable offset.");
- }
-
- var vtableSize = ReadUInt16(_buffer, vtable);
- var fieldIndex = 4 + (field * 2);
- if (fieldIndex + 2 > vtableSize)
- {
- return 0;
- }
-
- var fieldOffset = ReadUInt16(_buffer, vtable + fieldIndex);
- if (fieldOffset == 0)
- {
- return 0;
- }
-
- var result = _position + fieldOffset;
- if (result < 0 || result >= _buffer.Length)
- {
- throw new FlatBufferFormatException("Field is outside the buffer.");
- }
-
- return result;
- }
-
- internal byte GetUInt8(int field, byte defaultValue)
- {
- var position = FieldPosition(field);
- return position == 0 ? defaultValue : _buffer[position];
- }
-
- internal byte? GetOptionalUInt8(int field)
- {
- var position = FieldPosition(field);
- return position == 0 ? (byte?)null : _buffer[position];
- }
-
- internal bool GetBool(int field, bool defaultValue)
- => GetUInt8(field, (byte)(defaultValue ? 1 : 0)) != 0;
-
- internal bool? GetOptionalBool(int field)
- {
- var value = GetOptionalUInt8(field);
- return value.HasValue ? value.Value != 0 : (bool?)null;
- }
-
- internal ushort GetUInt16(int field, ushort defaultValue)
- {
- var position = FieldPosition(field);
- return position == 0 ? defaultValue : ReadUInt16(_buffer, position);
- }
-
- internal int GetInt32(int field, int defaultValue)
- {
- var position = FieldPosition(field);
- return position == 0 ? defaultValue : ReadInt32(_buffer, position);
- }
-
- internal int? GetOptionalInt32(int field)
- {
- var position = FieldPosition(field);
- return position == 0 ? (int?)null : ReadInt32(_buffer, position);
- }
-
- internal uint GetUInt32(int field, uint defaultValue)
- {
- var position = FieldPosition(field);
- return position == 0 ? defaultValue : unchecked((uint)ReadInt32(_buffer, position));
- }
-
- internal long GetInt64(int field, long defaultValue)
- {
- var position = FieldPosition(field);
- if (position == 0)
- {
- return defaultValue;
- }
-
- var low = unchecked((uint)ReadInt32(_buffer, position));
- var high = ReadInt32(_buffer, position + 4);
- return unchecked((long)(((ulong)(uint)high << 32) | low));
- }
-
- internal float GetFloat(int field, float defaultValue)
- {
- var position = FieldPosition(field);
- return position == 0 ? defaultValue : BitConverter.Int32BitsToSingle(ReadInt32(_buffer, position));
- }
-
- internal float? GetOptionalFloat(int field)
- {
- var position = FieldPosition(field);
- return position == 0 ? (float?)null : BitConverter.Int32BitsToSingle(ReadInt32(_buffer, position));
- }
-
- ///
- /// Returns the position of an inline struct field, or 0 if not present.
- /// Use the ReadStructFloat and ReadStructUInt8 methods to read its fields.
- ///
- /// The id of the field.
- /// The position of the struct, or 0.
- internal int GetStructPosition(int field) => FieldPosition(field);
-
- internal float ReadStructFloat(int structPosition, int offset)
- => BitConverter.Int32BitsToSingle(ReadInt32(_buffer, structPosition + offset));
-
- internal byte ReadStructUInt8(int structPosition, int offset)
- {
- if (structPosition + offset >= _buffer.Length)
- {
- throw new FlatBufferFormatException("Struct is outside the buffer.");
- }
-
- return _buffer[structPosition + offset];
- }
-
- internal FlatBufferTable GetTable(int field)
- {
- var position = FieldPosition(field);
- return position == 0
- ? default
- : new FlatBufferTable(_buffer, CheckedAdd(_buffer, position, ReadInt32(_buffer, position)));
- }
-
- internal string? GetString(int field)
- {
- var position = FieldPosition(field);
- if (position == 0)
- {
- return null;
- }
-
- var stringPosition = CheckedAdd(_buffer, position, ReadInt32(_buffer, position));
- var length = ReadInt32(_buffer, stringPosition);
- if (length < 0 || stringPosition + 4 + length > _buffer.Length)
- {
- throw new FlatBufferFormatException("String is outside the buffer.");
- }
-
- return Encoding.UTF8.GetString(_buffer, stringPosition + 4, length);
- }
-
- ///
- /// Returns the number of elements in a vector field.
- ///
- /// The id of the field.
- /// The number of elements, or 0 if the field is not present.
- internal int VectorLength(int field)
- {
- var position = FieldPosition(field);
- if (position == 0)
- {
- return 0;
- }
-
- var vector = CheckedAdd(_buffer, position, ReadInt32(_buffer, position));
- var length = ReadInt32(_buffer, vector);
- if (length < 0)
- {
- throw new FlatBufferFormatException("Invalid vector length.");
- }
-
- return length;
- }
-
- internal byte GetVectorUInt8(int field, int index)
- {
- var position = VectorElementPosition(field, index, sizeof(byte));
- return _buffer[position];
- }
-
- internal float GetVectorFloat(int field, int index)
- => BitConverter.Int32BitsToSingle(ReadInt32(_buffer, VectorElementPosition(field, index, sizeof(float))));
-
- internal uint GetVectorUInt32(int field, int index)
- => unchecked((uint)ReadInt32(_buffer, VectorElementPosition(field, index, sizeof(uint))));
-
- internal FlatBufferTable GetVectorTable(int field, int index)
- {
- var position = VectorElementPosition(field, index, sizeof(int));
- return new FlatBufferTable(_buffer, CheckedAdd(_buffer, position, ReadInt32(_buffer, position)));
- }
-
- internal string GetVectorString(int field, int index)
- {
- var position = VectorElementPosition(field, index, sizeof(int));
- var stringPosition = CheckedAdd(_buffer, position, ReadInt32(_buffer, position));
- var length = ReadInt32(_buffer, stringPosition);
- if (length < 0 || stringPosition + 4 + length > _buffer.Length)
- {
- throw new FlatBufferFormatException("String is outside the buffer.");
- }
-
- return Encoding.UTF8.GetString(_buffer, stringPosition + 4, length);
- }
-
- static int ReadInt32(byte[] buffer, int position)
- {
- if (position < 0 || position + 4 > buffer.Length)
- {
- throw new FlatBufferFormatException("Read is outside the buffer.");
- }
-
- return buffer[position] |
- (buffer[position + 1] << 8) |
- (buffer[position + 2] << 16) |
- (buffer[position + 3] << 24);
- }
-
- static ushort ReadUInt16(byte[] buffer, int position)
- {
- if (position < 0 || position + 2 > buffer.Length)
- {
- throw new FlatBufferFormatException("Read is outside the buffer.");
- }
-
- return unchecked((ushort)(buffer[position] | (buffer[position + 1] << 8)));
- }
-
- static int CheckedAdd(byte[] buffer, int position, int offset)
- {
- var result = (long)position + offset;
- if (result < 0 || result >= buffer.Length)
- {
- throw new FlatBufferFormatException("Offset is outside the buffer.");
- }
-
- return (int)result;
- }
-
- int VectorElementPosition(int field, int index, int elementSize)
- {
- var position = FieldPosition(field);
- if (position == 0)
- {
- throw new FlatBufferFormatException("Vector is not present.");
- }
-
- var vector = CheckedAdd(_buffer, position, ReadInt32(_buffer, position));
- var length = ReadInt32(_buffer, vector);
- if (index < 0 || index >= length)
- {
- throw new FlatBufferFormatException("Vector index is out of range.");
- }
-
- var result = vector + 4 + (index * elementSize);
- if (result < 0 || result + elementSize > _buffer.Length)
- {
- throw new FlatBufferFormatException("Vector element is outside the buffer.");
- }
-
- return result;
- }
- }
-}
diff --git a/source/CompDataFlatbuffer/FlatBufferWriter.cs b/source/CompDataFlatbuffer/FlatBufferWriter.cs
deleted file mode 100644
index e4fbbc4e..00000000
--- a/source/CompDataFlatbuffer/FlatBufferWriter.cs
+++ /dev/null
@@ -1,474 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-#nullable enable
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer
-{
- ///
- /// A minimal writer for the FlatBuffers binary wire format. Buffers produced
- /// by this writer are readable by any FlatBuffers implementation, including
- /// the C++ code generated from lottie_comp.fbs.
- ///
- ///
- /// The wire format is described at https://flatbuffers.dev/flatbuffers_internals.html.
- /// Data is written from the end of the buffer towards its start, so all
- /// offsets returned by this class are measured backwards from the end of the
- /// buffer.
- ///
- sealed class FlatBufferWriter
- {
- // The offsets of the vtables that have been written so far. Used to
- // share identical vtables between tables.
- readonly List _vtables = new List();
-
- // The field offsets of the table that is currently being built.
- readonly List _currentVTable = new List();
-
- byte[] _buffer;
-
- // The number of bytes at the end of _buffer that contain data.
- int _used;
-
- // The offset of the start of the table that is currently being built,
- // or -1 if no table is being built.
- int _tableStart = -1;
-
- int _minAlign = 1;
-
- internal FlatBufferWriter(int initialSize = 4096)
- {
- _buffer = new byte[Math.Max(initialSize, 32)];
- }
-
- ///
- /// Starts a table with the given number of fields. Fields are added with
- /// the Add methods, then the table is completed by calling .
- ///
- /// The number of fields declared by the table in the schema.
- internal void StartTable(int fieldCount)
- {
- if (_tableStart >= 0)
- {
- throw new InvalidOperationException("Nested table construction is not supported.");
- }
-
- _currentVTable.Clear();
- for (var i = 0; i < fieldCount; i++)
- {
- _currentVTable.Add(0);
- }
-
- _tableStart = _used;
- }
-
- ///
- /// Completes the table that is being built and returns its offset.
- ///
- /// The offset of the table.
- internal int EndTable()
- {
- if (_tableStart < 0)
- {
- throw new InvalidOperationException("No table is being built.");
- }
-
- // Reserve space for the offset to the vtable.
- Prep(sizeof(int), 0);
- EnsureSpace(sizeof(int));
- _used += sizeof(int);
- var tableEnd = _used;
-
- // Trailing empty fields are implied by the length of the vtable.
- var fieldCount = _currentVTable.Count;
- while (fieldCount > 0 && _currentVTable[fieldCount - 1] == 0)
- {
- fieldCount--;
- }
-
- // Write the vtable: the size of the vtable, the size of the table,
- // then the offset of each field within the table.
- var vtableSize = (fieldCount + 2) * sizeof(short);
- Prep(sizeof(short), vtableSize);
- for (var i = fieldCount - 1; i >= 0; i--)
- {
- var fieldOffset = _currentVTable[i];
- WriteInt16(checked((short)(fieldOffset == 0 ? 0 : tableEnd - fieldOffset)));
- }
-
- WriteInt16(checked((short)(tableEnd - _tableStart)));
- WriteInt16(checked((short)vtableSize));
-
- var vtableOffset = _used;
-
- // Share an identical vtable if one has already been written.
- var sharedVTableOffset = FindMatchingVTable(vtableOffset, vtableSize);
- if (sharedVTableOffset >= 0)
- {
- _used = vtableOffset - vtableSize;
- vtableOffset = sharedVTableOffset;
- }
- else
- {
- _vtables.Add(vtableOffset);
- }
-
- // Patch the signed offset from the table to its vtable.
- WriteInt32At(tableEnd, vtableOffset - tableEnd);
-
- _tableStart = -1;
- return tableEnd;
- }
-
- internal void AddUInt8(int field, byte value, byte defaultValue)
- {
- if (value != defaultValue)
- {
- Prep(sizeof(byte), 0);
- WriteByte(value);
- Slot(field);
- }
- }
-
- internal void AddUInt8(int field, byte? value)
- {
- if (value.HasValue)
- {
- Prep(sizeof(byte), 0);
- WriteByte(value.Value);
- Slot(field);
- }
- }
-
- internal void AddBool(int field, bool value, bool defaultValue)
- => AddUInt8(field, (byte)(value ? 1 : 0), (byte)(defaultValue ? 1 : 0));
-
- internal void AddBool(int field, bool? value)
- => AddUInt8(field, value.HasValue ? (byte)(value.Value ? 1 : 0) : (byte?)null);
-
- internal void AddUInt16(int field, ushort value, ushort defaultValue)
- {
- if (value != defaultValue)
- {
- Prep(sizeof(short), 0);
- WriteInt16(unchecked((short)value));
- Slot(field);
- }
- }
-
- internal void AddInt32(int field, int value, int defaultValue)
- {
- if (value != defaultValue)
- {
- Prep(sizeof(int), 0);
- WriteInt32(value);
- Slot(field);
- }
- }
-
- internal void AddInt32(int field, int? value)
- {
- if (value.HasValue)
- {
- Prep(sizeof(int), 0);
- WriteInt32(value.Value);
- Slot(field);
- }
- }
-
- internal void AddUInt32(int field, uint value, uint defaultValue)
- => AddInt32(field, unchecked((int)value), unchecked((int)defaultValue));
-
- internal void AddInt64(int field, long value, long defaultValue)
- {
- if (value != defaultValue)
- {
- Prep(sizeof(long), 0);
- WriteInt64(value);
- Slot(field);
- }
- }
-
- internal void AddFloat(int field, float value, float defaultValue)
- {
- if (!value.Equals(defaultValue))
- {
- Prep(sizeof(float), 0);
- WriteInt32(BitConverter.SingleToInt32Bits(value));
- Slot(field);
- }
- }
-
- internal void AddFloat(int field, float? value)
- {
- if (value.HasValue)
- {
- Prep(sizeof(float), 0);
- WriteInt32(BitConverter.SingleToInt32Bits(value.Value));
- Slot(field);
- }
- }
-
- ///
- /// Adds a reference to a previously created table, vector or string.
- /// An of 0 means "not present".
- ///
- /// The id of the field.
- /// The offset of the referenced data.
- internal void AddOffset(int field, int offset)
- {
- if (offset != 0)
- {
- Prep(sizeof(int), 0);
- WriteInt32(_used + sizeof(int) - offset);
- Slot(field);
- }
- }
-
- ///
- /// Prepares to write an inline struct of the given size and alignment.
- /// The struct's fields must then be written in reverse declaration order
- /// using the Write methods, followed by .
- ///
- /// The alignment of the struct.
- /// The size of the struct.
- internal void StartStruct(int alignment, int size) => Prep(alignment, size);
-
- ///
- /// Adds an inline struct field whose data was just written by
- /// and the Write methods.
- ///
- /// The id of the field.
- internal void AddStruct(int field) => Slot(field);
-
- internal void WriteFloat(float value) => WriteInt32(BitConverter.SingleToInt32Bits(value));
-
- internal void WriteUInt8(byte value) => WriteByte(value);
-
- internal int CreateString(string value)
- {
- var bytes = Encoding.UTF8.GetBytes(value);
-
- // Strings are null terminated for the convenience of C++ readers.
- Prep(sizeof(int), bytes.Length + 1);
- WriteByte(0);
- EnsureSpace(bytes.Length);
- _used += bytes.Length;
- Array.Copy(bytes, 0, _buffer, _buffer.Length - _used, bytes.Length);
- WriteInt32(bytes.Length);
- return _used;
- }
-
- internal int CreateByteVector(IReadOnlyList values)
- {
- StartVector(sizeof(byte), values.Count, sizeof(byte));
- for (var i = values.Count - 1; i >= 0; i--)
- {
- WriteByte(values[i]);
- }
-
- return EndVector(values.Count);
- }
-
- internal int CreateFloatVector(IReadOnlyList values)
- {
- StartVector(sizeof(float), values.Count, sizeof(float));
- for (var i = values.Count - 1; i >= 0; i--)
- {
- WriteInt32(BitConverter.SingleToInt32Bits(values[i]));
- }
-
- return EndVector(values.Count);
- }
-
- internal int CreateUInt32Vector(IReadOnlyList values)
- {
- StartVector(sizeof(uint), values.Count, sizeof(uint));
- for (var i = values.Count - 1; i >= 0; i--)
- {
- WriteInt32(unchecked((int)values[i]));
- }
-
- return EndVector(values.Count);
- }
-
- ///
- /// Creates a vector of offsets to previously created tables or strings.
- ///
- /// The offsets of the referenced data.
- /// The offset of the vector.
- internal int CreateOffsetVector(IReadOnlyList offsets)
- {
- StartVector(sizeof(int), offsets.Count, sizeof(int));
- for (var i = offsets.Count - 1; i >= 0; i--)
- {
- Prep(sizeof(int), 0);
- WriteInt32(_used + sizeof(int) - offsets[i]);
- }
-
- return EndVector(offsets.Count);
- }
-
- ///
- /// Completes the buffer, making its root.
- ///
- /// The offset of the root table.
- /// The 4 character file identifier.
- /// The completed buffer.
- internal byte[] Finish(int rootTable, string fileIdentifier)
- {
- if (fileIdentifier is null || fileIdentifier.Length != 4)
- {
- throw new ArgumentException("File identifier must be 4 characters.", nameof(fileIdentifier));
- }
-
- Prep(_minAlign, sizeof(int) + 4);
- for (var i = 3; i >= 0; i--)
- {
- WriteByte((byte)fileIdentifier[i]);
- }
-
- WriteInt32(_used + sizeof(int) - rootTable);
-
- var result = new byte[_used];
- Array.Copy(_buffer, _buffer.Length - _used, result, 0, _used);
- return result;
- }
-
- void StartVector(int elementSize, int count, int alignment)
- {
- Prep(sizeof(int), elementSize * count);
- Prep(alignment, elementSize * count);
- }
-
- int EndVector(int count)
- {
- WriteInt32(count);
- return _used;
- }
-
- // Records the offset of the field that was just written.
- void Slot(int field)
- {
- if (field >= _currentVTable.Count)
- {
- throw new ArgumentOutOfRangeException(nameof(field));
- }
-
- _currentVTable[field] = _used;
- }
-
- // Pads so that, after writing additionalBytes more bytes, the write
- // position will be aligned to the given alignment.
- void Prep(int alignment, int additionalBytes)
- {
- if (alignment > _minAlign)
- {
- _minAlign = alignment;
- }
-
- var alignSize = ((~(_used + additionalBytes)) + 1) & (alignment - 1);
- EnsureSpace(alignSize + additionalBytes);
- for (var i = 0; i < alignSize; i++)
- {
- WriteByte(0);
- }
- }
-
- int FindMatchingVTable(int vtableOffset, int vtableSize)
- {
- foreach (var candidate in _vtables)
- {
- if (ReadInt16At(candidate) != vtableSize)
- {
- continue;
- }
-
- var match = true;
- for (var i = sizeof(short); i < vtableSize; i += sizeof(short))
- {
- if (ReadInt16At(candidate - i) != ReadInt16At(vtableOffset - i))
- {
- match = false;
- break;
- }
- }
-
- if (match)
- {
- return candidate;
- }
- }
-
- return -1;
- }
-
- void EnsureSpace(int size)
- {
- if (_used + size <= _buffer.Length)
- {
- return;
- }
-
- var newSize = _buffer.Length;
- while (newSize < _used + size)
- {
- newSize *= 2;
- }
-
- var newBuffer = new byte[newSize];
- Array.Copy(_buffer, _buffer.Length - _used, newBuffer, newSize - _used, _used);
- _buffer = newBuffer;
- }
-
- void WriteByte(byte value)
- {
- EnsureSpace(sizeof(byte));
- _used += sizeof(byte);
- _buffer[_buffer.Length - _used] = value;
- }
-
- void WriteInt16(short value)
- {
- EnsureSpace(sizeof(short));
- _used += sizeof(short);
- var index = _buffer.Length - _used;
- _buffer[index] = unchecked((byte)value);
- _buffer[index + 1] = unchecked((byte)(value >> 8));
- }
-
- void WriteInt32(int value)
- {
- EnsureSpace(sizeof(int));
- _used += sizeof(int);
- WriteInt32At(_used, value);
- }
-
- void WriteInt64(long value)
- {
- // The buffer is written backwards, so the high word is written first.
- WriteInt32(unchecked((int)(value >> 32)));
- WriteInt32(unchecked((int)value));
- }
-
- void WriteInt32At(int offset, int value)
- {
- var index = _buffer.Length - offset;
- _buffer[index] = unchecked((byte)value);
- _buffer[index + 1] = unchecked((byte)(value >> 8));
- _buffer[index + 2] = unchecked((byte)(value >> 16));
- _buffer[index + 3] = unchecked((byte)(value >> 24));
- }
-
- short ReadInt16At(int offset)
- {
- var index = _buffer.Length - offset;
- return unchecked((short)(_buffer[index] | (_buffer[index + 1] << 8)));
- }
- }
-}
diff --git a/source/CompDataFlatbuffer/Format.cs b/source/CompDataFlatbuffer/Format.cs
new file mode 100644
index 00000000..b019590c
--- /dev/null
+++ b/source/CompDataFlatbuffer/Format.cs
@@ -0,0 +1,79 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+#nullable enable
+
+namespace CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer
+{
+ ///
+ /// Constants and helpers that describe the lottie_comp.fbs wire format but
+ /// which are not expressible in the schema itself, and so are not produced
+ /// by the FlatBuffers compiler.
+ ///
+#if PUBLIC_CompDataFlatbuffer
+ public
+#endif
+ static class Format
+ {
+ ///
+ /// The version of the schema that this code reads and writes. This is stored in
+ /// the schema_version field of every buffer. It is incremented for every change
+ /// to lottie_comp.fbs. Only additive changes are permitted, so a reader can load
+ /// any buffer whose schema_version is less than or equal to its own.
+ ///
+ public const ushort Version = 1;
+
+ ///
+ /// The 4 character identifier stored at offset 4 of every buffer. This is the
+ /// file_identifier declared in lottie_comp.fbs.
+ ///
+ public const string FileIdentifier = "LCMP";
+
+ ///
+ /// The file extension used for serialized compositions. This is the
+ /// file_extension declared in lottie_comp.fbs.
+ ///
+ public const string FileExtension = ".lcomp";
+
+ ///
+ /// The value of an index or object reference field that refers to nothing.
+ ///
+ public const uint NullIndex = 0xFFFFFFFF;
+
+ ///
+ /// The number of low bits of an object reference that store the index. The
+ /// remaining high bits store the , i.e. which
+ /// of the root table's node vectors the index refers to.
+ ///
+ const int ObjectReferenceIndexBits = 28;
+
+ const uint ObjectReferenceIndexMask = (1u << ObjectReferenceIndexBits) - 1;
+
+ ///
+ /// Combines a category and an index into the single uint used by object
+ /// reference fields.
+ ///
+ /// The vector that indexes.
+ /// The index of the node within that vector.
+ /// The packed object reference.
+ public static uint PackObjectReference(Schema.ObjectCategory category, int index)
+ => ((uint)category << ObjectReferenceIndexBits) | ((uint)index & ObjectReferenceIndexMask);
+
+ ///
+ /// Returns the category part of an object reference.
+ ///
+ /// A packed object reference.
+ /// The category of the referenced node.
+ public static Schema.ObjectCategory UnpackCategory(uint reference)
+ => (Schema.ObjectCategory)(reference >> ObjectReferenceIndexBits);
+
+ ///
+ /// Returns the index part of an object reference.
+ ///
+ /// A packed object reference.
+ /// The index of the referenced node within its category's vector.
+ public static int UnpackIndex(uint reference)
+ => (int)(reference & ObjectReferenceIndexMask);
+ }
+}
diff --git a/source/CompDataFlatbuffer/Generated/lottie_comp_generated.cs b/source/CompDataFlatbuffer/Generated/lottie_comp_generated.cs
new file mode 100644
index 00000000..1c33450d
--- /dev/null
+++ b/source/CompDataFlatbuffer/Generated/lottie_comp_generated.cs
@@ -0,0 +1,2051 @@
+//
+// automatically generated by the FlatBuffers compiler, do not modify
+//
+
+namespace CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema
+{
+
+using global::System;
+using global::System.Collections.Generic;
+using global::Google.FlatBuffers;
+
+public enum ObjectCategory : byte
+{
+ Visual = 0,
+ Shape = 1,
+ Geometry = 2,
+ Brush = 3,
+ Animation = 4,
+ Easing = 5,
+ PropertySet = 6,
+ Surface = 7,
+ Clip = 8,
+ Controller = 9,
+ Shadow = 10,
+ Effect = 11,
+ GradientStop = 12,
+ ViewBox = 13,
+};
+
+public enum VisualKind : byte
+{
+ Container = 0,
+ Sprite = 1,
+ Shape = 2,
+ Layer = 3,
+};
+
+public enum ShapeKind : byte
+{
+ Container = 0,
+ Sprite = 1,
+};
+
+public enum GeometryKind : byte
+{
+ Path = 0,
+ Rectangle = 1,
+ RoundedRectangle = 2,
+ Ellipse = 3,
+};
+
+public enum BrushKind : byte
+{
+ Color = 0,
+ LinearGradient = 1,
+ RadialGradient = 2,
+ Surface = 3,
+ Mask = 4,
+ Effect = 5,
+};
+
+public enum ClipKind : byte
+{
+ Inset = 0,
+ Geometric = 1,
+};
+
+public enum ShadowKind : byte
+{
+ Drop = 0,
+};
+
+public enum SurfaceKind : byte
+{
+ VisualSurface = 0,
+ LoadedImageFromUri = 1,
+ LoadedImageFromStream = 2,
+};
+
+public enum EffectKind : byte
+{
+ Composite = 0,
+ GaussianBlur = 1,
+};
+
+public enum EasingKind : byte
+{
+ Linear = 0,
+ CubicBezier = 1,
+ Step = 2,
+};
+
+public enum AnimationKind : byte
+{
+ Scalar = 0,
+ Vector2 = 1,
+ Vector3 = 2,
+ Vector4 = 3,
+ Color = 4,
+ Boolean = 5,
+ Path = 6,
+ Expression = 7,
+};
+
+public enum KeyFrameKind : byte
+{
+ Value = 0,
+ Expression = 1,
+};
+
+public enum CanvasGeometryKind : byte
+{
+ Combination = 0,
+ Ellipse = 1,
+ Group = 2,
+ Path = 3,
+ RoundedRectangle = 4,
+ TransformedGeometry = 5,
+};
+
+public enum PathOp : byte
+{
+ BeginFigure = 0,
+ EndFigure = 1,
+ AddLine = 2,
+ AddCubicBezier = 3,
+};
+
+public enum PropertyValueType : byte
+{
+ None = 0,
+ Color = 1,
+ Scalar = 2,
+ Vector2 = 3,
+ Vector3 = 4,
+ Vector4 = 5,
+};
+
+public struct Vec2 : IFlatbufferObject
+{
+ private Struct __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Struct(_i, _bb); }
+ public Vec2 __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public float X { get { return __p.bb.GetFloat(__p.bb_pos + 0); } }
+ public float Y { get { return __p.bb.GetFloat(__p.bb_pos + 4); } }
+
+ public static Offset CreateVec2(FlatBufferBuilder builder, float X, float Y) {
+ builder.Prep(4, 8);
+ builder.PutFloat(Y);
+ builder.PutFloat(X);
+ return new Offset(builder.Offset);
+ }
+}
+
+public struct Vec3 : IFlatbufferObject
+{
+ private Struct __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Struct(_i, _bb); }
+ public Vec3 __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public float X { get { return __p.bb.GetFloat(__p.bb_pos + 0); } }
+ public float Y { get { return __p.bb.GetFloat(__p.bb_pos + 4); } }
+ public float Z { get { return __p.bb.GetFloat(__p.bb_pos + 8); } }
+
+ public static Offset CreateVec3(FlatBufferBuilder builder, float X, float Y, float Z) {
+ builder.Prep(4, 12);
+ builder.PutFloat(Z);
+ builder.PutFloat(Y);
+ builder.PutFloat(X);
+ return new Offset(builder.Offset);
+ }
+}
+
+public struct Vec4 : IFlatbufferObject
+{
+ private Struct __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Struct(_i, _bb); }
+ public Vec4 __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public float X { get { return __p.bb.GetFloat(__p.bb_pos + 0); } }
+ public float Y { get { return __p.bb.GetFloat(__p.bb_pos + 4); } }
+ public float Z { get { return __p.bb.GetFloat(__p.bb_pos + 8); } }
+ public float W { get { return __p.bb.GetFloat(__p.bb_pos + 12); } }
+
+ public static Offset CreateVec4(FlatBufferBuilder builder, float X, float Y, float Z, float W) {
+ builder.Prep(4, 16);
+ builder.PutFloat(W);
+ builder.PutFloat(Z);
+ builder.PutFloat(Y);
+ builder.PutFloat(X);
+ return new Offset(builder.Offset);
+ }
+}
+
+public struct Mat3x2 : IFlatbufferObject
+{
+ private Struct __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Struct(_i, _bb); }
+ public Mat3x2 __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public float M11 { get { return __p.bb.GetFloat(__p.bb_pos + 0); } }
+ public float M12 { get { return __p.bb.GetFloat(__p.bb_pos + 4); } }
+ public float M21 { get { return __p.bb.GetFloat(__p.bb_pos + 8); } }
+ public float M22 { get { return __p.bb.GetFloat(__p.bb_pos + 12); } }
+ public float M31 { get { return __p.bb.GetFloat(__p.bb_pos + 16); } }
+ public float M32 { get { return __p.bb.GetFloat(__p.bb_pos + 20); } }
+
+ public static Offset CreateMat3x2(FlatBufferBuilder builder, float M11, float M12, float M21, float M22, float M31, float M32) {
+ builder.Prep(4, 24);
+ builder.PutFloat(M32);
+ builder.PutFloat(M31);
+ builder.PutFloat(M22);
+ builder.PutFloat(M21);
+ builder.PutFloat(M12);
+ builder.PutFloat(M11);
+ return new Offset(builder.Offset);
+ }
+}
+
+public struct Mat4x4 : IFlatbufferObject
+{
+ private Struct __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Struct(_i, _bb); }
+ public Mat4x4 __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public float M11 { get { return __p.bb.GetFloat(__p.bb_pos + 0); } }
+ public float M12 { get { return __p.bb.GetFloat(__p.bb_pos + 4); } }
+ public float M13 { get { return __p.bb.GetFloat(__p.bb_pos + 8); } }
+ public float M14 { get { return __p.bb.GetFloat(__p.bb_pos + 12); } }
+ public float M21 { get { return __p.bb.GetFloat(__p.bb_pos + 16); } }
+ public float M22 { get { return __p.bb.GetFloat(__p.bb_pos + 20); } }
+ public float M23 { get { return __p.bb.GetFloat(__p.bb_pos + 24); } }
+ public float M24 { get { return __p.bb.GetFloat(__p.bb_pos + 28); } }
+ public float M31 { get { return __p.bb.GetFloat(__p.bb_pos + 32); } }
+ public float M32 { get { return __p.bb.GetFloat(__p.bb_pos + 36); } }
+ public float M33 { get { return __p.bb.GetFloat(__p.bb_pos + 40); } }
+ public float M34 { get { return __p.bb.GetFloat(__p.bb_pos + 44); } }
+ public float M41 { get { return __p.bb.GetFloat(__p.bb_pos + 48); } }
+ public float M42 { get { return __p.bb.GetFloat(__p.bb_pos + 52); } }
+ public float M43 { get { return __p.bb.GetFloat(__p.bb_pos + 56); } }
+ public float M44 { get { return __p.bb.GetFloat(__p.bb_pos + 60); } }
+
+ public static Offset CreateMat4x4(FlatBufferBuilder builder, float M11, float M12, float M13, float M14, float M21, float M22, float M23, float M24, float M31, float M32, float M33, float M34, float M41, float M42, float M43, float M44) {
+ builder.Prep(4, 64);
+ builder.PutFloat(M44);
+ builder.PutFloat(M43);
+ builder.PutFloat(M42);
+ builder.PutFloat(M41);
+ builder.PutFloat(M34);
+ builder.PutFloat(M33);
+ builder.PutFloat(M32);
+ builder.PutFloat(M31);
+ builder.PutFloat(M24);
+ builder.PutFloat(M23);
+ builder.PutFloat(M22);
+ builder.PutFloat(M21);
+ builder.PutFloat(M14);
+ builder.PutFloat(M13);
+ builder.PutFloat(M12);
+ builder.PutFloat(M11);
+ return new Offset(builder.Offset);
+ }
+}
+
+public struct Color : IFlatbufferObject
+{
+ private Struct __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Struct(_i, _bb); }
+ public Color __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public byte A { get { return __p.bb.Get(__p.bb_pos + 0); } }
+ public byte R { get { return __p.bb.Get(__p.bb_pos + 1); } }
+ public byte G { get { return __p.bb.Get(__p.bb_pos + 2); } }
+ public byte B { get { return __p.bb.Get(__p.bb_pos + 3); } }
+
+ public static Offset CreateColor(FlatBufferBuilder builder, byte A, byte R, byte G, byte B) {
+ builder.Prep(1, 4);
+ builder.PutByte(B);
+ builder.PutByte(G);
+ builder.PutByte(R);
+ builder.PutByte(A);
+ return new Offset(builder.Offset);
+ }
+}
+
+public struct Animator : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static Animator GetRootAsAnimator(ByteBuffer _bb) { return GetRootAsAnimator(_bb, new Animator()); }
+ public static Animator GetRootAsAnimator(ByteBuffer _bb, Animator obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public Animator __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public uint Property { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } }
+ public uint Animation { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } }
+ public uint Controller { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+
+ public static Offset CreateAnimator(FlatBufferBuilder builder,
+ uint property = 0,
+ uint animation = 0,
+ uint controller = 4294967295) {
+ builder.StartTable(3);
+ Animator.AddController(builder, controller);
+ Animator.AddAnimation(builder, animation);
+ Animator.AddProperty(builder, property);
+ return Animator.EndAnimator(builder);
+ }
+
+ public static void StartAnimator(FlatBufferBuilder builder) { builder.StartTable(3); }
+ public static void AddProperty(FlatBufferBuilder builder, uint property) { builder.AddUint(0, property, 0); }
+ public static void AddAnimation(FlatBufferBuilder builder, uint animation) { builder.AddUint(1, animation, 0); }
+ public static void AddController(FlatBufferBuilder builder, uint controller) { builder.AddUint(2, controller, 4294967295); }
+ public static Offset EndAnimator(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class AnimatorVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyField(tablePos, 4 /*Property*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 6 /*Animation*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 8 /*Controller*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct CompObj : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static CompObj GetRootAsCompObj(ByteBuffer _bb) { return GetRootAsCompObj(_bb, new CompObj()); }
+ public static CompObj GetRootAsCompObj(ByteBuffer _bb, CompObj obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public CompObj __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public uint Comment { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Animator? Animators(int j) { int o = __p.__offset(6); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Animator?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Animator()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
+ public int AnimatorsLength { get { int o = __p.__offset(6); return o != 0 ? __p.__vector_len(o) : 0; } }
+ public uint Properties { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+
+ public static Offset CreateCompObj(FlatBufferBuilder builder,
+ uint comment = 4294967295,
+ VectorOffset animatorsOffset = default(VectorOffset),
+ uint properties = 4294967295) {
+ builder.StartTable(3);
+ CompObj.AddProperties(builder, properties);
+ CompObj.AddAnimators(builder, animatorsOffset);
+ CompObj.AddComment(builder, comment);
+ return CompObj.EndCompObj(builder);
+ }
+
+ public static void StartCompObj(FlatBufferBuilder builder) { builder.StartTable(3); }
+ public static void AddComment(FlatBufferBuilder builder, uint comment) { builder.AddUint(0, comment, 4294967295); }
+ public static void AddAnimators(FlatBufferBuilder builder, VectorOffset animatorsOffset) { builder.AddOffset(1, animatorsOffset.Value, 0); }
+ public static VectorOffset CreateAnimatorsVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
+ public static VectorOffset CreateAnimatorsVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateAnimatorsVectorBlock(FlatBufferBuilder builder, ArraySegment> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateAnimatorsVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add>(dataPtr, sizeInBytes); return builder.EndVector(); }
+ public static void StartAnimatorsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
+ public static void AddProperties(FlatBufferBuilder builder, uint properties) { builder.AddUint(2, properties, 4294967295); }
+ public static Offset EndCompObj(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class CompObjVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyField(tablePos, 4 /*Comment*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyVectorOfTables(tablePos, 6 /*Animators*/, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.AnimatorVerify.Verify, false)
+ && verifier.VerifyField(tablePos, 8 /*Properties*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct PropertyValue : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static PropertyValue GetRootAsPropertyValue(ByteBuffer _bb) { return GetRootAsPropertyValue(_bb, new PropertyValue()); }
+ public static PropertyValue GetRootAsPropertyValue(ByteBuffer _bb, PropertyValue obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public PropertyValue __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public uint Name { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyValueType Type { get { int o = __p.__offset(6); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyValueType)__p.bb.Get(o + __p.bb_pos) : CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyValueType.None; } }
+ public float Scalar { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec4? Vector { get { int o = __p.__offset(10); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec4?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec4()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color? Color { get { int o = __p.__offset(12); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+
+ public static void StartPropertyValue(FlatBufferBuilder builder) { builder.StartTable(5); }
+ public static void AddName(FlatBufferBuilder builder, uint name) { builder.AddUint(0, name, 0); }
+ public static void AddType(FlatBufferBuilder builder, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyValueType type) { builder.AddByte(1, (byte)type, 0); }
+ public static void AddScalar(FlatBufferBuilder builder, float scalar) { builder.AddFloat(2, scalar, 0.0f); }
+ public static void AddVector(FlatBufferBuilder builder, Offset vectorOffset) { builder.AddStruct(3, vectorOffset.Value, 0); }
+ public static void AddColor(FlatBufferBuilder builder, Offset colorOffset) { builder.AddStruct(4, colorOffset.Value, 0); }
+ public static Offset EndPropertyValue(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class PropertyValueVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyField(tablePos, 4 /*Name*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 6 /*Type*/, 1 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyValueType*/, 1, false)
+ && verifier.VerifyField(tablePos, 8 /*Scalar*/, 4 /*float*/, 4, false)
+ && verifier.VerifyField(tablePos, 10 /*Vector*/, 16 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec4*/, 4, false)
+ && verifier.VerifyField(tablePos, 12 /*Color*/, 4 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color*/, 1, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct ReferenceParameter : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static ReferenceParameter GetRootAsReferenceParameter(ByteBuffer _bb) { return GetRootAsReferenceParameter(_bb, new ReferenceParameter()); }
+ public static ReferenceParameter GetRootAsReferenceParameter(ByteBuffer _bb, ReferenceParameter obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public ReferenceParameter __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public uint Name { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } }
+ public uint Target { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } }
+
+ public static Offset CreateReferenceParameter(FlatBufferBuilder builder,
+ uint name = 0,
+ uint target = 0) {
+ builder.StartTable(2);
+ ReferenceParameter.AddTarget(builder, target);
+ ReferenceParameter.AddName(builder, name);
+ return ReferenceParameter.EndReferenceParameter(builder);
+ }
+
+ public static void StartReferenceParameter(FlatBufferBuilder builder) { builder.StartTable(2); }
+ public static void AddName(FlatBufferBuilder builder, uint name) { builder.AddUint(0, name, 0); }
+ public static void AddTarget(FlatBufferBuilder builder, uint target) { builder.AddUint(1, target, 0); }
+ public static Offset EndReferenceParameter(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class ReferenceParameterVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyField(tablePos, 4 /*Name*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 6 /*Target*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct SourceParameter : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static SourceParameter GetRootAsSourceParameter(ByteBuffer _bb) { return GetRootAsSourceParameter(_bb, new SourceParameter()); }
+ public static SourceParameter GetRootAsSourceParameter(ByteBuffer _bb, SourceParameter obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public SourceParameter __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public uint Name { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } }
+ public uint Brush { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } }
+
+ public static Offset CreateSourceParameter(FlatBufferBuilder builder,
+ uint name = 0,
+ uint brush = 0) {
+ builder.StartTable(2);
+ SourceParameter.AddBrush(builder, brush);
+ SourceParameter.AddName(builder, name);
+ return SourceParameter.EndSourceParameter(builder);
+ }
+
+ public static void StartSourceParameter(FlatBufferBuilder builder) { builder.StartTable(2); }
+ public static void AddName(FlatBufferBuilder builder, uint name) { builder.AddUint(0, name, 0); }
+ public static void AddBrush(FlatBufferBuilder builder, uint brush) { builder.AddUint(1, brush, 0); }
+ public static Offset EndSourceParameter(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class SourceParameterVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyField(tablePos, 4 /*Name*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 6 /*Brush*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct KeyFrame : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static KeyFrame GetRootAsKeyFrame(ByteBuffer _bb) { return GetRootAsKeyFrame(_bb, new KeyFrame()); }
+ public static KeyFrame GetRootAsKeyFrame(ByteBuffer _bb, KeyFrame obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public KeyFrame __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public float Progress { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } }
+ public uint Easing { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.KeyFrameKind Kind { get { int o = __p.__offset(8); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.KeyFrameKind)__p.bb.Get(o + __p.bb_pos) : CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.KeyFrameKind.Value; } }
+ public uint Expression { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public float Scalar { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec4? Vector { get { int o = __p.__offset(14); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec4?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec4()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color? Color { get { int o = __p.__offset(16); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public uint Path { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+
+ public static void StartKeyFrame(FlatBufferBuilder builder) { builder.StartTable(8); }
+ public static void AddProgress(FlatBufferBuilder builder, float progress) { builder.AddFloat(0, progress, 0.0f); }
+ public static void AddEasing(FlatBufferBuilder builder, uint easing) { builder.AddUint(1, easing, 4294967295); }
+ public static void AddKind(FlatBufferBuilder builder, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.KeyFrameKind kind) { builder.AddByte(2, (byte)kind, 0); }
+ public static void AddExpression(FlatBufferBuilder builder, uint expression) { builder.AddUint(3, expression, 4294967295); }
+ public static void AddScalar(FlatBufferBuilder builder, float scalar) { builder.AddFloat(4, scalar, 0.0f); }
+ public static void AddVector(FlatBufferBuilder builder, Offset vectorOffset) { builder.AddStruct(5, vectorOffset.Value, 0); }
+ public static void AddColor(FlatBufferBuilder builder, Offset colorOffset) { builder.AddStruct(6, colorOffset.Value, 0); }
+ public static void AddPath(FlatBufferBuilder builder, uint path) { builder.AddUint(7, path, 4294967295); }
+ public static Offset EndKeyFrame(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class KeyFrameVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyField(tablePos, 4 /*Progress*/, 4 /*float*/, 4, false)
+ && verifier.VerifyField(tablePos, 6 /*Easing*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 8 /*Kind*/, 1 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.KeyFrameKind*/, 1, false)
+ && verifier.VerifyField(tablePos, 10 /*Expression*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 12 /*Scalar*/, 4 /*float*/, 4, false)
+ && verifier.VerifyField(tablePos, 14 /*Vector*/, 16 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec4*/, 4, false)
+ && verifier.VerifyField(tablePos, 16 /*Color*/, 4 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color*/, 1, false)
+ && verifier.VerifyField(tablePos, 18 /*Path*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct Visual : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static Visual GetRootAsVisual(ByteBuffer _bb) { return GetRootAsVisual(_bb, new Visual()); }
+ public static Visual GetRootAsVisual(ByteBuffer _bb, Visual obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public Visual __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj? Base { get { int o = __p.__offset(4); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.VisualKind Kind { get { int o = __p.__offset(6); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.VisualKind)__p.bb.Get(o + __p.bb_pos) : CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.VisualKind.Container; } }
+ public byte? BorderMode { get { int o = __p.__offset(8); return o != 0 ? __p.bb.Get(o + __p.bb_pos) : (byte?)null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec3? CenterPoint { get { int o = __p.__offset(10); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec3?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec3()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public uint Clip { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public bool? IsVisible { get { int o = __p.__offset(14); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool?)null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec3? Offset { get { int o = __p.__offset(16); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec3?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec3()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public float? Opacity { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float?)null; } }
+ public float? RotationAngleInDegrees { get { int o = __p.__offset(20); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float?)null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec3? RotationAxis { get { int o = __p.__offset(22); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec3?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec3()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec3? Scale { get { int o = __p.__offset(24); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec3?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec3()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? Size { get { int o = __p.__offset(26); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Mat4x4? TransformMatrix { get { int o = __p.__offset(28); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Mat4x4?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Mat4x4()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public uint Children(int j) { int o = __p.__offset(30); return o != 0 ? __p.bb.GetUint(__p.__vector(o) + j * 4) : (uint)0; }
+ public int ChildrenLength { get { int o = __p.__offset(30); return o != 0 ? __p.__vector_len(o) : 0; } }
+#if ENABLE_SPAN_T
+ public Span GetChildrenBytes() { return __p.__vector_as_span(30, 4); }
+#else
+ public ArraySegment? GetChildrenBytes() { return __p.__vector_as_arraysegment(30); }
+#endif
+ public uint[] GetChildrenArray() { return __p.__vector_as_array(30); }
+ public uint Shapes(int j) { int o = __p.__offset(32); return o != 0 ? __p.bb.GetUint(__p.__vector(o) + j * 4) : (uint)0; }
+ public int ShapesLength { get { int o = __p.__offset(32); return o != 0 ? __p.__vector_len(o) : 0; } }
+#if ENABLE_SPAN_T
+ public Span GetShapesBytes() { return __p.__vector_as_span(32, 4); }
+#else
+ public ArraySegment? GetShapesBytes() { return __p.__vector_as_arraysegment(32); }
+#endif
+ public uint[] GetShapesArray() { return __p.__vector_as_array(32); }
+ public uint ViewBox { get { int o = __p.__offset(34); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public uint Brush { get { int o = __p.__offset(36); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public uint Shadow { get { int o = __p.__offset(38); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+
+ public static void StartVisual(FlatBufferBuilder builder) { builder.StartTable(18); }
+ public static void AddBase(FlatBufferBuilder builder, Offset baseOffset) { builder.AddOffset(0, baseOffset.Value, 0); }
+ public static void AddKind(FlatBufferBuilder builder, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.VisualKind kind) { builder.AddByte(1, (byte)kind, 0); }
+ public static void AddBorderMode(FlatBufferBuilder builder, byte? borderMode) { builder.AddByte(2, borderMode); }
+ public static void AddCenterPoint(FlatBufferBuilder builder, Offset centerPointOffset) { builder.AddStruct(3, centerPointOffset.Value, 0); }
+ public static void AddClip(FlatBufferBuilder builder, uint clip) { builder.AddUint(4, clip, 4294967295); }
+ public static void AddIsVisible(FlatBufferBuilder builder, bool? isVisible) { builder.AddBool(5, isVisible); }
+ public static void AddOffset(FlatBufferBuilder builder, Offset offsetOffset) { builder.AddStruct(6, offsetOffset.Value, 0); }
+ public static void AddOpacity(FlatBufferBuilder builder, float? opacity) { builder.AddFloat(7, opacity); }
+ public static void AddRotationAngleInDegrees(FlatBufferBuilder builder, float? rotationAngleInDegrees) { builder.AddFloat(8, rotationAngleInDegrees); }
+ public static void AddRotationAxis(FlatBufferBuilder builder, Offset rotationAxisOffset) { builder.AddStruct(9, rotationAxisOffset.Value, 0); }
+ public static void AddScale(FlatBufferBuilder builder, Offset scaleOffset) { builder.AddStruct(10, scaleOffset.Value, 0); }
+ public static void AddSize(FlatBufferBuilder builder, Offset sizeOffset) { builder.AddStruct(11, sizeOffset.Value, 0); }
+ public static void AddTransformMatrix(FlatBufferBuilder builder, Offset transformMatrixOffset) { builder.AddStruct(12, transformMatrixOffset.Value, 0); }
+ public static void AddChildren(FlatBufferBuilder builder, VectorOffset childrenOffset) { builder.AddOffset(13, childrenOffset.Value, 0); }
+ public static VectorOffset CreateChildrenVector(FlatBufferBuilder builder, uint[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddUint(data[i]); return builder.EndVector(); }
+ public static VectorOffset CreateChildrenVectorBlock(FlatBufferBuilder builder, uint[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateChildrenVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateChildrenVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); }
+ public static void StartChildrenVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
+ public static void AddShapes(FlatBufferBuilder builder, VectorOffset shapesOffset) { builder.AddOffset(14, shapesOffset.Value, 0); }
+ public static VectorOffset CreateShapesVector(FlatBufferBuilder builder, uint[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddUint(data[i]); return builder.EndVector(); }
+ public static VectorOffset CreateShapesVectorBlock(FlatBufferBuilder builder, uint[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateShapesVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateShapesVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); }
+ public static void StartShapesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
+ public static void AddViewBox(FlatBufferBuilder builder, uint viewBox) { builder.AddUint(15, viewBox, 4294967295); }
+ public static void AddBrush(FlatBufferBuilder builder, uint brush) { builder.AddUint(16, brush, 4294967295); }
+ public static void AddShadow(FlatBufferBuilder builder, uint shadow) { builder.AddUint(17, shadow, 4294967295); }
+ public static Offset EndVisual(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class VisualVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyTable(tablePos, 4 /*Base*/, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObjVerify.Verify, false)
+ && verifier.VerifyField(tablePos, 6 /*Kind*/, 1 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.VisualKind*/, 1, false)
+ && verifier.VerifyField(tablePos, 8 /*BorderMode*/, 1 /*byte*/, 1, false)
+ && verifier.VerifyField(tablePos, 10 /*CenterPoint*/, 12 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec3*/, 4, false)
+ && verifier.VerifyField(tablePos, 12 /*Clip*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 14 /*IsVisible*/, 1 /*bool*/, 1, false)
+ && verifier.VerifyField(tablePos, 16 /*Offset*/, 12 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec3*/, 4, false)
+ && verifier.VerifyField(tablePos, 18 /*Opacity*/, 4 /*float*/, 4, false)
+ && verifier.VerifyField(tablePos, 20 /*RotationAngleInDegrees*/, 4 /*float*/, 4, false)
+ && verifier.VerifyField(tablePos, 22 /*RotationAxis*/, 12 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec3*/, 4, false)
+ && verifier.VerifyField(tablePos, 24 /*Scale*/, 12 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec3*/, 4, false)
+ && verifier.VerifyField(tablePos, 26 /*Size*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyField(tablePos, 28 /*TransformMatrix*/, 64 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Mat4x4*/, 4, false)
+ && verifier.VerifyVectorOfData(tablePos, 30 /*Children*/, 4 /*uint*/, false)
+ && verifier.VerifyVectorOfData(tablePos, 32 /*Shapes*/, 4 /*uint*/, false)
+ && verifier.VerifyField(tablePos, 34 /*ViewBox*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 36 /*Brush*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 38 /*Shadow*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct Shape : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static Shape GetRootAsShape(ByteBuffer _bb) { return GetRootAsShape(_bb, new Shape()); }
+ public static Shape GetRootAsShape(ByteBuffer _bb, Shape obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public Shape __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj? Base { get { int o = __p.__offset(4); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.ShapeKind Kind { get { int o = __p.__offset(6); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.ShapeKind)__p.bb.Get(o + __p.bb_pos) : CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.ShapeKind.Container; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? CenterPoint { get { int o = __p.__offset(8); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? Offset { get { int o = __p.__offset(10); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public float? RotationAngleInDegrees { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float?)null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? Scale { get { int o = __p.__offset(14); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Mat3x2? TransformMatrix { get { int o = __p.__offset(16); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Mat3x2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Mat3x2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public uint Shapes(int j) { int o = __p.__offset(18); return o != 0 ? __p.bb.GetUint(__p.__vector(o) + j * 4) : (uint)0; }
+ public int ShapesLength { get { int o = __p.__offset(18); return o != 0 ? __p.__vector_len(o) : 0; } }
+#if ENABLE_SPAN_T
+ public Span GetShapesBytes() { return __p.__vector_as_span(18, 4); }
+#else
+ public ArraySegment? GetShapesBytes() { return __p.__vector_as_arraysegment(18); }
+#endif
+ public uint[] GetShapesArray() { return __p.__vector_as_array(18); }
+ public uint FillBrush { get { int o = __p.__offset(20); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public uint StrokeBrush { get { int o = __p.__offset(22); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public uint Geometry { get { int o = __p.__offset(24); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public bool? IsStrokeNonScaling { get { int o = __p.__offset(26); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool?)null; } }
+ public float? StrokeDashOffset { get { int o = __p.__offset(28); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float?)null; } }
+ public float StrokeDashArray(int j) { int o = __p.__offset(30); return o != 0 ? __p.bb.GetFloat(__p.__vector(o) + j * 4) : (float)0; }
+ public int StrokeDashArrayLength { get { int o = __p.__offset(30); return o != 0 ? __p.__vector_len(o) : 0; } }
+#if ENABLE_SPAN_T
+ public Span GetStrokeDashArrayBytes() { return __p.__vector_as_span(30, 4); }
+#else
+ public ArraySegment? GetStrokeDashArrayBytes() { return __p.__vector_as_arraysegment(30); }
+#endif
+ public float[] GetStrokeDashArrayArray() { return __p.__vector_as_array(30); }
+ public byte? StrokeDashCap { get { int o = __p.__offset(32); return o != 0 ? __p.bb.Get(o + __p.bb_pos) : (byte?)null; } }
+ public byte? StrokeStartCap { get { int o = __p.__offset(34); return o != 0 ? __p.bb.Get(o + __p.bb_pos) : (byte?)null; } }
+ public byte? StrokeEndCap { get { int o = __p.__offset(36); return o != 0 ? __p.bb.Get(o + __p.bb_pos) : (byte?)null; } }
+ public byte? StrokeLineJoin { get { int o = __p.__offset(38); return o != 0 ? __p.bb.Get(o + __p.bb_pos) : (byte?)null; } }
+ public float? StrokeMiterLimit { get { int o = __p.__offset(40); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float?)null; } }
+ public float? StrokeThickness { get { int o = __p.__offset(42); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float?)null; } }
+
+ public static void StartShape(FlatBufferBuilder builder) { builder.StartTable(20); }
+ public static void AddBase(FlatBufferBuilder builder, Offset baseOffset) { builder.AddOffset(0, baseOffset.Value, 0); }
+ public static void AddKind(FlatBufferBuilder builder, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.ShapeKind kind) { builder.AddByte(1, (byte)kind, 0); }
+ public static void AddCenterPoint(FlatBufferBuilder builder, Offset centerPointOffset) { builder.AddStruct(2, centerPointOffset.Value, 0); }
+ public static void AddOffset(FlatBufferBuilder builder, Offset offsetOffset) { builder.AddStruct(3, offsetOffset.Value, 0); }
+ public static void AddRotationAngleInDegrees(FlatBufferBuilder builder, float? rotationAngleInDegrees) { builder.AddFloat(4, rotationAngleInDegrees); }
+ public static void AddScale(FlatBufferBuilder builder, Offset scaleOffset) { builder.AddStruct(5, scaleOffset.Value, 0); }
+ public static void AddTransformMatrix(FlatBufferBuilder builder, Offset transformMatrixOffset) { builder.AddStruct(6, transformMatrixOffset.Value, 0); }
+ public static void AddShapes(FlatBufferBuilder builder, VectorOffset shapesOffset) { builder.AddOffset(7, shapesOffset.Value, 0); }
+ public static VectorOffset CreateShapesVector(FlatBufferBuilder builder, uint[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddUint(data[i]); return builder.EndVector(); }
+ public static VectorOffset CreateShapesVectorBlock(FlatBufferBuilder builder, uint[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateShapesVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateShapesVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); }
+ public static void StartShapesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
+ public static void AddFillBrush(FlatBufferBuilder builder, uint fillBrush) { builder.AddUint(8, fillBrush, 4294967295); }
+ public static void AddStrokeBrush(FlatBufferBuilder builder, uint strokeBrush) { builder.AddUint(9, strokeBrush, 4294967295); }
+ public static void AddGeometry(FlatBufferBuilder builder, uint geometry) { builder.AddUint(10, geometry, 4294967295); }
+ public static void AddIsStrokeNonScaling(FlatBufferBuilder builder, bool? isStrokeNonScaling) { builder.AddBool(11, isStrokeNonScaling); }
+ public static void AddStrokeDashOffset(FlatBufferBuilder builder, float? strokeDashOffset) { builder.AddFloat(12, strokeDashOffset); }
+ public static void AddStrokeDashArray(FlatBufferBuilder builder, VectorOffset strokeDashArrayOffset) { builder.AddOffset(13, strokeDashArrayOffset.Value, 0); }
+ public static VectorOffset CreateStrokeDashArrayVector(FlatBufferBuilder builder, float[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddFloat(data[i]); return builder.EndVector(); }
+ public static VectorOffset CreateStrokeDashArrayVectorBlock(FlatBufferBuilder builder, float[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateStrokeDashArrayVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateStrokeDashArrayVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); }
+ public static void StartStrokeDashArrayVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
+ public static void AddStrokeDashCap(FlatBufferBuilder builder, byte? strokeDashCap) { builder.AddByte(14, strokeDashCap); }
+ public static void AddStrokeStartCap(FlatBufferBuilder builder, byte? strokeStartCap) { builder.AddByte(15, strokeStartCap); }
+ public static void AddStrokeEndCap(FlatBufferBuilder builder, byte? strokeEndCap) { builder.AddByte(16, strokeEndCap); }
+ public static void AddStrokeLineJoin(FlatBufferBuilder builder, byte? strokeLineJoin) { builder.AddByte(17, strokeLineJoin); }
+ public static void AddStrokeMiterLimit(FlatBufferBuilder builder, float? strokeMiterLimit) { builder.AddFloat(18, strokeMiterLimit); }
+ public static void AddStrokeThickness(FlatBufferBuilder builder, float? strokeThickness) { builder.AddFloat(19, strokeThickness); }
+ public static Offset EndShape(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class ShapeVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyTable(tablePos, 4 /*Base*/, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObjVerify.Verify, false)
+ && verifier.VerifyField(tablePos, 6 /*Kind*/, 1 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.ShapeKind*/, 1, false)
+ && verifier.VerifyField(tablePos, 8 /*CenterPoint*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyField(tablePos, 10 /*Offset*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyField(tablePos, 12 /*RotationAngleInDegrees*/, 4 /*float*/, 4, false)
+ && verifier.VerifyField(tablePos, 14 /*Scale*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyField(tablePos, 16 /*TransformMatrix*/, 24 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Mat3x2*/, 4, false)
+ && verifier.VerifyVectorOfData(tablePos, 18 /*Shapes*/, 4 /*uint*/, false)
+ && verifier.VerifyField(tablePos, 20 /*FillBrush*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 22 /*StrokeBrush*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 24 /*Geometry*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 26 /*IsStrokeNonScaling*/, 1 /*bool*/, 1, false)
+ && verifier.VerifyField(tablePos, 28 /*StrokeDashOffset*/, 4 /*float*/, 4, false)
+ && verifier.VerifyVectorOfData(tablePos, 30 /*StrokeDashArray*/, 4 /*float*/, false)
+ && verifier.VerifyField(tablePos, 32 /*StrokeDashCap*/, 1 /*byte*/, 1, false)
+ && verifier.VerifyField(tablePos, 34 /*StrokeStartCap*/, 1 /*byte*/, 1, false)
+ && verifier.VerifyField(tablePos, 36 /*StrokeEndCap*/, 1 /*byte*/, 1, false)
+ && verifier.VerifyField(tablePos, 38 /*StrokeLineJoin*/, 1 /*byte*/, 1, false)
+ && verifier.VerifyField(tablePos, 40 /*StrokeMiterLimit*/, 4 /*float*/, 4, false)
+ && verifier.VerifyField(tablePos, 42 /*StrokeThickness*/, 4 /*float*/, 4, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct Geometry : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static Geometry GetRootAsGeometry(ByteBuffer _bb) { return GetRootAsGeometry(_bb, new Geometry()); }
+ public static Geometry GetRootAsGeometry(ByteBuffer _bb, Geometry obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public Geometry __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj? Base { get { int o = __p.__offset(4); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.GeometryKind Kind { get { int o = __p.__offset(6); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.GeometryKind)__p.bb.Get(o + __p.bb_pos) : CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.GeometryKind.Path; } }
+ public float? TrimStart { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float?)null; } }
+ public float? TrimEnd { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float?)null; } }
+ public float? TrimOffset { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float?)null; } }
+ public uint Path { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? Offset { get { int o = __p.__offset(16); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? Size { get { int o = __p.__offset(18); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? CornerRadius { get { int o = __p.__offset(20); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? Center { get { int o = __p.__offset(22); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? Radius { get { int o = __p.__offset(24); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+
+ public static void StartGeometry(FlatBufferBuilder builder) { builder.StartTable(11); }
+ public static void AddBase(FlatBufferBuilder builder, Offset baseOffset) { builder.AddOffset(0, baseOffset.Value, 0); }
+ public static void AddKind(FlatBufferBuilder builder, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.GeometryKind kind) { builder.AddByte(1, (byte)kind, 0); }
+ public static void AddTrimStart(FlatBufferBuilder builder, float? trimStart) { builder.AddFloat(2, trimStart); }
+ public static void AddTrimEnd(FlatBufferBuilder builder, float? trimEnd) { builder.AddFloat(3, trimEnd); }
+ public static void AddTrimOffset(FlatBufferBuilder builder, float? trimOffset) { builder.AddFloat(4, trimOffset); }
+ public static void AddPath(FlatBufferBuilder builder, uint path) { builder.AddUint(5, path, 4294967295); }
+ public static void AddOffset(FlatBufferBuilder builder, Offset offsetOffset) { builder.AddStruct(6, offsetOffset.Value, 0); }
+ public static void AddSize(FlatBufferBuilder builder, Offset sizeOffset) { builder.AddStruct(7, sizeOffset.Value, 0); }
+ public static void AddCornerRadius(FlatBufferBuilder builder, Offset cornerRadiusOffset) { builder.AddStruct(8, cornerRadiusOffset.Value, 0); }
+ public static void AddCenter(FlatBufferBuilder builder, Offset centerOffset) { builder.AddStruct(9, centerOffset.Value, 0); }
+ public static void AddRadius(FlatBufferBuilder builder, Offset radiusOffset) { builder.AddStruct(10, radiusOffset.Value, 0); }
+ public static Offset EndGeometry(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class GeometryVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyTable(tablePos, 4 /*Base*/, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObjVerify.Verify, false)
+ && verifier.VerifyField(tablePos, 6 /*Kind*/, 1 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.GeometryKind*/, 1, false)
+ && verifier.VerifyField(tablePos, 8 /*TrimStart*/, 4 /*float*/, 4, false)
+ && verifier.VerifyField(tablePos, 10 /*TrimEnd*/, 4 /*float*/, 4, false)
+ && verifier.VerifyField(tablePos, 12 /*TrimOffset*/, 4 /*float*/, 4, false)
+ && verifier.VerifyField(tablePos, 14 /*Path*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 16 /*Offset*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyField(tablePos, 18 /*Size*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyField(tablePos, 20 /*CornerRadius*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyField(tablePos, 22 /*Center*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyField(tablePos, 24 /*Radius*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct Brush : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static Brush GetRootAsBrush(ByteBuffer _bb) { return GetRootAsBrush(_bb, new Brush()); }
+ public static Brush GetRootAsBrush(ByteBuffer _bb, Brush obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public Brush __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj? Base { get { int o = __p.__offset(4); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.BrushKind Kind { get { int o = __p.__offset(6); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.BrushKind)__p.bb.Get(o + __p.bb_pos) : CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.BrushKind.Color; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color? Color { get { int o = __p.__offset(8); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? AnchorPoint { get { int o = __p.__offset(10); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? CenterPoint { get { int o = __p.__offset(12); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public uint ColorStops(int j) { int o = __p.__offset(14); return o != 0 ? __p.bb.GetUint(__p.__vector(o) + j * 4) : (uint)0; }
+ public int ColorStopsLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } }
+#if ENABLE_SPAN_T
+ public Span GetColorStopsBytes() { return __p.__vector_as_span(14, 4); }
+#else
+ public ArraySegment? GetColorStopsBytes() { return __p.__vector_as_arraysegment(14); }
+#endif
+ public uint[] GetColorStopsArray() { return __p.__vector_as_array(14); }
+ public byte? ExtendMode { get { int o = __p.__offset(16); return o != 0 ? __p.bb.Get(o + __p.bb_pos) : (byte?)null; } }
+ public byte? InterpolationSpace { get { int o = __p.__offset(18); return o != 0 ? __p.bb.Get(o + __p.bb_pos) : (byte?)null; } }
+ public byte? MappingMode { get { int o = __p.__offset(20); return o != 0 ? __p.bb.Get(o + __p.bb_pos) : (byte?)null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? Offset { get { int o = __p.__offset(22); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public float? RotationAngleInDegrees { get { int o = __p.__offset(24); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float?)null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? Scale { get { int o = __p.__offset(26); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Mat3x2? TransformMatrix { get { int o = __p.__offset(28); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Mat3x2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Mat3x2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? StartPoint { get { int o = __p.__offset(30); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? EndPoint { get { int o = __p.__offset(32); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? EllipseCenter { get { int o = __p.__offset(34); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? EllipseRadius { get { int o = __p.__offset(36); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? GradientOriginOffset { get { int o = __p.__offset(38); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public uint Surface { get { int o = __p.__offset(40); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public uint Source { get { int o = __p.__offset(42); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public uint Mask { get { int o = __p.__offset(44); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public uint Effect { get { int o = __p.__offset(46); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.SourceParameter? SourceParameters(int j) { int o = __p.__offset(48); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.SourceParameter?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.SourceParameter()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
+ public int SourceParametersLength { get { int o = __p.__offset(48); return o != 0 ? __p.__vector_len(o) : 0; } }
+
+ public static void StartBrush(FlatBufferBuilder builder) { builder.StartTable(23); }
+ public static void AddBase(FlatBufferBuilder builder, Offset baseOffset) { builder.AddOffset(0, baseOffset.Value, 0); }
+ public static void AddKind(FlatBufferBuilder builder, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.BrushKind kind) { builder.AddByte(1, (byte)kind, 0); }
+ public static void AddColor(FlatBufferBuilder builder, Offset colorOffset) { builder.AddStruct(2, colorOffset.Value, 0); }
+ public static void AddAnchorPoint(FlatBufferBuilder builder, Offset anchorPointOffset) { builder.AddStruct(3, anchorPointOffset.Value, 0); }
+ public static void AddCenterPoint(FlatBufferBuilder builder, Offset centerPointOffset) { builder.AddStruct(4, centerPointOffset.Value, 0); }
+ public static void AddColorStops(FlatBufferBuilder builder, VectorOffset colorStopsOffset) { builder.AddOffset(5, colorStopsOffset.Value, 0); }
+ public static VectorOffset CreateColorStopsVector(FlatBufferBuilder builder, uint[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddUint(data[i]); return builder.EndVector(); }
+ public static VectorOffset CreateColorStopsVectorBlock(FlatBufferBuilder builder, uint[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateColorStopsVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateColorStopsVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); }
+ public static void StartColorStopsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
+ public static void AddExtendMode(FlatBufferBuilder builder, byte? extendMode) { builder.AddByte(6, extendMode); }
+ public static void AddInterpolationSpace(FlatBufferBuilder builder, byte? interpolationSpace) { builder.AddByte(7, interpolationSpace); }
+ public static void AddMappingMode(FlatBufferBuilder builder, byte? mappingMode) { builder.AddByte(8, mappingMode); }
+ public static void AddOffset(FlatBufferBuilder builder, Offset offsetOffset) { builder.AddStruct(9, offsetOffset.Value, 0); }
+ public static void AddRotationAngleInDegrees(FlatBufferBuilder builder, float? rotationAngleInDegrees) { builder.AddFloat(10, rotationAngleInDegrees); }
+ public static void AddScale(FlatBufferBuilder builder, Offset scaleOffset) { builder.AddStruct(11, scaleOffset.Value, 0); }
+ public static void AddTransformMatrix(FlatBufferBuilder builder, Offset transformMatrixOffset) { builder.AddStruct(12, transformMatrixOffset.Value, 0); }
+ public static void AddStartPoint(FlatBufferBuilder builder, Offset startPointOffset) { builder.AddStruct(13, startPointOffset.Value, 0); }
+ public static void AddEndPoint(FlatBufferBuilder builder, Offset endPointOffset) { builder.AddStruct(14, endPointOffset.Value, 0); }
+ public static void AddEllipseCenter(FlatBufferBuilder builder, Offset ellipseCenterOffset) { builder.AddStruct(15, ellipseCenterOffset.Value, 0); }
+ public static void AddEllipseRadius(FlatBufferBuilder builder, Offset ellipseRadiusOffset) { builder.AddStruct(16, ellipseRadiusOffset.Value, 0); }
+ public static void AddGradientOriginOffset(FlatBufferBuilder builder, Offset gradientOriginOffsetOffset) { builder.AddStruct(17, gradientOriginOffsetOffset.Value, 0); }
+ public static void AddSurface(FlatBufferBuilder builder, uint surface) { builder.AddUint(18, surface, 4294967295); }
+ public static void AddSource(FlatBufferBuilder builder, uint source) { builder.AddUint(19, source, 4294967295); }
+ public static void AddMask(FlatBufferBuilder builder, uint mask) { builder.AddUint(20, mask, 4294967295); }
+ public static void AddEffect(FlatBufferBuilder builder, uint effect) { builder.AddUint(21, effect, 4294967295); }
+ public static void AddSourceParameters(FlatBufferBuilder builder, VectorOffset sourceParametersOffset) { builder.AddOffset(22, sourceParametersOffset.Value, 0); }
+ public static VectorOffset CreateSourceParametersVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
+ public static VectorOffset CreateSourceParametersVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateSourceParametersVectorBlock(FlatBufferBuilder builder, ArraySegment> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateSourceParametersVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add>(dataPtr, sizeInBytes); return builder.EndVector(); }
+ public static void StartSourceParametersVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
+ public static Offset EndBrush(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class BrushVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyTable(tablePos, 4 /*Base*/, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObjVerify.Verify, false)
+ && verifier.VerifyField(tablePos, 6 /*Kind*/, 1 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.BrushKind*/, 1, false)
+ && verifier.VerifyField(tablePos, 8 /*Color*/, 4 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color*/, 1, false)
+ && verifier.VerifyField(tablePos, 10 /*AnchorPoint*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyField(tablePos, 12 /*CenterPoint*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyVectorOfData(tablePos, 14 /*ColorStops*/, 4 /*uint*/, false)
+ && verifier.VerifyField(tablePos, 16 /*ExtendMode*/, 1 /*byte*/, 1, false)
+ && verifier.VerifyField(tablePos, 18 /*InterpolationSpace*/, 1 /*byte*/, 1, false)
+ && verifier.VerifyField(tablePos, 20 /*MappingMode*/, 1 /*byte*/, 1, false)
+ && verifier.VerifyField(tablePos, 22 /*Offset*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyField(tablePos, 24 /*RotationAngleInDegrees*/, 4 /*float*/, 4, false)
+ && verifier.VerifyField(tablePos, 26 /*Scale*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyField(tablePos, 28 /*TransformMatrix*/, 24 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Mat3x2*/, 4, false)
+ && verifier.VerifyField(tablePos, 30 /*StartPoint*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyField(tablePos, 32 /*EndPoint*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyField(tablePos, 34 /*EllipseCenter*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyField(tablePos, 36 /*EllipseRadius*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyField(tablePos, 38 /*GradientOriginOffset*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyField(tablePos, 40 /*Surface*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 42 /*Source*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 44 /*Mask*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 46 /*Effect*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyVectorOfTables(tablePos, 48 /*SourceParameters*/, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.SourceParameterVerify.Verify, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct GradientStop : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static GradientStop GetRootAsGradientStop(ByteBuffer _bb) { return GetRootAsGradientStop(_bb, new GradientStop()); }
+ public static GradientStop GetRootAsGradientStop(ByteBuffer _bb, GradientStop obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public GradientStop __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj? Base { get { int o = __p.__offset(4); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color? Color { get { int o = __p.__offset(6); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public float Offset { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } }
+
+ public static void StartGradientStop(FlatBufferBuilder builder) { builder.StartTable(3); }
+ public static void AddBase(FlatBufferBuilder builder, Offset baseOffset) { builder.AddOffset(0, baseOffset.Value, 0); }
+ public static void AddColor(FlatBufferBuilder builder, Offset colorOffset) { builder.AddStruct(1, colorOffset.Value, 0); }
+ public static void AddOffset(FlatBufferBuilder builder, float offset) { builder.AddFloat(2, offset, 0.0f); }
+ public static Offset EndGradientStop(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class GradientStopVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyTable(tablePos, 4 /*Base*/, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObjVerify.Verify, false)
+ && verifier.VerifyField(tablePos, 6 /*Color*/, 4 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color*/, 1, false)
+ && verifier.VerifyField(tablePos, 8 /*Offset*/, 4 /*float*/, 4, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct ViewBox : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static ViewBox GetRootAsViewBox(ByteBuffer _bb) { return GetRootAsViewBox(_bb, new ViewBox()); }
+ public static ViewBox GetRootAsViewBox(ByteBuffer _bb, ViewBox obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public ViewBox __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj? Base { get { int o = __p.__offset(4); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? Size { get { int o = __p.__offset(6); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+
+ public static void StartViewBox(FlatBufferBuilder builder) { builder.StartTable(2); }
+ public static void AddBase(FlatBufferBuilder builder, Offset baseOffset) { builder.AddOffset(0, baseOffset.Value, 0); }
+ public static void AddSize(FlatBufferBuilder builder, Offset sizeOffset) { builder.AddStruct(1, sizeOffset.Value, 0); }
+ public static Offset EndViewBox(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class ViewBoxVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyTable(tablePos, 4 /*Base*/, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObjVerify.Verify, false)
+ && verifier.VerifyField(tablePos, 6 /*Size*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct Clip : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static Clip GetRootAsClip(ByteBuffer _bb) { return GetRootAsClip(_bb, new Clip()); }
+ public static Clip GetRootAsClip(ByteBuffer _bb, Clip obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public Clip __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj? Base { get { int o = __p.__offset(4); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.ClipKind Kind { get { int o = __p.__offset(6); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.ClipKind)__p.bb.Get(o + __p.bb_pos) : CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.ClipKind.Inset; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? CenterPoint { get { int o = __p.__offset(8); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? Scale { get { int o = __p.__offset(10); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public float? LeftInset { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float?)null; } }
+ public float? RightInset { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float?)null; } }
+ public float? TopInset { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float?)null; } }
+ public float? BottomInset { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float?)null; } }
+ public uint Geometry { get { int o = __p.__offset(20); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+
+ public static void StartClip(FlatBufferBuilder builder) { builder.StartTable(9); }
+ public static void AddBase(FlatBufferBuilder builder, Offset baseOffset) { builder.AddOffset(0, baseOffset.Value, 0); }
+ public static void AddKind(FlatBufferBuilder builder, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.ClipKind kind) { builder.AddByte(1, (byte)kind, 0); }
+ public static void AddCenterPoint(FlatBufferBuilder builder, Offset centerPointOffset) { builder.AddStruct(2, centerPointOffset.Value, 0); }
+ public static void AddScale(FlatBufferBuilder builder, Offset scaleOffset) { builder.AddStruct(3, scaleOffset.Value, 0); }
+ public static void AddLeftInset(FlatBufferBuilder builder, float? leftInset) { builder.AddFloat(4, leftInset); }
+ public static void AddRightInset(FlatBufferBuilder builder, float? rightInset) { builder.AddFloat(5, rightInset); }
+ public static void AddTopInset(FlatBufferBuilder builder, float? topInset) { builder.AddFloat(6, topInset); }
+ public static void AddBottomInset(FlatBufferBuilder builder, float? bottomInset) { builder.AddFloat(7, bottomInset); }
+ public static void AddGeometry(FlatBufferBuilder builder, uint geometry) { builder.AddUint(8, geometry, 4294967295); }
+ public static Offset EndClip(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class ClipVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyTable(tablePos, 4 /*Base*/, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObjVerify.Verify, false)
+ && verifier.VerifyField(tablePos, 6 /*Kind*/, 1 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.ClipKind*/, 1, false)
+ && verifier.VerifyField(tablePos, 8 /*CenterPoint*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyField(tablePos, 10 /*Scale*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyField(tablePos, 12 /*LeftInset*/, 4 /*float*/, 4, false)
+ && verifier.VerifyField(tablePos, 14 /*RightInset*/, 4 /*float*/, 4, false)
+ && verifier.VerifyField(tablePos, 16 /*TopInset*/, 4 /*float*/, 4, false)
+ && verifier.VerifyField(tablePos, 18 /*BottomInset*/, 4 /*float*/, 4, false)
+ && verifier.VerifyField(tablePos, 20 /*Geometry*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct Shadow : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static Shadow GetRootAsShadow(ByteBuffer _bb) { return GetRootAsShadow(_bb, new Shadow()); }
+ public static Shadow GetRootAsShadow(ByteBuffer _bb, Shadow obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public Shadow __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj? Base { get { int o = __p.__offset(4); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.ShadowKind Kind { get { int o = __p.__offset(6); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.ShadowKind)__p.bb.Get(o + __p.bb_pos) : CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.ShadowKind.Drop; } }
+ public float? BlurRadius { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float?)null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color? Color { get { int o = __p.__offset(10); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public uint Mask { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec3? Offset { get { int o = __p.__offset(14); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec3?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec3()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public float? Opacity { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float?)null; } }
+ public byte? SourcePolicy { get { int o = __p.__offset(18); return o != 0 ? __p.bb.Get(o + __p.bb_pos) : (byte?)null; } }
+
+ public static void StartShadow(FlatBufferBuilder builder) { builder.StartTable(8); }
+ public static void AddBase(FlatBufferBuilder builder, Offset baseOffset) { builder.AddOffset(0, baseOffset.Value, 0); }
+ public static void AddKind(FlatBufferBuilder builder, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.ShadowKind kind) { builder.AddByte(1, (byte)kind, 0); }
+ public static void AddBlurRadius(FlatBufferBuilder builder, float? blurRadius) { builder.AddFloat(2, blurRadius); }
+ public static void AddColor(FlatBufferBuilder builder, Offset colorOffset) { builder.AddStruct(3, colorOffset.Value, 0); }
+ public static void AddMask(FlatBufferBuilder builder, uint mask) { builder.AddUint(4, mask, 4294967295); }
+ public static void AddOffset(FlatBufferBuilder builder, Offset offsetOffset) { builder.AddStruct(5, offsetOffset.Value, 0); }
+ public static void AddOpacity(FlatBufferBuilder builder, float? opacity) { builder.AddFloat(6, opacity); }
+ public static void AddSourcePolicy(FlatBufferBuilder builder, byte? sourcePolicy) { builder.AddByte(7, sourcePolicy); }
+ public static Offset EndShadow(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class ShadowVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyTable(tablePos, 4 /*Base*/, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObjVerify.Verify, false)
+ && verifier.VerifyField(tablePos, 6 /*Kind*/, 1 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.ShadowKind*/, 1, false)
+ && verifier.VerifyField(tablePos, 8 /*BlurRadius*/, 4 /*float*/, 4, false)
+ && verifier.VerifyField(tablePos, 10 /*Color*/, 4 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color*/, 1, false)
+ && verifier.VerifyField(tablePos, 12 /*Mask*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 14 /*Offset*/, 12 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec3*/, 4, false)
+ && verifier.VerifyField(tablePos, 16 /*Opacity*/, 4 /*float*/, 4, false)
+ && verifier.VerifyField(tablePos, 18 /*SourcePolicy*/, 1 /*byte*/, 1, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct Surface : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static Surface GetRootAsSurface(ByteBuffer _bb) { return GetRootAsSurface(_bb, new Surface()); }
+ public static Surface GetRootAsSurface(ByteBuffer _bb, Surface obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public Surface __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj? Base { get { int o = __p.__offset(4); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.SurfaceKind Kind { get { int o = __p.__offset(6); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.SurfaceKind)__p.bb.Get(o + __p.bb_pos) : CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.SurfaceKind.VisualSurface; } }
+ public uint SourceVisual { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? SourceSize { get { int o = __p.__offset(10); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? SourceOffset { get { int o = __p.__offset(12); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public uint Uri { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public byte Bytes(int j) { int o = __p.__offset(16); return o != 0 ? __p.bb.Get(__p.__vector(o) + j * 1) : (byte)0; }
+ public int BytesLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } }
+#if ENABLE_SPAN_T
+ public Span GetBytesBytes() { return __p.__vector_as_span(16, 1); }
+#else
+ public ArraySegment? GetBytesBytes() { return __p.__vector_as_arraysegment(16); }
+#endif
+ public byte[] GetBytesArray() { return __p.__vector_as_array(16); }
+
+ public static void StartSurface(FlatBufferBuilder builder) { builder.StartTable(7); }
+ public static void AddBase(FlatBufferBuilder builder, Offset baseOffset) { builder.AddOffset(0, baseOffset.Value, 0); }
+ public static void AddKind(FlatBufferBuilder builder, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.SurfaceKind kind) { builder.AddByte(1, (byte)kind, 0); }
+ public static void AddSourceVisual(FlatBufferBuilder builder, uint sourceVisual) { builder.AddUint(2, sourceVisual, 4294967295); }
+ public static void AddSourceSize(FlatBufferBuilder builder, Offset sourceSizeOffset) { builder.AddStruct(3, sourceSizeOffset.Value, 0); }
+ public static void AddSourceOffset(FlatBufferBuilder builder, Offset sourceOffsetOffset) { builder.AddStruct(4, sourceOffsetOffset.Value, 0); }
+ public static void AddUri(FlatBufferBuilder builder, uint uri) { builder.AddUint(5, uri, 4294967295); }
+ public static void AddBytes(FlatBufferBuilder builder, VectorOffset bytesOffset) { builder.AddOffset(6, bytesOffset.Value, 0); }
+ public static VectorOffset CreateBytesVector(FlatBufferBuilder builder, byte[] data) { builder.StartVector(1, data.Length, 1); for (int i = data.Length - 1; i >= 0; i--) builder.AddByte(data[i]); return builder.EndVector(); }
+ public static VectorOffset CreateBytesVectorBlock(FlatBufferBuilder builder, byte[] data) { builder.StartVector(1, data.Length, 1); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateBytesVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(1, data.Count, 1); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateBytesVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); }
+ public static void StartBytesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(1, numElems, 1); }
+ public static Offset EndSurface(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class SurfaceVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyTable(tablePos, 4 /*Base*/, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObjVerify.Verify, false)
+ && verifier.VerifyField(tablePos, 6 /*Kind*/, 1 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.SurfaceKind*/, 1, false)
+ && verifier.VerifyField(tablePos, 8 /*SourceVisual*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 10 /*SourceSize*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyField(tablePos, 12 /*SourceOffset*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyField(tablePos, 14 /*Uri*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyVectorOfData(tablePos, 16 /*Bytes*/, 1 /*byte*/, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct Effect : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static Effect GetRootAsEffect(ByteBuffer _bb) { return GetRootAsEffect(_bb, new Effect()); }
+ public static Effect GetRootAsEffect(ByteBuffer _bb, Effect obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public Effect __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj? Base { get { int o = __p.__offset(4); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.EffectKind Kind { get { int o = __p.__offset(6); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.EffectKind)__p.bb.Get(o + __p.bb_pos) : CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.EffectKind.Composite; } }
+ public uint Sources(int j) { int o = __p.__offset(8); return o != 0 ? __p.bb.GetUint(__p.__vector(o) + j * 4) : (uint)0; }
+ public int SourcesLength { get { int o = __p.__offset(8); return o != 0 ? __p.__vector_len(o) : 0; } }
+#if ENABLE_SPAN_T
+ public Span GetSourcesBytes() { return __p.__vector_as_span(8, 4); }
+#else
+ public ArraySegment? GetSourcesBytes() { return __p.__vector_as_arraysegment(8); }
+#endif
+ public uint[] GetSourcesArray() { return __p.__vector_as_array(8); }
+ public byte Mode { get { int o = __p.__offset(10); return o != 0 ? __p.bb.Get(o + __p.bb_pos) : (byte)0; } }
+ public float BlurAmount { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } }
+
+ public static Offset CreateEffect(FlatBufferBuilder builder,
+ Offset @baseOffset = default(Offset),
+ CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.EffectKind kind = CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.EffectKind.Composite,
+ VectorOffset sourcesOffset = default(VectorOffset),
+ byte mode = 0,
+ float blur_amount = 0.0f) {
+ builder.StartTable(5);
+ Effect.AddBlurAmount(builder, blur_amount);
+ Effect.AddSources(builder, sourcesOffset);
+ Effect.AddBase(builder, @baseOffset);
+ Effect.AddMode(builder, mode);
+ Effect.AddKind(builder, kind);
+ return Effect.EndEffect(builder);
+ }
+
+ public static void StartEffect(FlatBufferBuilder builder) { builder.StartTable(5); }
+ public static void AddBase(FlatBufferBuilder builder, Offset baseOffset) { builder.AddOffset(0, baseOffset.Value, 0); }
+ public static void AddKind(FlatBufferBuilder builder, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.EffectKind kind) { builder.AddByte(1, (byte)kind, 0); }
+ public static void AddSources(FlatBufferBuilder builder, VectorOffset sourcesOffset) { builder.AddOffset(2, sourcesOffset.Value, 0); }
+ public static VectorOffset CreateSourcesVector(FlatBufferBuilder builder, uint[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddUint(data[i]); return builder.EndVector(); }
+ public static VectorOffset CreateSourcesVectorBlock(FlatBufferBuilder builder, uint[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateSourcesVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateSourcesVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); }
+ public static void StartSourcesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
+ public static void AddMode(FlatBufferBuilder builder, byte mode) { builder.AddByte(3, mode, 0); }
+ public static void AddBlurAmount(FlatBufferBuilder builder, float blurAmount) { builder.AddFloat(4, blurAmount, 0.0f); }
+ public static Offset EndEffect(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class EffectVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyTable(tablePos, 4 /*Base*/, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObjVerify.Verify, false)
+ && verifier.VerifyField(tablePos, 6 /*Kind*/, 1 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.EffectKind*/, 1, false)
+ && verifier.VerifyVectorOfData(tablePos, 8 /*Sources*/, 4 /*uint*/, false)
+ && verifier.VerifyField(tablePos, 10 /*Mode*/, 1 /*byte*/, 1, false)
+ && verifier.VerifyField(tablePos, 12 /*BlurAmount*/, 4 /*float*/, 4, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct Easing : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static Easing GetRootAsEasing(ByteBuffer _bb) { return GetRootAsEasing(_bb, new Easing()); }
+ public static Easing GetRootAsEasing(ByteBuffer _bb, Easing obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public Easing __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj? Base { get { int o = __p.__offset(4); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.EasingKind Kind { get { int o = __p.__offset(6); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.EasingKind)__p.bb.Get(o + __p.bb_pos) : CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.EasingKind.Linear; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? ControlPoint1 { get { int o = __p.__offset(8); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2? ControlPoint2 { get { int o = __p.__offset(10); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public int? StepCount { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int?)null; } }
+ public int? InitialStep { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int?)null; } }
+ public int? FinalStep { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int?)null; } }
+ public bool? IsInitialStepSingleFrame { get { int o = __p.__offset(18); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool?)null; } }
+ public bool? IsFinalStepSingleFrame { get { int o = __p.__offset(20); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool?)null; } }
+
+ public static void StartEasing(FlatBufferBuilder builder) { builder.StartTable(9); }
+ public static void AddBase(FlatBufferBuilder builder, Offset baseOffset) { builder.AddOffset(0, baseOffset.Value, 0); }
+ public static void AddKind(FlatBufferBuilder builder, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.EasingKind kind) { builder.AddByte(1, (byte)kind, 0); }
+ public static void AddControlPoint1(FlatBufferBuilder builder, Offset controlPoint1Offset) { builder.AddStruct(2, controlPoint1Offset.Value, 0); }
+ public static void AddControlPoint2(FlatBufferBuilder builder, Offset controlPoint2Offset) { builder.AddStruct(3, controlPoint2Offset.Value, 0); }
+ public static void AddStepCount(FlatBufferBuilder builder, int? stepCount) { builder.AddInt(4, stepCount); }
+ public static void AddInitialStep(FlatBufferBuilder builder, int? initialStep) { builder.AddInt(5, initialStep); }
+ public static void AddFinalStep(FlatBufferBuilder builder, int? finalStep) { builder.AddInt(6, finalStep); }
+ public static void AddIsInitialStepSingleFrame(FlatBufferBuilder builder, bool? isInitialStepSingleFrame) { builder.AddBool(7, isInitialStepSingleFrame); }
+ public static void AddIsFinalStepSingleFrame(FlatBufferBuilder builder, bool? isFinalStepSingleFrame) { builder.AddBool(8, isFinalStepSingleFrame); }
+ public static Offset EndEasing(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class EasingVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyTable(tablePos, 4 /*Base*/, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObjVerify.Verify, false)
+ && verifier.VerifyField(tablePos, 6 /*Kind*/, 1 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.EasingKind*/, 1, false)
+ && verifier.VerifyField(tablePos, 8 /*ControlPoint1*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyField(tablePos, 10 /*ControlPoint2*/, 8 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec2*/, 4, false)
+ && verifier.VerifyField(tablePos, 12 /*StepCount*/, 4 /*int*/, 4, false)
+ && verifier.VerifyField(tablePos, 14 /*InitialStep*/, 4 /*int*/, 4, false)
+ && verifier.VerifyField(tablePos, 16 /*FinalStep*/, 4 /*int*/, 4, false)
+ && verifier.VerifyField(tablePos, 18 /*IsInitialStepSingleFrame*/, 1 /*bool*/, 1, false)
+ && verifier.VerifyField(tablePos, 20 /*IsFinalStepSingleFrame*/, 1 /*bool*/, 1, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct Animation : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static Animation GetRootAsAnimation(ByteBuffer _bb) { return GetRootAsAnimation(_bb, new Animation()); }
+ public static Animation GetRootAsAnimation(ByteBuffer _bb, Animation obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public Animation __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj? Base { get { int o = __p.__offset(4); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.AnimationKind Kind { get { int o = __p.__offset(6); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.AnimationKind)__p.bb.Get(o + __p.bb_pos) : CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.AnimationKind.Scalar; } }
+ public uint Target { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.ReferenceParameter? ReferenceParameters(int j) { int o = __p.__offset(10); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.ReferenceParameter?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.ReferenceParameter()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
+ public int ReferenceParametersLength { get { int o = __p.__offset(10); return o != 0 ? __p.__vector_len(o) : 0; } }
+ public uint Expression { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public long DurationTicks { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.KeyFrame? KeyFrames(int j) { int o = __p.__offset(16); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.KeyFrame?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.KeyFrame()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
+ public int KeyFramesLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } }
+ public byte? InterpolationColorSpace { get { int o = __p.__offset(18); return o != 0 ? __p.bb.Get(o + __p.bb_pos) : (byte?)null; } }
+
+ public static Offset CreateAnimation(FlatBufferBuilder builder,
+ Offset @baseOffset = default(Offset),
+ CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.AnimationKind kind = CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.AnimationKind.Scalar,
+ uint target = 4294967295,
+ VectorOffset reference_parametersOffset = default(VectorOffset),
+ uint expression = 4294967295,
+ long duration_ticks = 0,
+ VectorOffset key_framesOffset = default(VectorOffset),
+ byte? interpolation_color_space = null) {
+ builder.StartTable(8);
+ Animation.AddDurationTicks(builder, duration_ticks);
+ Animation.AddKeyFrames(builder, key_framesOffset);
+ Animation.AddExpression(builder, expression);
+ Animation.AddReferenceParameters(builder, reference_parametersOffset);
+ Animation.AddTarget(builder, target);
+ Animation.AddBase(builder, @baseOffset);
+ Animation.AddInterpolationColorSpace(builder, interpolation_color_space);
+ Animation.AddKind(builder, kind);
+ return Animation.EndAnimation(builder);
+ }
+
+ public static void StartAnimation(FlatBufferBuilder builder) { builder.StartTable(8); }
+ public static void AddBase(FlatBufferBuilder builder, Offset baseOffset) { builder.AddOffset(0, baseOffset.Value, 0); }
+ public static void AddKind(FlatBufferBuilder builder, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.AnimationKind kind) { builder.AddByte(1, (byte)kind, 0); }
+ public static void AddTarget(FlatBufferBuilder builder, uint target) { builder.AddUint(2, target, 4294967295); }
+ public static void AddReferenceParameters(FlatBufferBuilder builder, VectorOffset referenceParametersOffset) { builder.AddOffset(3, referenceParametersOffset.Value, 0); }
+ public static VectorOffset CreateReferenceParametersVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
+ public static VectorOffset CreateReferenceParametersVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateReferenceParametersVectorBlock(FlatBufferBuilder builder, ArraySegment> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateReferenceParametersVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add>(dataPtr, sizeInBytes); return builder.EndVector(); }
+ public static void StartReferenceParametersVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
+ public static void AddExpression(FlatBufferBuilder builder, uint expression) { builder.AddUint(4, expression, 4294967295); }
+ public static void AddDurationTicks(FlatBufferBuilder builder, long durationTicks) { builder.AddLong(5, durationTicks, 0); }
+ public static void AddKeyFrames(FlatBufferBuilder builder, VectorOffset keyFramesOffset) { builder.AddOffset(6, keyFramesOffset.Value, 0); }
+ public static VectorOffset CreateKeyFramesVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
+ public static VectorOffset CreateKeyFramesVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateKeyFramesVectorBlock(FlatBufferBuilder builder, ArraySegment> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateKeyFramesVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add>(dataPtr, sizeInBytes); return builder.EndVector(); }
+ public static void StartKeyFramesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
+ public static void AddInterpolationColorSpace(FlatBufferBuilder builder, byte? interpolationColorSpace) { builder.AddByte(7, interpolationColorSpace); }
+ public static Offset EndAnimation(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class AnimationVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyTable(tablePos, 4 /*Base*/, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObjVerify.Verify, false)
+ && verifier.VerifyField(tablePos, 6 /*Kind*/, 1 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.AnimationKind*/, 1, false)
+ && verifier.VerifyField(tablePos, 8 /*Target*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyVectorOfTables(tablePos, 10 /*ReferenceParameters*/, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.ReferenceParameterVerify.Verify, false)
+ && verifier.VerifyField(tablePos, 12 /*Expression*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 14 /*DurationTicks*/, 8 /*long*/, 8, false)
+ && verifier.VerifyVectorOfTables(tablePos, 16 /*KeyFrames*/, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.KeyFrameVerify.Verify, false)
+ && verifier.VerifyField(tablePos, 18 /*InterpolationColorSpace*/, 1 /*byte*/, 1, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct PropertySet : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static PropertySet GetRootAsPropertySet(ByteBuffer _bb) { return GetRootAsPropertySet(_bb, new PropertySet()); }
+ public static PropertySet GetRootAsPropertySet(ByteBuffer _bb, PropertySet obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public PropertySet __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj? Base { get { int o = __p.__offset(4); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } }
+ public uint Owner { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyValue? Values(int j) { int o = __p.__offset(8); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyValue?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyValue()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
+ public int ValuesLength { get { int o = __p.__offset(8); return o != 0 ? __p.__vector_len(o) : 0; } }
+
+ public static Offset CreatePropertySet(FlatBufferBuilder builder,
+ Offset @baseOffset = default(Offset),
+ uint owner = 4294967295,
+ VectorOffset valuesOffset = default(VectorOffset)) {
+ builder.StartTable(3);
+ PropertySet.AddValues(builder, valuesOffset);
+ PropertySet.AddOwner(builder, owner);
+ PropertySet.AddBase(builder, @baseOffset);
+ return PropertySet.EndPropertySet(builder);
+ }
+
+ public static void StartPropertySet(FlatBufferBuilder builder) { builder.StartTable(3); }
+ public static void AddBase(FlatBufferBuilder builder, Offset baseOffset) { builder.AddOffset(0, baseOffset.Value, 0); }
+ public static void AddOwner(FlatBufferBuilder builder, uint owner) { builder.AddUint(1, owner, 4294967295); }
+ public static void AddValues(FlatBufferBuilder builder, VectorOffset valuesOffset) { builder.AddOffset(2, valuesOffset.Value, 0); }
+ public static VectorOffset CreateValuesVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
+ public static VectorOffset CreateValuesVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateValuesVectorBlock(FlatBufferBuilder builder, ArraySegment> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateValuesVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add>(dataPtr, sizeInBytes); return builder.EndVector(); }
+ public static void StartValuesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
+ public static Offset EndPropertySet(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class PropertySetVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyTable(tablePos, 4 /*Base*/, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObjVerify.Verify, false)
+ && verifier.VerifyField(tablePos, 6 /*Owner*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyVectorOfTables(tablePos, 8 /*Values*/, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyValueVerify.Verify, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct Controller : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static Controller GetRootAsController(ByteBuffer _bb) { return GetRootAsController(_bb, new Controller()); }
+ public static Controller GetRootAsController(ByteBuffer _bb, Controller obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public Controller __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj? Base { get { int o = __p.__offset(4); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObj()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } }
+ public uint TargetObject { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public uint TargetProperty { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public bool IsPaused { get { int o = __p.__offset(10); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
+ public bool IsCustom { get { int o = __p.__offset(12); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
+
+ public static Offset CreateController(FlatBufferBuilder builder,
+ Offset @baseOffset = default(Offset),
+ uint target_object = 4294967295,
+ uint target_property = 4294967295,
+ bool is_paused = false,
+ bool is_custom = false) {
+ builder.StartTable(5);
+ Controller.AddTargetProperty(builder, target_property);
+ Controller.AddTargetObject(builder, target_object);
+ Controller.AddBase(builder, @baseOffset);
+ Controller.AddIsCustom(builder, is_custom);
+ Controller.AddIsPaused(builder, is_paused);
+ return Controller.EndController(builder);
+ }
+
+ public static void StartController(FlatBufferBuilder builder) { builder.StartTable(5); }
+ public static void AddBase(FlatBufferBuilder builder, Offset baseOffset) { builder.AddOffset(0, baseOffset.Value, 0); }
+ public static void AddTargetObject(FlatBufferBuilder builder, uint targetObject) { builder.AddUint(1, targetObject, 4294967295); }
+ public static void AddTargetProperty(FlatBufferBuilder builder, uint targetProperty) { builder.AddUint(2, targetProperty, 4294967295); }
+ public static void AddIsPaused(FlatBufferBuilder builder, bool isPaused) { builder.AddBool(3, isPaused, false); }
+ public static void AddIsCustom(FlatBufferBuilder builder, bool isCustom) { builder.AddBool(4, isCustom, false); }
+ public static Offset EndController(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class ControllerVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyTable(tablePos, 4 /*Base*/, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CompObjVerify.Verify, false)
+ && verifier.VerifyField(tablePos, 6 /*TargetObject*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 8 /*TargetProperty*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 10 /*IsPaused*/, 1 /*bool*/, 1, false)
+ && verifier.VerifyField(tablePos, 12 /*IsCustom*/, 1 /*bool*/, 1, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct PropertyBinding : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static PropertyBinding GetRootAsPropertyBinding(ByteBuffer _bb) { return GetRootAsPropertyBinding(_bb, new PropertyBinding()); }
+ public static PropertyBinding GetRootAsPropertyBinding(ByteBuffer _bb, PropertyBinding obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public PropertyBinding __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public uint Name { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } }
+ public uint DisplayName { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyValueType ActualType { get { int o = __p.__offset(8); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyValueType)__p.bb.Get(o + __p.bb_pos) : CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyValueType.None; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyValueType ExposedType { get { int o = __p.__offset(10); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyValueType)__p.bb.Get(o + __p.bb_pos) : CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyValueType.None; } }
+ public float DefaultScalar { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec4? DefaultVector { get { int o = __p.__offset(14); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec4?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec4()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color? DefaultColor { get { int o = __p.__offset(16); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color()).__assign(o + __p.bb_pos, __p.bb) : null; } }
+
+ public static void StartPropertyBinding(FlatBufferBuilder builder) { builder.StartTable(7); }
+ public static void AddName(FlatBufferBuilder builder, uint name) { builder.AddUint(0, name, 0); }
+ public static void AddDisplayName(FlatBufferBuilder builder, uint displayName) { builder.AddUint(1, displayName, 0); }
+ public static void AddActualType(FlatBufferBuilder builder, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyValueType actualType) { builder.AddByte(2, (byte)actualType, 0); }
+ public static void AddExposedType(FlatBufferBuilder builder, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyValueType exposedType) { builder.AddByte(3, (byte)exposedType, 0); }
+ public static void AddDefaultScalar(FlatBufferBuilder builder, float defaultScalar) { builder.AddFloat(4, defaultScalar, 0.0f); }
+ public static void AddDefaultVector(FlatBufferBuilder builder, Offset defaultVectorOffset) { builder.AddStruct(5, defaultVectorOffset.Value, 0); }
+ public static void AddDefaultColor(FlatBufferBuilder builder, Offset defaultColorOffset) { builder.AddStruct(6, defaultColorOffset.Value, 0); }
+ public static Offset EndPropertyBinding(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class PropertyBindingVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyField(tablePos, 4 /*Name*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 6 /*DisplayName*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 8 /*ActualType*/, 1 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyValueType*/, 1, false)
+ && verifier.VerifyField(tablePos, 10 /*ExposedType*/, 1 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyValueType*/, 1, false)
+ && verifier.VerifyField(tablePos, 12 /*DefaultScalar*/, 4 /*float*/, 4, false)
+ && verifier.VerifyField(tablePos, 14 /*DefaultVector*/, 16 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Vec4*/, 4, false)
+ && verifier.VerifyField(tablePos, 16 /*DefaultColor*/, 4 /*CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Color*/, 1, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct Marker : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static Marker GetRootAsMarker(ByteBuffer _bb) { return GetRootAsMarker(_bb, new Marker()); }
+ public static Marker GetRootAsMarker(ByteBuffer _bb, Marker obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public Marker __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public uint Name { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } }
+ public float Progress { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } }
+ public float DurationProgress { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } }
+
+ public static Offset CreateMarker(FlatBufferBuilder builder,
+ uint name = 0,
+ float progress = 0.0f,
+ float duration_progress = 0.0f) {
+ builder.StartTable(3);
+ Marker.AddDurationProgress(builder, duration_progress);
+ Marker.AddProgress(builder, progress);
+ Marker.AddName(builder, name);
+ return Marker.EndMarker(builder);
+ }
+
+ public static void StartMarker(FlatBufferBuilder builder) { builder.StartTable(3); }
+ public static void AddName(FlatBufferBuilder builder, uint name) { builder.AddUint(0, name, 0); }
+ public static void AddProgress(FlatBufferBuilder builder, float progress) { builder.AddFloat(1, progress, 0.0f); }
+ public static void AddDurationProgress(FlatBufferBuilder builder, float durationProgress) { builder.AddFloat(2, durationProgress, 0.0f); }
+ public static Offset EndMarker(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class MarkerVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyField(tablePos, 4 /*Name*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 6 /*Progress*/, 4 /*float*/, 4, false)
+ && verifier.VerifyField(tablePos, 8 /*DurationProgress*/, 4 /*float*/, 4, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct Metadata : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static Metadata GetRootAsMetadata(ByteBuffer _bb) { return GetRootAsMetadata(_bb, new Metadata()); }
+ public static Metadata GetRootAsMetadata(ByteBuffer _bb, Metadata obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public Metadata __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public uint Name { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public float Width { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } }
+ public float Height { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } }
+ public long DurationTicks { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
+ public float FramesPerSecond { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetFloat(o + __p.bb_pos) : (float)0.0f; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyBinding? PropertyBindings(int j) { int o = __p.__offset(14); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyBinding?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyBinding()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
+ public int PropertyBindingsLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Marker? Markers(int j) { int o = __p.__offset(16); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Marker?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Marker()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
+ public int MarkersLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } }
+ public uint ThemingPropertySet { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+
+ public static Offset CreateMetadata(FlatBufferBuilder builder,
+ uint name = 4294967295,
+ float width = 0.0f,
+ float height = 0.0f,
+ long duration_ticks = 0,
+ float frames_per_second = 0.0f,
+ VectorOffset property_bindingsOffset = default(VectorOffset),
+ VectorOffset markersOffset = default(VectorOffset),
+ uint theming_property_set = 4294967295) {
+ builder.StartTable(8);
+ Metadata.AddDurationTicks(builder, duration_ticks);
+ Metadata.AddThemingPropertySet(builder, theming_property_set);
+ Metadata.AddMarkers(builder, markersOffset);
+ Metadata.AddPropertyBindings(builder, property_bindingsOffset);
+ Metadata.AddFramesPerSecond(builder, frames_per_second);
+ Metadata.AddHeight(builder, height);
+ Metadata.AddWidth(builder, width);
+ Metadata.AddName(builder, name);
+ return Metadata.EndMetadata(builder);
+ }
+
+ public static void StartMetadata(FlatBufferBuilder builder) { builder.StartTable(8); }
+ public static void AddName(FlatBufferBuilder builder, uint name) { builder.AddUint(0, name, 4294967295); }
+ public static void AddWidth(FlatBufferBuilder builder, float width) { builder.AddFloat(1, width, 0.0f); }
+ public static void AddHeight(FlatBufferBuilder builder, float height) { builder.AddFloat(2, height, 0.0f); }
+ public static void AddDurationTicks(FlatBufferBuilder builder, long durationTicks) { builder.AddLong(3, durationTicks, 0); }
+ public static void AddFramesPerSecond(FlatBufferBuilder builder, float framesPerSecond) { builder.AddFloat(4, framesPerSecond, 0.0f); }
+ public static void AddPropertyBindings(FlatBufferBuilder builder, VectorOffset propertyBindingsOffset) { builder.AddOffset(5, propertyBindingsOffset.Value, 0); }
+ public static VectorOffset CreatePropertyBindingsVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
+ public static VectorOffset CreatePropertyBindingsVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreatePropertyBindingsVectorBlock(FlatBufferBuilder builder, ArraySegment> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreatePropertyBindingsVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add>(dataPtr, sizeInBytes); return builder.EndVector(); }
+ public static void StartPropertyBindingsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
+ public static void AddMarkers(FlatBufferBuilder builder, VectorOffset markersOffset) { builder.AddOffset(6, markersOffset.Value, 0); }
+ public static VectorOffset CreateMarkersVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
+ public static VectorOffset CreateMarkersVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateMarkersVectorBlock(FlatBufferBuilder builder, ArraySegment> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateMarkersVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add>(dataPtr, sizeInBytes); return builder.EndVector(); }
+ public static void StartMarkersVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
+ public static void AddThemingPropertySet(FlatBufferBuilder builder, uint themingPropertySet) { builder.AddUint(7, themingPropertySet, 4294967295); }
+ public static Offset EndMetadata(FlatBufferBuilder builder) {
+ int o = builder.EndTable();
+ return new Offset(o);
+ }
+}
+
+
+static public class MetadataVerify
+{
+ static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
+ {
+ return verifier.VerifyTableStart(tablePos)
+ && verifier.VerifyField(tablePos, 4 /*Name*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyField(tablePos, 6 /*Width*/, 4 /*float*/, 4, false)
+ && verifier.VerifyField(tablePos, 8 /*Height*/, 4 /*float*/, 4, false)
+ && verifier.VerifyField(tablePos, 10 /*DurationTicks*/, 8 /*long*/, 8, false)
+ && verifier.VerifyField(tablePos, 12 /*FramesPerSecond*/, 4 /*float*/, 4, false)
+ && verifier.VerifyVectorOfTables(tablePos, 14 /*PropertyBindings*/, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertyBindingVerify.Verify, false)
+ && verifier.VerifyVectorOfTables(tablePos, 16 /*Markers*/, CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.MarkerVerify.Verify, false)
+ && verifier.VerifyField(tablePos, 18 /*ThemingPropertySet*/, 4 /*uint*/, 4, false)
+ && verifier.VerifyTableEnd(tablePos);
+ }
+}
+public struct LottieComposition : IFlatbufferObject
+{
+ private Table __p;
+ public ByteBuffer ByteBuffer { get { return __p.bb; } }
+ public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_25_2_10(); }
+ public static LottieComposition GetRootAsLottieComposition(ByteBuffer _bb) { return GetRootAsLottieComposition(_bb, new LottieComposition()); }
+ public static LottieComposition GetRootAsLottieComposition(ByteBuffer _bb, LottieComposition obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
+ public static bool LottieCompositionBufferHasIdentifier(ByteBuffer _bb) { return Table.__has_identifier(_bb, "LCMP"); }
+ public static bool VerifyLottieComposition(ByteBuffer _bb) {Google.FlatBuffers.Verifier verifier = new Google.FlatBuffers.Verifier(_bb); return verifier.VerifyBuffer("LCMP", false, LottieCompositionVerify.Verify); }
+ public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
+ public LottieComposition __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
+
+ public ushort SchemaVersion { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetUshort(o + __p.bb_pos) : (ushort)0; } }
+ public ushort RequiredUapVersion { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetUshort(o + __p.bb_pos) : (ushort)0; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Metadata? Metadata { get { int o = __p.__offset(8); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Metadata?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Metadata()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } }
+ public uint RootVisual { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)4294967295; } }
+ public string Strings(int j) { int o = __p.__offset(12); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; }
+ public int StringsLength { get { int o = __p.__offset(12); return o != 0 ? __p.__vector_len(o) : 0; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Visual? Visuals(int j) { int o = __p.__offset(14); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Visual?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Visual()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
+ public int VisualsLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Shape? Shapes(int j) { int o = __p.__offset(16); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Shape?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Shape()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
+ public int ShapesLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Geometry? Geometries(int j) { int o = __p.__offset(18); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Geometry?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Geometry()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
+ public int GeometriesLength { get { int o = __p.__offset(18); return o != 0 ? __p.__vector_len(o) : 0; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CanvasGeometry? CanvasGeometries(int j) { int o = __p.__offset(20); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CanvasGeometry?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.CanvasGeometry()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
+ public int CanvasGeometriesLength { get { int o = __p.__offset(20); return o != 0 ? __p.__vector_len(o) : 0; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Brush? Brushes(int j) { int o = __p.__offset(22); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Brush?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Brush()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
+ public int BrushesLength { get { int o = __p.__offset(22); return o != 0 ? __p.__vector_len(o) : 0; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.GradientStop? GradientStops(int j) { int o = __p.__offset(24); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.GradientStop?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.GradientStop()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
+ public int GradientStopsLength { get { int o = __p.__offset(24); return o != 0 ? __p.__vector_len(o) : 0; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.ViewBox? ViewBoxes(int j) { int o = __p.__offset(26); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.ViewBox?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.ViewBox()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
+ public int ViewBoxesLength { get { int o = __p.__offset(26); return o != 0 ? __p.__vector_len(o) : 0; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Clip? Clips(int j) { int o = __p.__offset(28); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Clip?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Clip()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
+ public int ClipsLength { get { int o = __p.__offset(28); return o != 0 ? __p.__vector_len(o) : 0; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Shadow? Shadows(int j) { int o = __p.__offset(30); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Shadow?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Shadow()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
+ public int ShadowsLength { get { int o = __p.__offset(30); return o != 0 ? __p.__vector_len(o) : 0; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Surface? Surfaces(int j) { int o = __p.__offset(32); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Surface?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Surface()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
+ public int SurfacesLength { get { int o = __p.__offset(32); return o != 0 ? __p.__vector_len(o) : 0; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Effect? Effects(int j) { int o = __p.__offset(34); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Effect?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Effect()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
+ public int EffectsLength { get { int o = __p.__offset(34); return o != 0 ? __p.__vector_len(o) : 0; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Easing? Easings(int j) { int o = __p.__offset(36); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Easing?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Easing()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
+ public int EasingsLength { get { int o = __p.__offset(36); return o != 0 ? __p.__vector_len(o) : 0; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Animation? Animations(int j) { int o = __p.__offset(38); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Animation?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Animation()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
+ public int AnimationsLength { get { int o = __p.__offset(38); return o != 0 ? __p.__vector_len(o) : 0; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertySet? PropertySets(int j) { int o = __p.__offset(40); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertySet?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.PropertySet()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
+ public int PropertySetsLength { get { int o = __p.__offset(40); return o != 0 ? __p.__vector_len(o) : 0; } }
+ public CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Controller? Controllers(int j) { int o = __p.__offset(42); return o != 0 ? (CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Controller?)(new CommunityToolkit.WinUI.Lottie.CompDataFlatbuffer.Schema.Controller()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
+ public int ControllersLength { get { int o = __p.__offset(42); return o != 0 ? __p.__vector_len(o) : 0; } }
+ public uint CustomControllers(int j) { int o = __p.__offset(44); return o != 0 ? __p.bb.GetUint(__p.__vector(o) + j * 4) : (uint)0; }
+ public int CustomControllersLength { get { int o = __p.__offset(44); return o != 0 ? __p.__vector_len(o) : 0; } }
+#if ENABLE_SPAN_T
+ public Span GetCustomControllersBytes() { return __p.__vector_as_span(44, 4); }
+#else
+ public ArraySegment? GetCustomControllersBytes() { return __p.__vector_as_arraysegment(44); }
+#endif
+ public uint[] GetCustomControllersArray() { return __p.__vector_as_array(44); }
+
+ public static Offset CreateLottieComposition(FlatBufferBuilder builder,
+ ushort schema_version = 0,
+ ushort required_uap_version = 0,
+ Offset metadataOffset = default(Offset),
+ uint root_visual = 4294967295,
+ VectorOffset stringsOffset = default(VectorOffset),
+ VectorOffset visualsOffset = default(VectorOffset),
+ VectorOffset shapesOffset = default(VectorOffset),
+ VectorOffset geometriesOffset = default(VectorOffset),
+ VectorOffset canvas_geometriesOffset = default(VectorOffset),
+ VectorOffset brushesOffset = default(VectorOffset),
+ VectorOffset gradient_stopsOffset = default(VectorOffset),
+ VectorOffset view_boxesOffset = default(VectorOffset),
+ VectorOffset clipsOffset = default(VectorOffset),
+ VectorOffset shadowsOffset = default(VectorOffset),
+ VectorOffset surfacesOffset = default(VectorOffset),
+ VectorOffset effectsOffset = default(VectorOffset),
+ VectorOffset easingsOffset = default(VectorOffset),
+ VectorOffset animationsOffset = default(VectorOffset),
+ VectorOffset property_setsOffset = default(VectorOffset),
+ VectorOffset controllersOffset = default(VectorOffset),
+ VectorOffset custom_controllersOffset = default(VectorOffset)) {
+ builder.StartTable(21);
+ LottieComposition.AddCustomControllers(builder, custom_controllersOffset);
+ LottieComposition.AddControllers(builder, controllersOffset);
+ LottieComposition.AddPropertySets(builder, property_setsOffset);
+ LottieComposition.AddAnimations(builder, animationsOffset);
+ LottieComposition.AddEasings(builder, easingsOffset);
+ LottieComposition.AddEffects(builder, effectsOffset);
+ LottieComposition.AddSurfaces(builder, surfacesOffset);
+ LottieComposition.AddShadows(builder, shadowsOffset);
+ LottieComposition.AddClips(builder, clipsOffset);
+ LottieComposition.AddViewBoxes(builder, view_boxesOffset);
+ LottieComposition.AddGradientStops(builder, gradient_stopsOffset);
+ LottieComposition.AddBrushes(builder, brushesOffset);
+ LottieComposition.AddCanvasGeometries(builder, canvas_geometriesOffset);
+ LottieComposition.AddGeometries(builder, geometriesOffset);
+ LottieComposition.AddShapes(builder, shapesOffset);
+ LottieComposition.AddVisuals(builder, visualsOffset);
+ LottieComposition.AddStrings(builder, stringsOffset);
+ LottieComposition.AddRootVisual(builder, root_visual);
+ LottieComposition.AddMetadata(builder, metadataOffset);
+ LottieComposition.AddRequiredUapVersion(builder, required_uap_version);
+ LottieComposition.AddSchemaVersion(builder, schema_version);
+ return LottieComposition.EndLottieComposition(builder);
+ }
+
+ public static void StartLottieComposition(FlatBufferBuilder builder) { builder.StartTable(21); }
+ public static void AddSchemaVersion(FlatBufferBuilder builder, ushort schemaVersion) { builder.AddUshort(0, schemaVersion, 0); }
+ public static void AddRequiredUapVersion(FlatBufferBuilder builder, ushort requiredUapVersion) { builder.AddUshort(1, requiredUapVersion, 0); }
+ public static void AddMetadata(FlatBufferBuilder builder, Offset metadataOffset) { builder.AddOffset(2, metadataOffset.Value, 0); }
+ public static void AddRootVisual(FlatBufferBuilder builder, uint rootVisual) { builder.AddUint(3, rootVisual, 4294967295); }
+ public static void AddStrings(FlatBufferBuilder builder, VectorOffset stringsOffset) { builder.AddOffset(4, stringsOffset.Value, 0); }
+ public static VectorOffset CreateStringsVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
+ public static VectorOffset CreateStringsVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateStringsVectorBlock(FlatBufferBuilder builder, ArraySegment data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateStringsVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add(dataPtr, sizeInBytes); return builder.EndVector(); }
+ public static void StartStringsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
+ public static void AddVisuals(FlatBufferBuilder builder, VectorOffset visualsOffset) { builder.AddOffset(5, visualsOffset.Value, 0); }
+ public static VectorOffset CreateVisualsVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
+ public static VectorOffset CreateVisualsVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateVisualsVectorBlock(FlatBufferBuilder builder, ArraySegment> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateVisualsVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add>(dataPtr, sizeInBytes); return builder.EndVector(); }
+ public static void StartVisualsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
+ public static void AddShapes(FlatBufferBuilder builder, VectorOffset shapesOffset) { builder.AddOffset(6, shapesOffset.Value, 0); }
+ public static VectorOffset CreateShapesVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
+ public static VectorOffset CreateShapesVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateShapesVectorBlock(FlatBufferBuilder builder, ArraySegment> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateShapesVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add>(dataPtr, sizeInBytes); return builder.EndVector(); }
+ public static void StartShapesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
+ public static void AddGeometries(FlatBufferBuilder builder, VectorOffset geometriesOffset) { builder.AddOffset(7, geometriesOffset.Value, 0); }
+ public static VectorOffset CreateGeometriesVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
+ public static VectorOffset CreateGeometriesVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateGeometriesVectorBlock(FlatBufferBuilder builder, ArraySegment> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateGeometriesVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add>(dataPtr, sizeInBytes); return builder.EndVector(); }
+ public static void StartGeometriesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
+ public static void AddCanvasGeometries(FlatBufferBuilder builder, VectorOffset canvasGeometriesOffset) { builder.AddOffset(8, canvasGeometriesOffset.Value, 0); }
+ public static VectorOffset CreateCanvasGeometriesVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
+ public static VectorOffset CreateCanvasGeometriesVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateCanvasGeometriesVectorBlock(FlatBufferBuilder builder, ArraySegment> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateCanvasGeometriesVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add>(dataPtr, sizeInBytes); return builder.EndVector(); }
+ public static void StartCanvasGeometriesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
+ public static void AddBrushes(FlatBufferBuilder builder, VectorOffset brushesOffset) { builder.AddOffset(9, brushesOffset.Value, 0); }
+ public static VectorOffset CreateBrushesVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
+ public static VectorOffset CreateBrushesVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateBrushesVectorBlock(FlatBufferBuilder builder, ArraySegment> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateBrushesVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add>(dataPtr, sizeInBytes); return builder.EndVector(); }
+ public static void StartBrushesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
+ public static void AddGradientStops(FlatBufferBuilder builder, VectorOffset gradientStopsOffset) { builder.AddOffset(10, gradientStopsOffset.Value, 0); }
+ public static VectorOffset CreateGradientStopsVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
+ public static VectorOffset CreateGradientStopsVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateGradientStopsVectorBlock(FlatBufferBuilder builder, ArraySegment> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
+ public static VectorOffset CreateGradientStopsVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add>(dataPtr, sizeInBytes); return builder.EndVector(); }
+ public static void StartGradientStopsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
+ public static void AddViewBoxes(FlatBufferBuilder builder, VectorOffset viewBoxesOffset) { builder.AddOffset(11, viewBoxesOffset.Value, 0); }
+ public static VectorOffset CreateViewBoxesVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
+ public static VectorOffset CreateViewBoxesVectorBlock(FlatBufferBuilder builder, Offset