Files
QuickLook/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/Webview/Svga/Svga.cs
2025-07-05 10:21:15 +08:00

3973 lines
148 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: svga.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Com.Opensource.Svga
{
/// <summary>Holder for reflection information generated from svga.proto</summary>
public static partial class SvgaReflection
{
#region Descriptor
/// <summary>File descriptor for svga.proto</summary>
public static pbr::FileDescriptor Descriptor
{
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static SvgaReflection()
{
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CgpzdmdhLnByb3RvEhNjb20ub3BlbnNvdXJjZS5zdmdhIlcKC01vdmllUGFy",
"YW1zEhQKDHZpZXdCb3hXaWR0aBgBIAEoAhIVCg12aWV3Qm94SGVpZ2h0GAIg",
"ASgCEgsKA2ZwcxgDIAEoBRIOCgZmcmFtZXMYBCABKAUiUgoMU3ByaXRlRW50",
"aXR5EhAKCGltYWdlS2V5GAEgASgJEjAKBmZyYW1lcxgCIAMoCzIgLmNvbS5v",
"cGVuc291cmNlLnN2Z2EuRnJhbWVFbnRpdHkiawoLQXVkaW9FbnRpdHkSEAoI",
"YXVkaW9LZXkYASABKAkSEgoKc3RhcnRGcmFtZRgCIAEoBRIQCghlbmRGcmFt",
"ZRgDIAEoBRIRCglzdGFydFRpbWUYBCABKAUSEQoJdG90YWxUaW1lGAUgASgF",
"Ij0KBkxheW91dBIJCgF4GAEgASgCEgkKAXkYAiABKAISDQoFd2lkdGgYAyAB",
"KAISDgoGaGVpZ2h0GAQgASgCIk8KCVRyYW5zZm9ybRIJCgFhGAEgASgCEgkK",
"AWIYAiABKAISCQoBYxgDIAEoAhIJCgFkGAQgASgCEgoKAnR4GAUgASgCEgoK",
"AnR5GAYgASgCIroJCgtTaGFwZUVudGl0eRI4CgR0eXBlGAEgASgOMiouY29t",
"Lm9wZW5zb3VyY2Uuc3ZnYS5TaGFwZUVudGl0eS5TaGFwZVR5cGUSOwoFc2hh",
"cGUYAiABKAsyKi5jb20ub3BlbnNvdXJjZS5zdmdhLlNoYXBlRW50aXR5LlNo",
"YXBlQXJnc0gAEjkKBHJlY3QYAyABKAsyKS5jb20ub3BlbnNvdXJjZS5zdmdh",
"LlNoYXBlRW50aXR5LlJlY3RBcmdzSAASPwoHZWxsaXBzZRgEIAEoCzIsLmNv",
"bS5vcGVuc291cmNlLnN2Z2EuU2hhcGVFbnRpdHkuRWxsaXBzZUFyZ3NIABI7",
"CgZzdHlsZXMYCiABKAsyKy5jb20ub3BlbnNvdXJjZS5zdmdhLlNoYXBlRW50",
"aXR5LlNoYXBlU3R5bGUSMQoJdHJhbnNmb3JtGAsgASgLMh4uY29tLm9wZW5z",
"b3VyY2Uuc3ZnYS5UcmFuc2Zvcm0aFgoJU2hhcGVBcmdzEgkKAWQYASABKAka",
"VQoIUmVjdEFyZ3MSCQoBeBgBIAEoAhIJCgF5GAIgASgCEg0KBXdpZHRoGAMg",
"ASgCEg4KBmhlaWdodBgEIAEoAhIUCgxjb3JuZXJSYWRpdXMYBSABKAIaRQoL",
"RWxsaXBzZUFyZ3MSCQoBeBgBIAEoAhIJCgF5GAIgASgCEg8KB3JhZGl1c1gY",
"AyABKAISDwoHcmFkaXVzWRgEIAEoAhrQBAoKU2hhcGVTdHlsZRJDCgRmaWxs",
"GAEgASgLMjUuY29tLm9wZW5zb3VyY2Uuc3ZnYS5TaGFwZUVudGl0eS5TaGFw",
"ZVN0eWxlLlJHQkFDb2xvchJFCgZzdHJva2UYAiABKAsyNS5jb20ub3BlbnNv",
"dXJjZS5zdmdhLlNoYXBlRW50aXR5LlNoYXBlU3R5bGUuUkdCQUNvbG9yEhMK",
"C3N0cm9rZVdpZHRoGAMgASgCEkQKB2xpbmVDYXAYBCABKA4yMy5jb20ub3Bl",
"bnNvdXJjZS5zdmdhLlNoYXBlRW50aXR5LlNoYXBlU3R5bGUuTGluZUNhcBJG",
"CghsaW5lSm9pbhgFIAEoDjI0LmNvbS5vcGVuc291cmNlLnN2Z2EuU2hhcGVF",
"bnRpdHkuU2hhcGVTdHlsZS5MaW5lSm9pbhISCgptaXRlckxpbWl0GAYgASgC",
"EhEKCWxpbmVEYXNoSRgHIAEoAhISCgpsaW5lRGFzaElJGAggASgCEhMKC2xp",
"bmVEYXNoSUlJGAkgASgCGjcKCVJHQkFDb2xvchIJCgFyGAEgASgCEgkKAWcY",
"AiABKAISCQoBYhgDIAEoAhIJCgFhGAQgASgCIkIKB0xpbmVDYXASEAoMTGlu",
"ZUNhcF9CVVRUEAASEQoNTGluZUNhcF9ST1VORBABEhIKDkxpbmVDYXBfU1FV",
"QVJFEAIiRgoITGluZUpvaW4SEgoOTGluZUpvaW5fTUlURVIQABISCg5MaW5l",
"Sm9pbl9ST1VORBABEhIKDkxpbmVKb2luX0JFVkVMEAIiNwoJU2hhcGVUeXBl",
"EgkKBVNIQVBFEAASCAoEUkVDVBABEgsKB0VMTElQU0UQAhIICgRLRUVQEANC",
"BgoEYXJncyLAAQoLRnJhbWVFbnRpdHkSDQoFYWxwaGEYASABKAISKwoGbGF5",
"b3V0GAIgASgLMhsuY29tLm9wZW5zb3VyY2Uuc3ZnYS5MYXlvdXQSMQoJdHJh",
"bnNmb3JtGAMgASgLMh4uY29tLm9wZW5zb3VyY2Uuc3ZnYS5UcmFuc2Zvcm0S",
"EAoIY2xpcFBhdGgYBCABKAkSMAoGc2hhcGVzGAUgAygLMiAuY29tLm9wZW5z",
"b3VyY2Uuc3ZnYS5TaGFwZUVudGl0eSKjAgoLTW92aWVFbnRpdHkSDwoHdmVy",
"c2lvbhgBIAEoCRIwCgZwYXJhbXMYAiABKAsyIC5jb20ub3BlbnNvdXJjZS5z",
"dmdhLk1vdmllUGFyYW1zEjwKBmltYWdlcxgDIAMoCzIsLmNvbS5vcGVuc291",
"cmNlLnN2Z2EuTW92aWVFbnRpdHkuSW1hZ2VzRW50cnkSMgoHc3ByaXRlcxgE",
"IAMoCzIhLmNvbS5vcGVuc291cmNlLnN2Z2EuU3ByaXRlRW50aXR5EjAKBmF1",
"ZGlvcxgFIAMoCzIgLmNvbS5vcGVuc291cmNlLnN2Z2EuQXVkaW9FbnRpdHka",
"LQoLSW1hZ2VzRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgMOgI4",
"AUItCh9jb20ub3BlbnNvdXJjZS5zdmdhcGxheWVyLnByb3RvogIJU1ZHQVBy",
"b3RvYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Com.Opensource.Svga.MovieParams), global::Com.Opensource.Svga.MovieParams.Parser, new[]{ "ViewBoxWidth", "ViewBoxHeight", "Fps", "Frames" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Com.Opensource.Svga.SpriteEntity), global::Com.Opensource.Svga.SpriteEntity.Parser, new[]{ "ImageKey", "Frames" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Com.Opensource.Svga.AudioEntity), global::Com.Opensource.Svga.AudioEntity.Parser, new[]{ "AudioKey", "StartFrame", "EndFrame", "StartTime", "TotalTime" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Com.Opensource.Svga.Layout), global::Com.Opensource.Svga.Layout.Parser, new[]{ "X", "Y", "Width", "Height" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Com.Opensource.Svga.Transform), global::Com.Opensource.Svga.Transform.Parser, new[]{ "A", "B", "C", "D", "Tx", "Ty" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Com.Opensource.Svga.ShapeEntity), global::Com.Opensource.Svga.ShapeEntity.Parser, new[]{ "Type", "Shape", "Rect", "Ellipse", "Styles", "Transform" }, new[]{ "Args" }, new[]{ typeof(global::Com.Opensource.Svga.ShapeEntity.Types.ShapeType) }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Com.Opensource.Svga.ShapeEntity.Types.ShapeArgs), global::Com.Opensource.Svga.ShapeEntity.Types.ShapeArgs.Parser, new[]{ "D" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Com.Opensource.Svga.ShapeEntity.Types.RectArgs), global::Com.Opensource.Svga.ShapeEntity.Types.RectArgs.Parser, new[]{ "X", "Y", "Width", "Height", "CornerRadius" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Com.Opensource.Svga.ShapeEntity.Types.EllipseArgs), global::Com.Opensource.Svga.ShapeEntity.Types.EllipseArgs.Parser, new[]{ "X", "Y", "RadiusX", "RadiusY" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle), global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle.Parser, new[]{ "Fill", "Stroke", "StrokeWidth", "LineCap", "LineJoin", "MiterLimit", "LineDashI", "LineDashII", "LineDashIII" }, null, new[]{ typeof(global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle.Types.LineCap), typeof(global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle.Types.LineJoin) }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle.Types.RGBAColor), global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle.Types.RGBAColor.Parser, new[]{ "R", "G", "B", "A" }, null, null, null)})}),
new pbr::GeneratedClrTypeInfo(typeof(global::Com.Opensource.Svga.FrameEntity), global::Com.Opensource.Svga.FrameEntity.Parser, new[]{ "Alpha", "Layout", "Transform", "ClipPath", "Shapes" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Com.Opensource.Svga.MovieEntity), global::Com.Opensource.Svga.MovieEntity.Parser, new[]{ "Version", "Params", "Images", "Sprites", "Audios" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, })
}));
}
#endregion
}
#region Messages
public sealed partial class MovieParams : pb::IMessage<MovieParams>
{
private static readonly pb::MessageParser<MovieParams> _parser = new pb::MessageParser<MovieParams>(() => new MovieParams());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<MovieParams> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor
{
get { return global::Com.Opensource.Svga.SvgaReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor
{
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public MovieParams()
{
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public MovieParams(MovieParams other) : this()
{
viewBoxWidth_ = other.viewBoxWidth_;
viewBoxHeight_ = other.viewBoxHeight_;
fps_ = other.fps_;
frames_ = other.frames_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public MovieParams Clone()
{
return new MovieParams(this);
}
/// <summary>Field number for the "viewBoxWidth" field.</summary>
public const int ViewBoxWidthFieldNumber = 1;
private float viewBoxWidth_;
/// <summary>
/// 画布宽
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float ViewBoxWidth
{
get { return viewBoxWidth_; }
set
{
viewBoxWidth_ = value;
}
}
/// <summary>Field number for the "viewBoxHeight" field.</summary>
public const int ViewBoxHeightFieldNumber = 2;
private float viewBoxHeight_;
/// <summary>
/// 画布高
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float ViewBoxHeight
{
get { return viewBoxHeight_; }
set
{
viewBoxHeight_ = value;
}
}
/// <summary>Field number for the "fps" field.</summary>
public const int FpsFieldNumber = 3;
private int fps_;
/// <summary>
/// 动画每秒播放帧数,合法值是 [1, 2, 3, 5, 6, 10, 12, 15, 20, 30, 60] 中的任意一个。
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int Fps
{
get { return fps_; }
set
{
fps_ = value;
}
}
/// <summary>Field number for the "frames" field.</summary>
public const int FramesFieldNumber = 4;
private int frames_;
/// <summary>
/// 动画总帧数
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int Frames
{
get { return frames_; }
set
{
frames_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other)
{
return Equals(other as MovieParams);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(MovieParams other)
{
if (ReferenceEquals(other, null))
{
return false;
}
if (ReferenceEquals(other, this))
{
return true;
}
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ViewBoxWidth, other.ViewBoxWidth)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ViewBoxHeight, other.ViewBoxHeight)) return false;
if (Fps != other.Fps) return false;
if (Frames != other.Frames) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode()
{
int hash = 1;
if (ViewBoxWidth != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ViewBoxWidth);
if (ViewBoxHeight != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ViewBoxHeight);
if (Fps != 0) hash ^= Fps.GetHashCode();
if (Frames != 0) hash ^= Frames.GetHashCode();
if (_unknownFields != null)
{
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString()
{
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output)
{
if (ViewBoxWidth != 0F)
{
output.WriteRawTag(13);
output.WriteFloat(ViewBoxWidth);
}
if (ViewBoxHeight != 0F)
{
output.WriteRawTag(21);
output.WriteFloat(ViewBoxHeight);
}
if (Fps != 0)
{
output.WriteRawTag(24);
output.WriteInt32(Fps);
}
if (Frames != 0)
{
output.WriteRawTag(32);
output.WriteInt32(Frames);
}
if (_unknownFields != null)
{
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize()
{
int size = 0;
if (ViewBoxWidth != 0F)
{
size += 1 + 4;
}
if (ViewBoxHeight != 0F)
{
size += 1 + 4;
}
if (Fps != 0)
{
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Fps);
}
if (Frames != 0)
{
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Frames);
}
if (_unknownFields != null)
{
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(MovieParams other)
{
if (other == null)
{
return;
}
if (other.ViewBoxWidth != 0F)
{
ViewBoxWidth = other.ViewBoxWidth;
}
if (other.ViewBoxHeight != 0F)
{
ViewBoxHeight = other.ViewBoxHeight;
}
if (other.Fps != 0)
{
Fps = other.Fps;
}
if (other.Frames != 0)
{
Frames = other.Frames;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input)
{
uint tag;
while ((tag = input.ReadTag()) != 0)
{
switch (tag)
{
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 13:
{
ViewBoxWidth = input.ReadFloat();
break;
}
case 21:
{
ViewBoxHeight = input.ReadFloat();
break;
}
case 24:
{
Fps = input.ReadInt32();
break;
}
case 32:
{
Frames = input.ReadInt32();
break;
}
}
}
}
}
public sealed partial class SpriteEntity : pb::IMessage<SpriteEntity>
{
private static readonly pb::MessageParser<SpriteEntity> _parser = new pb::MessageParser<SpriteEntity>(() => new SpriteEntity());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<SpriteEntity> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor
{
get { return global::Com.Opensource.Svga.SvgaReflection.Descriptor.MessageTypes[1]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor
{
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public SpriteEntity()
{
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public SpriteEntity(SpriteEntity other) : this()
{
imageKey_ = other.imageKey_;
frames_ = other.frames_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public SpriteEntity Clone()
{
return new SpriteEntity(this);
}
/// <summary>Field number for the "imageKey" field.</summary>
public const int ImageKeyFieldNumber = 1;
private string imageKey_ = "";
/// <summary>
/// 元件所对应的位图键名, 如果 imageKey 含有 .vector 后缀,该 sprite 为矢量图层。
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string ImageKey
{
get { return imageKey_; }
set
{
imageKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "frames" field.</summary>
public const int FramesFieldNumber = 2;
private static readonly pb::FieldCodec<global::Com.Opensource.Svga.FrameEntity> _repeated_frames_codec
= pb::FieldCodec.ForMessage(18, global::Com.Opensource.Svga.FrameEntity.Parser);
private readonly pbc::RepeatedField<global::Com.Opensource.Svga.FrameEntity> frames_ = new pbc::RepeatedField<global::Com.Opensource.Svga.FrameEntity>();
/// <summary>
/// 帧列表
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Com.Opensource.Svga.FrameEntity> Frames
{
get { return frames_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other)
{
return Equals(other as SpriteEntity);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(SpriteEntity other)
{
if (ReferenceEquals(other, null))
{
return false;
}
if (ReferenceEquals(other, this))
{
return true;
}
if (ImageKey != other.ImageKey) return false;
if (!frames_.Equals(other.frames_)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode()
{
int hash = 1;
if (ImageKey.Length != 0) hash ^= ImageKey.GetHashCode();
hash ^= frames_.GetHashCode();
if (_unknownFields != null)
{
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString()
{
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output)
{
if (ImageKey.Length != 0)
{
output.WriteRawTag(10);
output.WriteString(ImageKey);
}
frames_.WriteTo(output, _repeated_frames_codec);
if (_unknownFields != null)
{
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize()
{
int size = 0;
if (ImageKey.Length != 0)
{
size += 1 + pb::CodedOutputStream.ComputeStringSize(ImageKey);
}
size += frames_.CalculateSize(_repeated_frames_codec);
if (_unknownFields != null)
{
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(SpriteEntity other)
{
if (other == null)
{
return;
}
if (other.ImageKey.Length != 0)
{
ImageKey = other.ImageKey;
}
frames_.Add(other.frames_);
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input)
{
uint tag;
while ((tag = input.ReadTag()) != 0)
{
switch (tag)
{
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10:
{
ImageKey = input.ReadString();
break;
}
case 18:
{
frames_.AddEntriesFrom(input, _repeated_frames_codec);
break;
}
}
}
}
}
public sealed partial class AudioEntity : pb::IMessage<AudioEntity>
{
private static readonly pb::MessageParser<AudioEntity> _parser = new pb::MessageParser<AudioEntity>(() => new AudioEntity());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<AudioEntity> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor
{
get { return global::Com.Opensource.Svga.SvgaReflection.Descriptor.MessageTypes[2]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor
{
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public AudioEntity()
{
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public AudioEntity(AudioEntity other) : this()
{
audioKey_ = other.audioKey_;
startFrame_ = other.startFrame_;
endFrame_ = other.endFrame_;
startTime_ = other.startTime_;
totalTime_ = other.totalTime_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public AudioEntity Clone()
{
return new AudioEntity(this);
}
/// <summary>Field number for the "audioKey" field.</summary>
public const int AudioKeyFieldNumber = 1;
private string audioKey_ = "";
/// <summary>
/// 音频文件名
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string AudioKey
{
get { return audioKey_; }
set
{
audioKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "startFrame" field.</summary>
public const int StartFrameFieldNumber = 2;
private int startFrame_;
/// <summary>
/// 音频播放起始帧
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int StartFrame
{
get { return startFrame_; }
set
{
startFrame_ = value;
}
}
/// <summary>Field number for the "endFrame" field.</summary>
public const int EndFrameFieldNumber = 3;
private int endFrame_;
/// <summary>
/// 音频播放结束帧
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int EndFrame
{
get { return endFrame_; }
set
{
endFrame_ = value;
}
}
/// <summary>Field number for the "startTime" field.</summary>
public const int StartTimeFieldNumber = 4;
private int startTime_;
/// <summary>
/// 音频播放起始时间(相对音频长度)
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int StartTime
{
get { return startTime_; }
set
{
startTime_ = value;
}
}
/// <summary>Field number for the "totalTime" field.</summary>
public const int TotalTimeFieldNumber = 5;
private int totalTime_;
/// <summary>
/// 音频总长度
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int TotalTime
{
get { return totalTime_; }
set
{
totalTime_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other)
{
return Equals(other as AudioEntity);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(AudioEntity other)
{
if (ReferenceEquals(other, null))
{
return false;
}
if (ReferenceEquals(other, this))
{
return true;
}
if (AudioKey != other.AudioKey) return false;
if (StartFrame != other.StartFrame) return false;
if (EndFrame != other.EndFrame) return false;
if (StartTime != other.StartTime) return false;
if (TotalTime != other.TotalTime) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode()
{
int hash = 1;
if (AudioKey.Length != 0) hash ^= AudioKey.GetHashCode();
if (StartFrame != 0) hash ^= StartFrame.GetHashCode();
if (EndFrame != 0) hash ^= EndFrame.GetHashCode();
if (StartTime != 0) hash ^= StartTime.GetHashCode();
if (TotalTime != 0) hash ^= TotalTime.GetHashCode();
if (_unknownFields != null)
{
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString()
{
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output)
{
if (AudioKey.Length != 0)
{
output.WriteRawTag(10);
output.WriteString(AudioKey);
}
if (StartFrame != 0)
{
output.WriteRawTag(16);
output.WriteInt32(StartFrame);
}
if (EndFrame != 0)
{
output.WriteRawTag(24);
output.WriteInt32(EndFrame);
}
if (StartTime != 0)
{
output.WriteRawTag(32);
output.WriteInt32(StartTime);
}
if (TotalTime != 0)
{
output.WriteRawTag(40);
output.WriteInt32(TotalTime);
}
if (_unknownFields != null)
{
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize()
{
int size = 0;
if (AudioKey.Length != 0)
{
size += 1 + pb::CodedOutputStream.ComputeStringSize(AudioKey);
}
if (StartFrame != 0)
{
size += 1 + pb::CodedOutputStream.ComputeInt32Size(StartFrame);
}
if (EndFrame != 0)
{
size += 1 + pb::CodedOutputStream.ComputeInt32Size(EndFrame);
}
if (StartTime != 0)
{
size += 1 + pb::CodedOutputStream.ComputeInt32Size(StartTime);
}
if (TotalTime != 0)
{
size += 1 + pb::CodedOutputStream.ComputeInt32Size(TotalTime);
}
if (_unknownFields != null)
{
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(AudioEntity other)
{
if (other == null)
{
return;
}
if (other.AudioKey.Length != 0)
{
AudioKey = other.AudioKey;
}
if (other.StartFrame != 0)
{
StartFrame = other.StartFrame;
}
if (other.EndFrame != 0)
{
EndFrame = other.EndFrame;
}
if (other.StartTime != 0)
{
StartTime = other.StartTime;
}
if (other.TotalTime != 0)
{
TotalTime = other.TotalTime;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input)
{
uint tag;
while ((tag = input.ReadTag()) != 0)
{
switch (tag)
{
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10:
{
AudioKey = input.ReadString();
break;
}
case 16:
{
StartFrame = input.ReadInt32();
break;
}
case 24:
{
EndFrame = input.ReadInt32();
break;
}
case 32:
{
StartTime = input.ReadInt32();
break;
}
case 40:
{
TotalTime = input.ReadInt32();
break;
}
}
}
}
}
public sealed partial class Layout : pb::IMessage<Layout>
{
private static readonly pb::MessageParser<Layout> _parser = new pb::MessageParser<Layout>(() => new Layout());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<Layout> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor
{
get { return global::Com.Opensource.Svga.SvgaReflection.Descriptor.MessageTypes[3]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor
{
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Layout()
{
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Layout(Layout other) : this()
{
x_ = other.x_;
y_ = other.y_;
width_ = other.width_;
height_ = other.height_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Layout Clone()
{
return new Layout(this);
}
/// <summary>Field number for the "x" field.</summary>
public const int XFieldNumber = 1;
private float x_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float X
{
get { return x_; }
set
{
x_ = value;
}
}
/// <summary>Field number for the "y" field.</summary>
public const int YFieldNumber = 2;
private float y_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float Y
{
get { return y_; }
set
{
y_ = value;
}
}
/// <summary>Field number for the "width" field.</summary>
public const int WidthFieldNumber = 3;
private float width_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float Width
{
get { return width_; }
set
{
width_ = value;
}
}
/// <summary>Field number for the "height" field.</summary>
public const int HeightFieldNumber = 4;
private float height_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float Height
{
get { return height_; }
set
{
height_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other)
{
return Equals(other as Layout);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(Layout other)
{
if (ReferenceEquals(other, null))
{
return false;
}
if (ReferenceEquals(other, this))
{
return true;
}
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(X, other.X)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Y, other.Y)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Width, other.Width)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Height, other.Height)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode()
{
int hash = 1;
if (X != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(X);
if (Y != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Y);
if (Width != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Width);
if (Height != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Height);
if (_unknownFields != null)
{
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString()
{
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output)
{
if (X != 0F)
{
output.WriteRawTag(13);
output.WriteFloat(X);
}
if (Y != 0F)
{
output.WriteRawTag(21);
output.WriteFloat(Y);
}
if (Width != 0F)
{
output.WriteRawTag(29);
output.WriteFloat(Width);
}
if (Height != 0F)
{
output.WriteRawTag(37);
output.WriteFloat(Height);
}
if (_unknownFields != null)
{
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize()
{
int size = 0;
if (X != 0F)
{
size += 1 + 4;
}
if (Y != 0F)
{
size += 1 + 4;
}
if (Width != 0F)
{
size += 1 + 4;
}
if (Height != 0F)
{
size += 1 + 4;
}
if (_unknownFields != null)
{
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(Layout other)
{
if (other == null)
{
return;
}
if (other.X != 0F)
{
X = other.X;
}
if (other.Y != 0F)
{
Y = other.Y;
}
if (other.Width != 0F)
{
Width = other.Width;
}
if (other.Height != 0F)
{
Height = other.Height;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input)
{
uint tag;
while ((tag = input.ReadTag()) != 0)
{
switch (tag)
{
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 13:
{
X = input.ReadFloat();
break;
}
case 21:
{
Y = input.ReadFloat();
break;
}
case 29:
{
Width = input.ReadFloat();
break;
}
case 37:
{
Height = input.ReadFloat();
break;
}
}
}
}
}
public sealed partial class Transform : pb::IMessage<Transform>
{
private static readonly pb::MessageParser<Transform> _parser = new pb::MessageParser<Transform>(() => new Transform());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<Transform> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor
{
get { return global::Com.Opensource.Svga.SvgaReflection.Descriptor.MessageTypes[4]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor
{
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Transform()
{
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Transform(Transform other) : this()
{
a_ = other.a_;
b_ = other.b_;
c_ = other.c_;
d_ = other.d_;
tx_ = other.tx_;
ty_ = other.ty_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Transform Clone()
{
return new Transform(this);
}
/// <summary>Field number for the "a" field.</summary>
public const int AFieldNumber = 1;
private float a_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float A
{
get { return a_; }
set
{
a_ = value;
}
}
/// <summary>Field number for the "b" field.</summary>
public const int BFieldNumber = 2;
private float b_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float B
{
get { return b_; }
set
{
b_ = value;
}
}
/// <summary>Field number for the "c" field.</summary>
public const int CFieldNumber = 3;
private float c_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float C
{
get { return c_; }
set
{
c_ = value;
}
}
/// <summary>Field number for the "d" field.</summary>
public const int DFieldNumber = 4;
private float d_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float D
{
get { return d_; }
set
{
d_ = value;
}
}
/// <summary>Field number for the "tx" field.</summary>
public const int TxFieldNumber = 5;
private float tx_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float Tx
{
get { return tx_; }
set
{
tx_ = value;
}
}
/// <summary>Field number for the "ty" field.</summary>
public const int TyFieldNumber = 6;
private float ty_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float Ty
{
get { return ty_; }
set
{
ty_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other)
{
return Equals(other as Transform);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(Transform other)
{
if (ReferenceEquals(other, null))
{
return false;
}
if (ReferenceEquals(other, this))
{
return true;
}
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(A, other.A)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(B, other.B)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(C, other.C)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(D, other.D)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Tx, other.Tx)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Ty, other.Ty)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode()
{
int hash = 1;
if (A != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(A);
if (B != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(B);
if (C != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(C);
if (D != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(D);
if (Tx != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Tx);
if (Ty != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Ty);
if (_unknownFields != null)
{
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString()
{
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output)
{
if (A != 0F)
{
output.WriteRawTag(13);
output.WriteFloat(A);
}
if (B != 0F)
{
output.WriteRawTag(21);
output.WriteFloat(B);
}
if (C != 0F)
{
output.WriteRawTag(29);
output.WriteFloat(C);
}
if (D != 0F)
{
output.WriteRawTag(37);
output.WriteFloat(D);
}
if (Tx != 0F)
{
output.WriteRawTag(45);
output.WriteFloat(Tx);
}
if (Ty != 0F)
{
output.WriteRawTag(53);
output.WriteFloat(Ty);
}
if (_unknownFields != null)
{
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize()
{
int size = 0;
if (A != 0F)
{
size += 1 + 4;
}
if (B != 0F)
{
size += 1 + 4;
}
if (C != 0F)
{
size += 1 + 4;
}
if (D != 0F)
{
size += 1 + 4;
}
if (Tx != 0F)
{
size += 1 + 4;
}
if (Ty != 0F)
{
size += 1 + 4;
}
if (_unknownFields != null)
{
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(Transform other)
{
if (other == null)
{
return;
}
if (other.A != 0F)
{
A = other.A;
}
if (other.B != 0F)
{
B = other.B;
}
if (other.C != 0F)
{
C = other.C;
}
if (other.D != 0F)
{
D = other.D;
}
if (other.Tx != 0F)
{
Tx = other.Tx;
}
if (other.Ty != 0F)
{
Ty = other.Ty;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input)
{
uint tag;
while ((tag = input.ReadTag()) != 0)
{
switch (tag)
{
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 13:
{
A = input.ReadFloat();
break;
}
case 21:
{
B = input.ReadFloat();
break;
}
case 29:
{
C = input.ReadFloat();
break;
}
case 37:
{
D = input.ReadFloat();
break;
}
case 45:
{
Tx = input.ReadFloat();
break;
}
case 53:
{
Ty = input.ReadFloat();
break;
}
}
}
}
}
public sealed partial class ShapeEntity : pb::IMessage<ShapeEntity>
{
private static readonly pb::MessageParser<ShapeEntity> _parser = new pb::MessageParser<ShapeEntity>(() => new ShapeEntity());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<ShapeEntity> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor
{
get { return global::Com.Opensource.Svga.SvgaReflection.Descriptor.MessageTypes[5]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor
{
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ShapeEntity()
{
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ShapeEntity(ShapeEntity other) : this()
{
type_ = other.type_;
styles_ = other.styles_ != null ? other.styles_.Clone() : null;
transform_ = other.transform_ != null ? other.transform_.Clone() : null;
switch (other.ArgsCase)
{
case ArgsOneofCase.Shape:
Shape = other.Shape.Clone();
break;
case ArgsOneofCase.Rect:
Rect = other.Rect.Clone();
break;
case ArgsOneofCase.Ellipse:
Ellipse = other.Ellipse.Clone();
break;
}
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ShapeEntity Clone()
{
return new ShapeEntity(this);
}
/// <summary>Field number for the "type" field.</summary>
public const int TypeFieldNumber = 1;
private global::Com.Opensource.Svga.ShapeEntity.Types.ShapeType type_ = 0;
/// <summary>
/// 矢量类型
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Com.Opensource.Svga.ShapeEntity.Types.ShapeType Type
{
get { return type_; }
set
{
type_ = value;
}
}
/// <summary>Field number for the "shape" field.</summary>
public const int ShapeFieldNumber = 2;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Com.Opensource.Svga.ShapeEntity.Types.ShapeArgs Shape
{
get { return argsCase_ == ArgsOneofCase.Shape ? (global::Com.Opensource.Svga.ShapeEntity.Types.ShapeArgs)args_ : null; }
set
{
args_ = value;
argsCase_ = value == null ? ArgsOneofCase.None : ArgsOneofCase.Shape;
}
}
/// <summary>Field number for the "rect" field.</summary>
public const int RectFieldNumber = 3;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Com.Opensource.Svga.ShapeEntity.Types.RectArgs Rect
{
get { return argsCase_ == ArgsOneofCase.Rect ? (global::Com.Opensource.Svga.ShapeEntity.Types.RectArgs)args_ : null; }
set
{
args_ = value;
argsCase_ = value == null ? ArgsOneofCase.None : ArgsOneofCase.Rect;
}
}
/// <summary>Field number for the "ellipse" field.</summary>
public const int EllipseFieldNumber = 4;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Com.Opensource.Svga.ShapeEntity.Types.EllipseArgs Ellipse
{
get { return argsCase_ == ArgsOneofCase.Ellipse ? (global::Com.Opensource.Svga.ShapeEntity.Types.EllipseArgs)args_ : null; }
set
{
args_ = value;
argsCase_ = value == null ? ArgsOneofCase.None : ArgsOneofCase.Ellipse;
}
}
/// <summary>Field number for the "styles" field.</summary>
public const int StylesFieldNumber = 10;
private global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle styles_;
/// <summary>
/// 渲染参数
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle Styles
{
get { return styles_; }
set
{
styles_ = value;
}
}
/// <summary>Field number for the "transform" field.</summary>
public const int TransformFieldNumber = 11;
private global::Com.Opensource.Svga.Transform transform_;
/// <summary>
/// 矢量图层 2D 变换矩阵
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Com.Opensource.Svga.Transform Transform
{
get { return transform_; }
set
{
transform_ = value;
}
}
private object args_;
/// <summary>Enum of possible cases for the "args" oneof.</summary>
public enum ArgsOneofCase
{
None = 0,
Shape = 2,
Rect = 3,
Ellipse = 4,
}
private ArgsOneofCase argsCase_ = ArgsOneofCase.None;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ArgsOneofCase ArgsCase
{
get { return argsCase_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void ClearArgs()
{
argsCase_ = ArgsOneofCase.None;
args_ = null;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other)
{
return Equals(other as ShapeEntity);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(ShapeEntity other)
{
if (ReferenceEquals(other, null))
{
return false;
}
if (ReferenceEquals(other, this))
{
return true;
}
if (Type != other.Type) return false;
if (!object.Equals(Shape, other.Shape)) return false;
if (!object.Equals(Rect, other.Rect)) return false;
if (!object.Equals(Ellipse, other.Ellipse)) return false;
if (!object.Equals(Styles, other.Styles)) return false;
if (!object.Equals(Transform, other.Transform)) return false;
if (ArgsCase != other.ArgsCase) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode()
{
int hash = 1;
if (Type != 0) hash ^= Type.GetHashCode();
if (argsCase_ == ArgsOneofCase.Shape) hash ^= Shape.GetHashCode();
if (argsCase_ == ArgsOneofCase.Rect) hash ^= Rect.GetHashCode();
if (argsCase_ == ArgsOneofCase.Ellipse) hash ^= Ellipse.GetHashCode();
if (styles_ != null) hash ^= Styles.GetHashCode();
if (transform_ != null) hash ^= Transform.GetHashCode();
hash ^= (int)argsCase_;
if (_unknownFields != null)
{
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString()
{
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output)
{
if (Type != 0)
{
output.WriteRawTag(8);
output.WriteEnum((int)Type);
}
if (argsCase_ == ArgsOneofCase.Shape)
{
output.WriteRawTag(18);
output.WriteMessage(Shape);
}
if (argsCase_ == ArgsOneofCase.Rect)
{
output.WriteRawTag(26);
output.WriteMessage(Rect);
}
if (argsCase_ == ArgsOneofCase.Ellipse)
{
output.WriteRawTag(34);
output.WriteMessage(Ellipse);
}
if (styles_ != null)
{
output.WriteRawTag(82);
output.WriteMessage(Styles);
}
if (transform_ != null)
{
output.WriteRawTag(90);
output.WriteMessage(Transform);
}
if (_unknownFields != null)
{
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize()
{
int size = 0;
if (Type != 0)
{
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)Type);
}
if (argsCase_ == ArgsOneofCase.Shape)
{
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Shape);
}
if (argsCase_ == ArgsOneofCase.Rect)
{
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Rect);
}
if (argsCase_ == ArgsOneofCase.Ellipse)
{
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Ellipse);
}
if (styles_ != null)
{
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Styles);
}
if (transform_ != null)
{
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Transform);
}
if (_unknownFields != null)
{
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(ShapeEntity other)
{
if (other == null)
{
return;
}
if (other.Type != 0)
{
Type = other.Type;
}
if (other.styles_ != null)
{
if (styles_ == null)
{
styles_ = new global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle();
}
Styles.MergeFrom(other.Styles);
}
if (other.transform_ != null)
{
if (transform_ == null)
{
transform_ = new global::Com.Opensource.Svga.Transform();
}
Transform.MergeFrom(other.Transform);
}
switch (other.ArgsCase)
{
case ArgsOneofCase.Shape:
if (Shape == null)
{
Shape = new global::Com.Opensource.Svga.ShapeEntity.Types.ShapeArgs();
}
Shape.MergeFrom(other.Shape);
break;
case ArgsOneofCase.Rect:
if (Rect == null)
{
Rect = new global::Com.Opensource.Svga.ShapeEntity.Types.RectArgs();
}
Rect.MergeFrom(other.Rect);
break;
case ArgsOneofCase.Ellipse:
if (Ellipse == null)
{
Ellipse = new global::Com.Opensource.Svga.ShapeEntity.Types.EllipseArgs();
}
Ellipse.MergeFrom(other.Ellipse);
break;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input)
{
uint tag;
while ((tag = input.ReadTag()) != 0)
{
switch (tag)
{
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 8:
{
type_ = (global::Com.Opensource.Svga.ShapeEntity.Types.ShapeType)input.ReadEnum();
break;
}
case 18:
{
global::Com.Opensource.Svga.ShapeEntity.Types.ShapeArgs subBuilder = new global::Com.Opensource.Svga.ShapeEntity.Types.ShapeArgs();
if (argsCase_ == ArgsOneofCase.Shape)
{
subBuilder.MergeFrom(Shape);
}
input.ReadMessage(subBuilder);
Shape = subBuilder;
break;
}
case 26:
{
global::Com.Opensource.Svga.ShapeEntity.Types.RectArgs subBuilder = new global::Com.Opensource.Svga.ShapeEntity.Types.RectArgs();
if (argsCase_ == ArgsOneofCase.Rect)
{
subBuilder.MergeFrom(Rect);
}
input.ReadMessage(subBuilder);
Rect = subBuilder;
break;
}
case 34:
{
global::Com.Opensource.Svga.ShapeEntity.Types.EllipseArgs subBuilder = new global::Com.Opensource.Svga.ShapeEntity.Types.EllipseArgs();
if (argsCase_ == ArgsOneofCase.Ellipse)
{
subBuilder.MergeFrom(Ellipse);
}
input.ReadMessage(subBuilder);
Ellipse = subBuilder;
break;
}
case 82:
{
if (styles_ == null)
{
styles_ = new global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle();
}
input.ReadMessage(styles_);
break;
}
case 90:
{
if (transform_ == null)
{
transform_ = new global::Com.Opensource.Svga.Transform();
}
input.ReadMessage(transform_);
break;
}
}
}
}
#region Nested types
/// <summary>Container for nested types declared in the ShapeEntity message type.</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static partial class Types
{
public enum ShapeType
{
/// <summary>
/// 路径
/// </summary>
[pbr::OriginalName("SHAPE")] Shape = 0,
/// <summary>
/// 矩形
/// </summary>
[pbr::OriginalName("RECT")] Rect = 1,
/// <summary>
/// 圆形
/// </summary>
[pbr::OriginalName("ELLIPSE")] Ellipse = 2,
/// <summary>
/// 与前帧一致
/// </summary>
[pbr::OriginalName("KEEP")] Keep = 3,
}
public sealed partial class ShapeArgs : pb::IMessage<ShapeArgs>
{
private static readonly pb::MessageParser<ShapeArgs> _parser = new pb::MessageParser<ShapeArgs>(() => new ShapeArgs());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<ShapeArgs> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor
{
get { return global::Com.Opensource.Svga.ShapeEntity.Descriptor.NestedTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor
{
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ShapeArgs()
{
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ShapeArgs(ShapeArgs other) : this()
{
d_ = other.d_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ShapeArgs Clone()
{
return new ShapeArgs(this);
}
/// <summary>Field number for the "d" field.</summary>
public const int DFieldNumber = 1;
private string d_ = "";
/// <summary>
/// SVG 路径
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string D
{
get { return d_; }
set
{
d_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other)
{
return Equals(other as ShapeArgs);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(ShapeArgs other)
{
if (ReferenceEquals(other, null))
{
return false;
}
if (ReferenceEquals(other, this))
{
return true;
}
if (D != other.D) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode()
{
int hash = 1;
if (D.Length != 0) hash ^= D.GetHashCode();
if (_unknownFields != null)
{
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString()
{
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output)
{
if (D.Length != 0)
{
output.WriteRawTag(10);
output.WriteString(D);
}
if (_unknownFields != null)
{
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize()
{
int size = 0;
if (D.Length != 0)
{
size += 1 + pb::CodedOutputStream.ComputeStringSize(D);
}
if (_unknownFields != null)
{
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(ShapeArgs other)
{
if (other == null)
{
return;
}
if (other.D.Length != 0)
{
D = other.D;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input)
{
uint tag;
while ((tag = input.ReadTag()) != 0)
{
switch (tag)
{
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10:
{
D = input.ReadString();
break;
}
}
}
}
}
public sealed partial class RectArgs : pb::IMessage<RectArgs>
{
private static readonly pb::MessageParser<RectArgs> _parser = new pb::MessageParser<RectArgs>(() => new RectArgs());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<RectArgs> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor
{
get { return global::Com.Opensource.Svga.ShapeEntity.Descriptor.NestedTypes[1]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor
{
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public RectArgs()
{
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public RectArgs(RectArgs other) : this()
{
x_ = other.x_;
y_ = other.y_;
width_ = other.width_;
height_ = other.height_;
cornerRadius_ = other.cornerRadius_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public RectArgs Clone()
{
return new RectArgs(this);
}
/// <summary>Field number for the "x" field.</summary>
public const int XFieldNumber = 1;
private float x_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float X
{
get { return x_; }
set
{
x_ = value;
}
}
/// <summary>Field number for the "y" field.</summary>
public const int YFieldNumber = 2;
private float y_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float Y
{
get { return y_; }
set
{
y_ = value;
}
}
/// <summary>Field number for the "width" field.</summary>
public const int WidthFieldNumber = 3;
private float width_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float Width
{
get { return width_; }
set
{
width_ = value;
}
}
/// <summary>Field number for the "height" field.</summary>
public const int HeightFieldNumber = 4;
private float height_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float Height
{
get { return height_; }
set
{
height_ = value;
}
}
/// <summary>Field number for the "cornerRadius" field.</summary>
public const int CornerRadiusFieldNumber = 5;
private float cornerRadius_;
/// <summary>
/// 圆角半径
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float CornerRadius
{
get { return cornerRadius_; }
set
{
cornerRadius_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other)
{
return Equals(other as RectArgs);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(RectArgs other)
{
if (ReferenceEquals(other, null))
{
return false;
}
if (ReferenceEquals(other, this))
{
return true;
}
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(X, other.X)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Y, other.Y)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Width, other.Width)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Height, other.Height)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(CornerRadius, other.CornerRadius)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode()
{
int hash = 1;
if (X != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(X);
if (Y != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Y);
if (Width != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Width);
if (Height != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Height);
if (CornerRadius != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(CornerRadius);
if (_unknownFields != null)
{
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString()
{
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output)
{
if (X != 0F)
{
output.WriteRawTag(13);
output.WriteFloat(X);
}
if (Y != 0F)
{
output.WriteRawTag(21);
output.WriteFloat(Y);
}
if (Width != 0F)
{
output.WriteRawTag(29);
output.WriteFloat(Width);
}
if (Height != 0F)
{
output.WriteRawTag(37);
output.WriteFloat(Height);
}
if (CornerRadius != 0F)
{
output.WriteRawTag(45);
output.WriteFloat(CornerRadius);
}
if (_unknownFields != null)
{
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize()
{
int size = 0;
if (X != 0F)
{
size += 1 + 4;
}
if (Y != 0F)
{
size += 1 + 4;
}
if (Width != 0F)
{
size += 1 + 4;
}
if (Height != 0F)
{
size += 1 + 4;
}
if (CornerRadius != 0F)
{
size += 1 + 4;
}
if (_unknownFields != null)
{
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(RectArgs other)
{
if (other == null)
{
return;
}
if (other.X != 0F)
{
X = other.X;
}
if (other.Y != 0F)
{
Y = other.Y;
}
if (other.Width != 0F)
{
Width = other.Width;
}
if (other.Height != 0F)
{
Height = other.Height;
}
if (other.CornerRadius != 0F)
{
CornerRadius = other.CornerRadius;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input)
{
uint tag;
while ((tag = input.ReadTag()) != 0)
{
switch (tag)
{
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 13:
{
X = input.ReadFloat();
break;
}
case 21:
{
Y = input.ReadFloat();
break;
}
case 29:
{
Width = input.ReadFloat();
break;
}
case 37:
{
Height = input.ReadFloat();
break;
}
case 45:
{
CornerRadius = input.ReadFloat();
break;
}
}
}
}
}
public sealed partial class EllipseArgs : pb::IMessage<EllipseArgs>
{
private static readonly pb::MessageParser<EllipseArgs> _parser = new pb::MessageParser<EllipseArgs>(() => new EllipseArgs());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<EllipseArgs> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor
{
get { return global::Com.Opensource.Svga.ShapeEntity.Descriptor.NestedTypes[2]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor
{
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public EllipseArgs()
{
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public EllipseArgs(EllipseArgs other) : this()
{
x_ = other.x_;
y_ = other.y_;
radiusX_ = other.radiusX_;
radiusY_ = other.radiusY_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public EllipseArgs Clone()
{
return new EllipseArgs(this);
}
/// <summary>Field number for the "x" field.</summary>
public const int XFieldNumber = 1;
private float x_;
/// <summary>
/// 圆中心点 X
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float X
{
get { return x_; }
set
{
x_ = value;
}
}
/// <summary>Field number for the "y" field.</summary>
public const int YFieldNumber = 2;
private float y_;
/// <summary>
/// 圆中心点 Y
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float Y
{
get { return y_; }
set
{
y_ = value;
}
}
/// <summary>Field number for the "radiusX" field.</summary>
public const int RadiusXFieldNumber = 3;
private float radiusX_;
/// <summary>
/// 横向半径
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float RadiusX
{
get { return radiusX_; }
set
{
radiusX_ = value;
}
}
/// <summary>Field number for the "radiusY" field.</summary>
public const int RadiusYFieldNumber = 4;
private float radiusY_;
/// <summary>
/// 纵向半径
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float RadiusY
{
get { return radiusY_; }
set
{
radiusY_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other)
{
return Equals(other as EllipseArgs);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(EllipseArgs other)
{
if (ReferenceEquals(other, null))
{
return false;
}
if (ReferenceEquals(other, this))
{
return true;
}
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(X, other.X)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Y, other.Y)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(RadiusX, other.RadiusX)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(RadiusY, other.RadiusY)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode()
{
int hash = 1;
if (X != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(X);
if (Y != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Y);
if (RadiusX != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(RadiusX);
if (RadiusY != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(RadiusY);
if (_unknownFields != null)
{
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString()
{
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output)
{
if (X != 0F)
{
output.WriteRawTag(13);
output.WriteFloat(X);
}
if (Y != 0F)
{
output.WriteRawTag(21);
output.WriteFloat(Y);
}
if (RadiusX != 0F)
{
output.WriteRawTag(29);
output.WriteFloat(RadiusX);
}
if (RadiusY != 0F)
{
output.WriteRawTag(37);
output.WriteFloat(RadiusY);
}
if (_unknownFields != null)
{
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize()
{
int size = 0;
if (X != 0F)
{
size += 1 + 4;
}
if (Y != 0F)
{
size += 1 + 4;
}
if (RadiusX != 0F)
{
size += 1 + 4;
}
if (RadiusY != 0F)
{
size += 1 + 4;
}
if (_unknownFields != null)
{
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(EllipseArgs other)
{
if (other == null)
{
return;
}
if (other.X != 0F)
{
X = other.X;
}
if (other.Y != 0F)
{
Y = other.Y;
}
if (other.RadiusX != 0F)
{
RadiusX = other.RadiusX;
}
if (other.RadiusY != 0F)
{
RadiusY = other.RadiusY;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input)
{
uint tag;
while ((tag = input.ReadTag()) != 0)
{
switch (tag)
{
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 13:
{
X = input.ReadFloat();
break;
}
case 21:
{
Y = input.ReadFloat();
break;
}
case 29:
{
RadiusX = input.ReadFloat();
break;
}
case 37:
{
RadiusY = input.ReadFloat();
break;
}
}
}
}
}
public sealed partial class ShapeStyle : pb::IMessage<ShapeStyle>
{
private static readonly pb::MessageParser<ShapeStyle> _parser = new pb::MessageParser<ShapeStyle>(() => new ShapeStyle());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<ShapeStyle> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor
{
get { return global::Com.Opensource.Svga.ShapeEntity.Descriptor.NestedTypes[3]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor
{
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ShapeStyle()
{
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ShapeStyle(ShapeStyle other) : this()
{
fill_ = other.fill_ != null ? other.fill_.Clone() : null;
stroke_ = other.stroke_ != null ? other.stroke_.Clone() : null;
strokeWidth_ = other.strokeWidth_;
lineCap_ = other.lineCap_;
lineJoin_ = other.lineJoin_;
miterLimit_ = other.miterLimit_;
lineDashI_ = other.lineDashI_;
lineDashII_ = other.lineDashII_;
lineDashIII_ = other.lineDashIII_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ShapeStyle Clone()
{
return new ShapeStyle(this);
}
/// <summary>Field number for the "fill" field.</summary>
public const int FillFieldNumber = 1;
private global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle.Types.RGBAColor fill_;
/// <summary>
/// 填充色
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle.Types.RGBAColor Fill
{
get { return fill_; }
set
{
fill_ = value;
}
}
/// <summary>Field number for the "stroke" field.</summary>
public const int StrokeFieldNumber = 2;
private global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle.Types.RGBAColor stroke_;
/// <summary>
/// 描边色
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle.Types.RGBAColor Stroke
{
get { return stroke_; }
set
{
stroke_ = value;
}
}
/// <summary>Field number for the "strokeWidth" field.</summary>
public const int StrokeWidthFieldNumber = 3;
private float strokeWidth_;
/// <summary>
/// 描边宽
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float StrokeWidth
{
get { return strokeWidth_; }
set
{
strokeWidth_ = value;
}
}
/// <summary>Field number for the "lineCap" field.</summary>
public const int LineCapFieldNumber = 4;
private global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle.Types.LineCap lineCap_ = 0;
/// <summary>
/// 线段端点样式
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle.Types.LineCap LineCap
{
get { return lineCap_; }
set
{
lineCap_ = value;
}
}
/// <summary>Field number for the "lineJoin" field.</summary>
public const int LineJoinFieldNumber = 5;
private global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle.Types.LineJoin lineJoin_ = 0;
/// <summary>
/// 线段连接样式
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle.Types.LineJoin LineJoin
{
get { return lineJoin_; }
set
{
lineJoin_ = value;
}
}
/// <summary>Field number for the "miterLimit" field.</summary>
public const int MiterLimitFieldNumber = 6;
private float miterLimit_;
/// <summary>
/// 尖角限制
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float MiterLimit
{
get { return miterLimit_; }
set
{
miterLimit_ = value;
}
}
/// <summary>Field number for the "lineDashI" field.</summary>
public const int LineDashIFieldNumber = 7;
private float lineDashI_;
/// <summary>
/// 虚线参数 Dash
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float LineDashI
{
get { return lineDashI_; }
set
{
lineDashI_ = value;
}
}
/// <summary>Field number for the "lineDashII" field.</summary>
public const int LineDashIIFieldNumber = 8;
private float lineDashII_;
/// <summary>
/// 虚线参数 Gap
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float LineDashII
{
get { return lineDashII_; }
set
{
lineDashII_ = value;
}
}
/// <summary>Field number for the "lineDashIII" field.</summary>
public const int LineDashIIIFieldNumber = 9;
private float lineDashIII_;
/// <summary>
/// 虚线参数 Offset
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float LineDashIII
{
get { return lineDashIII_; }
set
{
lineDashIII_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other)
{
return Equals(other as ShapeStyle);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(ShapeStyle other)
{
if (ReferenceEquals(other, null))
{
return false;
}
if (ReferenceEquals(other, this))
{
return true;
}
if (!object.Equals(Fill, other.Fill)) return false;
if (!object.Equals(Stroke, other.Stroke)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(StrokeWidth, other.StrokeWidth)) return false;
if (LineCap != other.LineCap) return false;
if (LineJoin != other.LineJoin) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MiterLimit, other.MiterLimit)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(LineDashI, other.LineDashI)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(LineDashII, other.LineDashII)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(LineDashIII, other.LineDashIII)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode()
{
int hash = 1;
if (fill_ != null) hash ^= Fill.GetHashCode();
if (stroke_ != null) hash ^= Stroke.GetHashCode();
if (StrokeWidth != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(StrokeWidth);
if (LineCap != 0) hash ^= LineCap.GetHashCode();
if (LineJoin != 0) hash ^= LineJoin.GetHashCode();
if (MiterLimit != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MiterLimit);
if (LineDashI != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(LineDashI);
if (LineDashII != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(LineDashII);
if (LineDashIII != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(LineDashIII);
if (_unknownFields != null)
{
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString()
{
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output)
{
if (fill_ != null)
{
output.WriteRawTag(10);
output.WriteMessage(Fill);
}
if (stroke_ != null)
{
output.WriteRawTag(18);
output.WriteMessage(Stroke);
}
if (StrokeWidth != 0F)
{
output.WriteRawTag(29);
output.WriteFloat(StrokeWidth);
}
if (LineCap != 0)
{
output.WriteRawTag(32);
output.WriteEnum((int)LineCap);
}
if (LineJoin != 0)
{
output.WriteRawTag(40);
output.WriteEnum((int)LineJoin);
}
if (MiterLimit != 0F)
{
output.WriteRawTag(53);
output.WriteFloat(MiterLimit);
}
if (LineDashI != 0F)
{
output.WriteRawTag(61);
output.WriteFloat(LineDashI);
}
if (LineDashII != 0F)
{
output.WriteRawTag(69);
output.WriteFloat(LineDashII);
}
if (LineDashIII != 0F)
{
output.WriteRawTag(77);
output.WriteFloat(LineDashIII);
}
if (_unknownFields != null)
{
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize()
{
int size = 0;
if (fill_ != null)
{
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Fill);
}
if (stroke_ != null)
{
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Stroke);
}
if (StrokeWidth != 0F)
{
size += 1 + 4;
}
if (LineCap != 0)
{
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)LineCap);
}
if (LineJoin != 0)
{
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int)LineJoin);
}
if (MiterLimit != 0F)
{
size += 1 + 4;
}
if (LineDashI != 0F)
{
size += 1 + 4;
}
if (LineDashII != 0F)
{
size += 1 + 4;
}
if (LineDashIII != 0F)
{
size += 1 + 4;
}
if (_unknownFields != null)
{
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(ShapeStyle other)
{
if (other == null)
{
return;
}
if (other.fill_ != null)
{
if (fill_ == null)
{
fill_ = new global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle.Types.RGBAColor();
}
Fill.MergeFrom(other.Fill);
}
if (other.stroke_ != null)
{
if (stroke_ == null)
{
stroke_ = new global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle.Types.RGBAColor();
}
Stroke.MergeFrom(other.Stroke);
}
if (other.StrokeWidth != 0F)
{
StrokeWidth = other.StrokeWidth;
}
if (other.LineCap != 0)
{
LineCap = other.LineCap;
}
if (other.LineJoin != 0)
{
LineJoin = other.LineJoin;
}
if (other.MiterLimit != 0F)
{
MiterLimit = other.MiterLimit;
}
if (other.LineDashI != 0F)
{
LineDashI = other.LineDashI;
}
if (other.LineDashII != 0F)
{
LineDashII = other.LineDashII;
}
if (other.LineDashIII != 0F)
{
LineDashIII = other.LineDashIII;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input)
{
uint tag;
while ((tag = input.ReadTag()) != 0)
{
switch (tag)
{
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10:
{
if (fill_ == null)
{
fill_ = new global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle.Types.RGBAColor();
}
input.ReadMessage(fill_);
break;
}
case 18:
{
if (stroke_ == null)
{
stroke_ = new global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle.Types.RGBAColor();
}
input.ReadMessage(stroke_);
break;
}
case 29:
{
StrokeWidth = input.ReadFloat();
break;
}
case 32:
{
lineCap_ = (global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle.Types.LineCap)input.ReadEnum();
break;
}
case 40:
{
lineJoin_ = (global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle.Types.LineJoin)input.ReadEnum();
break;
}
case 53:
{
MiterLimit = input.ReadFloat();
break;
}
case 61:
{
LineDashI = input.ReadFloat();
break;
}
case 69:
{
LineDashII = input.ReadFloat();
break;
}
case 77:
{
LineDashIII = input.ReadFloat();
break;
}
}
}
}
#region Nested types
/// <summary>Container for nested types declared in the ShapeStyle message type.</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static partial class Types
{
public enum LineCap
{
[pbr::OriginalName("LineCap_BUTT")] Butt = 0,
[pbr::OriginalName("LineCap_ROUND")] Round = 1,
[pbr::OriginalName("LineCap_SQUARE")] Square = 2,
}
public enum LineJoin
{
[pbr::OriginalName("LineJoin_MITER")] Miter = 0,
[pbr::OriginalName("LineJoin_ROUND")] Round = 1,
[pbr::OriginalName("LineJoin_BEVEL")] Bevel = 2,
}
public sealed partial class RGBAColor : pb::IMessage<RGBAColor>
{
private static readonly pb::MessageParser<RGBAColor> _parser = new pb::MessageParser<RGBAColor>(() => new RGBAColor());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<RGBAColor> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor
{
get { return global::Com.Opensource.Svga.ShapeEntity.Types.ShapeStyle.Descriptor.NestedTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor
{
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public RGBAColor()
{
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public RGBAColor(RGBAColor other) : this()
{
r_ = other.r_;
g_ = other.g_;
b_ = other.b_;
a_ = other.a_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public RGBAColor Clone()
{
return new RGBAColor(this);
}
/// <summary>Field number for the "r" field.</summary>
public const int RFieldNumber = 1;
private float r_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float R
{
get { return r_; }
set
{
r_ = value;
}
}
/// <summary>Field number for the "g" field.</summary>
public const int GFieldNumber = 2;
private float g_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float G
{
get { return g_; }
set
{
g_ = value;
}
}
/// <summary>Field number for the "b" field.</summary>
public const int BFieldNumber = 3;
private float b_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float B
{
get { return b_; }
set
{
b_ = value;
}
}
/// <summary>Field number for the "a" field.</summary>
public const int AFieldNumber = 4;
private float a_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float A
{
get { return a_; }
set
{
a_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other)
{
return Equals(other as RGBAColor);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(RGBAColor other)
{
if (ReferenceEquals(other, null))
{
return false;
}
if (ReferenceEquals(other, this))
{
return true;
}
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(R, other.R)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(G, other.G)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(B, other.B)) return false;
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(A, other.A)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode()
{
int hash = 1;
if (R != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(R);
if (G != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(G);
if (B != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(B);
if (A != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(A);
if (_unknownFields != null)
{
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString()
{
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output)
{
if (R != 0F)
{
output.WriteRawTag(13);
output.WriteFloat(R);
}
if (G != 0F)
{
output.WriteRawTag(21);
output.WriteFloat(G);
}
if (B != 0F)
{
output.WriteRawTag(29);
output.WriteFloat(B);
}
if (A != 0F)
{
output.WriteRawTag(37);
output.WriteFloat(A);
}
if (_unknownFields != null)
{
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize()
{
int size = 0;
if (R != 0F)
{
size += 1 + 4;
}
if (G != 0F)
{
size += 1 + 4;
}
if (B != 0F)
{
size += 1 + 4;
}
if (A != 0F)
{
size += 1 + 4;
}
if (_unknownFields != null)
{
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(RGBAColor other)
{
if (other == null)
{
return;
}
if (other.R != 0F)
{
R = other.R;
}
if (other.G != 0F)
{
G = other.G;
}
if (other.B != 0F)
{
B = other.B;
}
if (other.A != 0F)
{
A = other.A;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input)
{
uint tag;
while ((tag = input.ReadTag()) != 0)
{
switch (tag)
{
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 13:
{
R = input.ReadFloat();
break;
}
case 21:
{
G = input.ReadFloat();
break;
}
case 29:
{
B = input.ReadFloat();
break;
}
case 37:
{
A = input.ReadFloat();
break;
}
}
}
}
}
}
#endregion
}
}
#endregion
}
public sealed partial class FrameEntity : pb::IMessage<FrameEntity>
{
private static readonly pb::MessageParser<FrameEntity> _parser = new pb::MessageParser<FrameEntity>(() => new FrameEntity());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<FrameEntity> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor
{
get { return global::Com.Opensource.Svga.SvgaReflection.Descriptor.MessageTypes[6]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor
{
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public FrameEntity()
{
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public FrameEntity(FrameEntity other) : this()
{
alpha_ = other.alpha_;
layout_ = other.layout_ != null ? other.layout_.Clone() : null;
transform_ = other.transform_ != null ? other.transform_.Clone() : null;
clipPath_ = other.clipPath_;
shapes_ = other.shapes_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public FrameEntity Clone()
{
return new FrameEntity(this);
}
/// <summary>Field number for the "alpha" field.</summary>
public const int AlphaFieldNumber = 1;
private float alpha_;
/// <summary>
/// 透明度
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float Alpha
{
get { return alpha_; }
set
{
alpha_ = value;
}
}
/// <summary>Field number for the "layout" field.</summary>
public const int LayoutFieldNumber = 2;
private global::Com.Opensource.Svga.Layout layout_;
/// <summary>
/// 初始约束大小
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Com.Opensource.Svga.Layout Layout
{
get { return layout_; }
set
{
layout_ = value;
}
}
/// <summary>Field number for the "transform" field.</summary>
public const int TransformFieldNumber = 3;
private global::Com.Opensource.Svga.Transform transform_;
/// <summary>
/// 2D 变换矩阵
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Com.Opensource.Svga.Transform Transform
{
get { return transform_; }
set
{
transform_ = value;
}
}
/// <summary>Field number for the "clipPath" field.</summary>
public const int ClipPathFieldNumber = 4;
private string clipPath_ = "";
/// <summary>
/// 遮罩路径,使用 SVG 标准 Path 绘制图案进行 Mask 遮罩。
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string ClipPath
{
get { return clipPath_; }
set
{
clipPath_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "shapes" field.</summary>
public const int ShapesFieldNumber = 5;
private static readonly pb::FieldCodec<global::Com.Opensource.Svga.ShapeEntity> _repeated_shapes_codec
= pb::FieldCodec.ForMessage(42, global::Com.Opensource.Svga.ShapeEntity.Parser);
private readonly pbc::RepeatedField<global::Com.Opensource.Svga.ShapeEntity> shapes_ = new pbc::RepeatedField<global::Com.Opensource.Svga.ShapeEntity>();
/// <summary>
/// 矢量元素列表
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Com.Opensource.Svga.ShapeEntity> Shapes
{
get { return shapes_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other)
{
return Equals(other as FrameEntity);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(FrameEntity other)
{
if (ReferenceEquals(other, null))
{
return false;
}
if (ReferenceEquals(other, this))
{
return true;
}
if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Alpha, other.Alpha)) return false;
if (!object.Equals(Layout, other.Layout)) return false;
if (!object.Equals(Transform, other.Transform)) return false;
if (ClipPath != other.ClipPath) return false;
if (!shapes_.Equals(other.shapes_)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode()
{
int hash = 1;
if (Alpha != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Alpha);
if (layout_ != null) hash ^= Layout.GetHashCode();
if (transform_ != null) hash ^= Transform.GetHashCode();
if (ClipPath.Length != 0) hash ^= ClipPath.GetHashCode();
hash ^= shapes_.GetHashCode();
if (_unknownFields != null)
{
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString()
{
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output)
{
if (Alpha != 0F)
{
output.WriteRawTag(13);
output.WriteFloat(Alpha);
}
if (layout_ != null)
{
output.WriteRawTag(18);
output.WriteMessage(Layout);
}
if (transform_ != null)
{
output.WriteRawTag(26);
output.WriteMessage(Transform);
}
if (ClipPath.Length != 0)
{
output.WriteRawTag(34);
output.WriteString(ClipPath);
}
shapes_.WriteTo(output, _repeated_shapes_codec);
if (_unknownFields != null)
{
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize()
{
int size = 0;
if (Alpha != 0F)
{
size += 1 + 4;
}
if (layout_ != null)
{
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Layout);
}
if (transform_ != null)
{
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Transform);
}
if (ClipPath.Length != 0)
{
size += 1 + pb::CodedOutputStream.ComputeStringSize(ClipPath);
}
size += shapes_.CalculateSize(_repeated_shapes_codec);
if (_unknownFields != null)
{
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(FrameEntity other)
{
if (other == null)
{
return;
}
if (other.Alpha != 0F)
{
Alpha = other.Alpha;
}
if (other.layout_ != null)
{
if (layout_ == null)
{
layout_ = new global::Com.Opensource.Svga.Layout();
}
Layout.MergeFrom(other.Layout);
}
if (other.transform_ != null)
{
if (transform_ == null)
{
transform_ = new global::Com.Opensource.Svga.Transform();
}
Transform.MergeFrom(other.Transform);
}
if (other.ClipPath.Length != 0)
{
ClipPath = other.ClipPath;
}
shapes_.Add(other.shapes_);
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input)
{
uint tag;
while ((tag = input.ReadTag()) != 0)
{
switch (tag)
{
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 13:
{
Alpha = input.ReadFloat();
break;
}
case 18:
{
if (layout_ == null)
{
layout_ = new global::Com.Opensource.Svga.Layout();
}
input.ReadMessage(layout_);
break;
}
case 26:
{
if (transform_ == null)
{
transform_ = new global::Com.Opensource.Svga.Transform();
}
input.ReadMessage(transform_);
break;
}
case 34:
{
ClipPath = input.ReadString();
break;
}
case 42:
{
shapes_.AddEntriesFrom(input, _repeated_shapes_codec);
break;
}
}
}
}
}
public sealed partial class MovieEntity : pb::IMessage<MovieEntity>
{
private static readonly pb::MessageParser<MovieEntity> _parser = new pb::MessageParser<MovieEntity>(() => new MovieEntity());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<MovieEntity> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor
{
get { return global::Com.Opensource.Svga.SvgaReflection.Descriptor.MessageTypes[7]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor
{
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public MovieEntity()
{
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public MovieEntity(MovieEntity other) : this()
{
version_ = other.version_;
params_ = other.params_ != null ? other.params_.Clone() : null;
images_ = other.images_.Clone();
sprites_ = other.sprites_.Clone();
audios_ = other.audios_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public MovieEntity Clone()
{
return new MovieEntity(this);
}
/// <summary>Field number for the "version" field.</summary>
public const int VersionFieldNumber = 1;
private string version_ = "";
/// <summary>
/// SVGA 格式版本号
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Version
{
get { return version_; }
set
{
version_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "params" field.</summary>
public const int ParamsFieldNumber = 2;
private global::Com.Opensource.Svga.MovieParams params_;
/// <summary>
/// 动画参数
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Com.Opensource.Svga.MovieParams Params
{
get { return params_; }
set
{
params_ = value;
}
}
/// <summary>Field number for the "images" field.</summary>
public const int ImagesFieldNumber = 3;
private static readonly pbc::MapField<string, pb::ByteString>.Codec _map_images_codec
= new pbc::MapField<string, pb::ByteString>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForBytes(18), 26);
private readonly pbc::MapField<string, pb::ByteString> images_ = new pbc::MapField<string, pb::ByteString>();
/// <summary>
/// Key 是位图键名Value 是位图文件名或二进制 PNG 数据。
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<string, pb::ByteString> Images
{
get { return images_; }
}
/// <summary>Field number for the "sprites" field.</summary>
public const int SpritesFieldNumber = 4;
private static readonly pb::FieldCodec<global::Com.Opensource.Svga.SpriteEntity> _repeated_sprites_codec
= pb::FieldCodec.ForMessage(34, global::Com.Opensource.Svga.SpriteEntity.Parser);
private readonly pbc::RepeatedField<global::Com.Opensource.Svga.SpriteEntity> sprites_ = new pbc::RepeatedField<global::Com.Opensource.Svga.SpriteEntity>();
/// <summary>
/// 元素列表
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Com.Opensource.Svga.SpriteEntity> Sprites
{
get { return sprites_; }
}
/// <summary>Field number for the "audios" field.</summary>
public const int AudiosFieldNumber = 5;
private static readonly pb::FieldCodec<global::Com.Opensource.Svga.AudioEntity> _repeated_audios_codec
= pb::FieldCodec.ForMessage(42, global::Com.Opensource.Svga.AudioEntity.Parser);
private readonly pbc::RepeatedField<global::Com.Opensource.Svga.AudioEntity> audios_ = new pbc::RepeatedField<global::Com.Opensource.Svga.AudioEntity>();
/// <summary>
/// 音频列表
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Com.Opensource.Svga.AudioEntity> Audios
{
get { return audios_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other)
{
return Equals(other as MovieEntity);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(MovieEntity other)
{
if (ReferenceEquals(other, null))
{
return false;
}
if (ReferenceEquals(other, this))
{
return true;
}
if (Version != other.Version) return false;
if (!object.Equals(Params, other.Params)) return false;
if (!Images.Equals(other.Images)) return false;
if (!sprites_.Equals(other.sprites_)) return false;
if (!audios_.Equals(other.audios_)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode()
{
int hash = 1;
if (Version.Length != 0) hash ^= Version.GetHashCode();
if (params_ != null) hash ^= Params.GetHashCode();
hash ^= Images.GetHashCode();
hash ^= sprites_.GetHashCode();
hash ^= audios_.GetHashCode();
if (_unknownFields != null)
{
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString()
{
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output)
{
if (Version.Length != 0)
{
output.WriteRawTag(10);
output.WriteString(Version);
}
if (params_ != null)
{
output.WriteRawTag(18);
output.WriteMessage(Params);
}
images_.WriteTo(output, _map_images_codec);
sprites_.WriteTo(output, _repeated_sprites_codec);
audios_.WriteTo(output, _repeated_audios_codec);
if (_unknownFields != null)
{
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize()
{
int size = 0;
if (Version.Length != 0)
{
size += 1 + pb::CodedOutputStream.ComputeStringSize(Version);
}
if (params_ != null)
{
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Params);
}
size += images_.CalculateSize(_map_images_codec);
size += sprites_.CalculateSize(_repeated_sprites_codec);
size += audios_.CalculateSize(_repeated_audios_codec);
if (_unknownFields != null)
{
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(MovieEntity other)
{
if (other == null)
{
return;
}
if (other.Version.Length != 0)
{
Version = other.Version;
}
if (other.params_ != null)
{
if (params_ == null)
{
params_ = new global::Com.Opensource.Svga.MovieParams();
}
Params.MergeFrom(other.Params);
}
images_.Add(other.images_);
sprites_.Add(other.sprites_);
audios_.Add(other.audios_);
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input)
{
uint tag;
while ((tag = input.ReadTag()) != 0)
{
switch (tag)
{
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10:
{
Version = input.ReadString();
break;
}
case 18:
{
if (params_ == null)
{
params_ = new global::Com.Opensource.Svga.MovieParams();
}
input.ReadMessage(params_);
break;
}
case 26:
{
images_.AddEntriesFrom(input, _map_images_codec);
break;
}
case 34:
{
sprites_.AddEntriesFrom(input, _repeated_sprites_codec);
break;
}
case 42:
{
audios_.AddEntriesFrom(input, _repeated_audios_codec);
break;
}
}
}
}
}
#endregion
}
#endregion Designer generated code