浏览代码

Merge remote-tracking branch 'origin/master' into text

# Conflicts:
#	Assets/UIWidgets/foundation/diagnostics.cs
#	Assets/UIWidgets/widgets/basic.cs
#	Assets/UIWidgets/widgets/text.cs
#	Assets/UIWidgets/widgets/text.cs.meta
/main
fzhangtj 6 年前
当前提交
b1be917c
共有 67 个文件被更改,包括 6416 次插入1815 次删除
  1. 5
      Assets/UIWidgets/Tests/Menu.cs
  2. 306
      Assets/UIWidgets/Tests/Widgets.cs
  3. 2
      Assets/UIWidgets/foundation/assertions.cs
  4. 58
      Assets/UIWidgets/foundation/debug.cs
  5. 89
      Assets/UIWidgets/foundation/diagnostics.cs
  6. 4
      Assets/UIWidgets/painting/border_radius.cs
  7. 20
      Assets/UIWidgets/painting/decoration.cs
  8. 22
      Assets/UIWidgets/painting/decoration_image.cs
  9. 37
      Assets/UIWidgets/painting/matrix_utils.cs
  10. 2
      Assets/UIWidgets/painting/text_painter.cs
  11. 16
      Assets/UIWidgets/rendering/automatic_keep_alive.cs
  12. 857
      Assets/UIWidgets/rendering/box.cs
  13. 12
      Assets/UIWidgets/rendering/editable.cs
  14. 12
      Assets/UIWidgets/rendering/flex.cs
  15. 18
      Assets/UIWidgets/rendering/image.cs
  16. 268
      Assets/UIWidgets/rendering/layer.cs
  17. 871
      Assets/UIWidgets/rendering/object.cs
  18. 237
      Assets/UIWidgets/rendering/object.mixin.gen.cs
  19. 72
      Assets/UIWidgets/rendering/object.mixin.njk
  20. 12
      Assets/UIWidgets/rendering/paragraph.cs
  21. 532
      Assets/UIWidgets/rendering/proxy_box.cs
  22. 28
      Assets/UIWidgets/rendering/proxy_box.mixin.gen.cs
  23. 28
      Assets/UIWidgets/rendering/proxy_box.mixin.njk
  24. 182
      Assets/UIWidgets/rendering/shifted_box.cs
  25. 475
      Assets/UIWidgets/rendering/sliver.cs
  26. 29
      Assets/UIWidgets/rendering/sliver_fixed_extent_list.cs
  27. 33
      Assets/UIWidgets/rendering/sliver_list.cs
  28. 151
      Assets/UIWidgets/rendering/sliver_multi_box_adaptor.cs
  29. 86
      Assets/UIWidgets/rendering/sliver_padding.cs
  30. 46
      Assets/UIWidgets/rendering/view.cs
  31. 10
      Assets/UIWidgets/ui/compositing.cs
  32. 14
      Assets/UIWidgets/ui/geometry.cs
  33. 29
      Assets/UIWidgets/ui/painting/canvas.cs
  34. 14
      Assets/UIWidgets/ui/painting/canvas_impl.cs
  35. 36
      Assets/UIWidgets/ui/painting/image.cs
  36. 25
      Assets/UIWidgets/ui/painting/painting.cs
  37. 13
      Assets/UIWidgets/ui/painting/txt/font_manager.cs
  38. 24
      Assets/UIWidgets/ui/painting/txt/mesh_generator.cs
  39. 2
      Assets/UIWidgets/ui/text.cs
  40. 2
      Assets/UIWidgets/ui/txt/paragraph.cs
  41. 572
      Assets/UIWidgets/widgets/basic.cs
  42. 155
      Assets/UIWidgets/widgets/container.cs
  43. 43
      Assets/UIWidgets/widgets/framework.cs
  44. 2
      Assets/UIWidgets/widgets/scroll_controller.cs
  45. 4
      Assets/UIWidgets/widgets/scroll_notification.mixin.gen.cs
  46. 2
      Assets/UIWidgets/widgets/scroll_notification.mixin.njk
  47. 2
      Assets/UIWidgets/widgets/scroll_position.cs
  48. 14
      Assets/UIWidgets/widgets/sliver.cs
  49. 2
      Assets/UIWidgets/widgets/text.cs
  50. 4
      Assets/UIWidgets/widgets/viewport.cs
  51. 465
      Assets/UIWidgets/Resources/MaterialIcons-Regular.ttf
  52. 22
      Assets/UIWidgets/Resources/MaterialIcons-Regular.ttf.meta
  53. 79
      Assets/UIWidgets/Tests/ScrollViews.cs
  54. 3
      Assets/UIWidgets/Tests/ScrollViews.cs.meta
  55. 48
      Assets/UIWidgets/painting/clip.cs
  56. 3
      Assets/UIWidgets/painting/clip.cs.meta
  57. 1001
      Assets/UIWidgets/rendering/viewport.cs
  58. 59
      Assets/UIWidgets/widgets/icon.cs
  59. 3
      Assets/UIWidgets/widgets/icon.cs.meta
  60. 49
      Assets/UIWidgets/widgets/icon_data.cs
  61. 3
      Assets/UIWidgets/widgets/icon_data.cs.meta
  62. 55
      Assets/UIWidgets/widgets/icon_theme.cs
  63. 3
      Assets/UIWidgets/widgets/icon_theme.cs.meta
  64. 103
      Assets/UIWidgets/widgets/icon_theme_data.cs
  65. 3
      Assets/UIWidgets/widgets/icon_theme_data.cs.meta
  66. 853
      Assets/UIWidgets/rendering/viewpoint.cs
  67. 0
      /Assets/UIWidgets/rendering/viewport.cs.meta

5
Assets/UIWidgets/Tests/Menu.cs


public static void renderWidgets() {
EditorWindow.GetWindow(typeof(Widgets));
}
[MenuItem("UIWidgetsTests/ScrollViews")]
public static void renderScrollViews() {
EditorWindow.GetWindow(typeof(ScrollViews));
}
}
}

306
Assets/UIWidgets/Tests/Widgets.cs


using UIWidgets.painting;
using UIWidgets.editor;
using UIWidgets.widgets;
using System.Collections.Generic;
using UIWidgets.rendering;
using System;
using System.Linq;
using UIWidgets.foundation;
using UIWidgets.gestures;
using UIWidgets.ui;
using Color = UIWidgets.ui.Color;
using TextStyle = UIWidgets.painting.TextStyle;
namespace UIWidgets.Tests {
public class Widgets : EditorWindow {

private Widget root;
private readonly Func<Widget>[] _options;
private readonly string[] _optionStrings;
private Widget image;
private int _selected;
[NonSerialized] private bool hasInvoked = false;
this._options = new Func<Widget>[] {
this.container,
this.flexRow,
this.flexColumn,
this.containerSimple,
this.eventsPage,
};
this._optionStrings = this._options.Select(x => x.Method.Name).ToArray();
this._selected = 0;
this.image = new widgets.Image(
"https://tse3.mm.bing.net/th?id=OIP.XOAIpvR1kh-CzISe_Nj9GgHaHs&pid=Api",
width: 100,
height: 100
);
this.root = new widgets.Container(
width: 200,
height: 200,
margin: EdgeInsets.all(30.0),
padding: EdgeInsets.all(15.0),
color: ui.Color.fromARGB(255, 244, 190, 85),
child: image
);
var selected = EditorGUILayout.Popup("test case", this._selected, this._optionStrings);
if (selected != this._selected || !this.hasInvoked) {
this._selected = selected;
this.hasInvoked = true;
var rootWidget = this._options[this._selected]();
this.windowAdapter.attachRootWidget(rootWidget);
}
if (this.windowAdapter != null) {
this.windowAdapter.OnGUI();
}

this.paintingBinding = new PaintingBinding(null);
paintingBinding.initInstances();
this.windowAdapter = new WindowAdapter(this);
this.windowAdapter.attachRootWidget(root);
Widget flexRow() {
var image = new widgets.Image(
"https://tse3.mm.bing.net/th?id=OIP.XOAIpvR1kh-CzISe_Nj9GgHaHs&pid=Api",
width: 100,
height: 100
);
List<Widget> rowImages = new List<Widget>();
rowImages.Add(image);
rowImages.Add(image);
rowImages.Add(image);
rowImages.Add(image);
var row = new widgets.Row(
textDirection: null,
textBaseline: null,
key: null,
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
verticalDirection: VerticalDirection.down,
children: rowImages
);
return row;
}
Widget flexColumn() {
var image = new widgets.Image(
"https://tse3.mm.bing.net/th?id=OIP.XOAIpvR1kh-CzISe_Nj9GgHaHs&pid=Api",
width: 100,
height: 100
);
List<Widget> columnImages = new List<Widget>();
columnImages.Add(image);
columnImages.Add(image);
columnImages.Add(image);
var column = new widgets.Column(
textDirection: null,
textBaseline: null,
key: null,
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
verticalDirection: VerticalDirection.down,
children: columnImages
);
return column;
}
Widget container() {
var image = new widgets.Image(
"https://tse3.mm.bing.net/th?id=OIP.XOAIpvR1kh-CzISe_Nj9GgHaHs&pid=Api",
width: 100,
height: 100,
repeat: ImageRepeat.repeatX
);
var container = new widgets.Container(
width: 200,
height: 200,
margin: EdgeInsets.all(30.0),
padding: EdgeInsets.all(15.0),
color: ui.Color.fromARGB(255, 244, 190, 85),
child: image
);
return container;
}
Widget containerSimple() {
var container = new Container(
alignment: Alignment.centerRight,
color: ui.Color.fromARGB(255, 244, 190, 85),
child: new Container(
width: 120,
height: 120,
color: ui.Color.fromARGB(255, 255, 0, 85)
)
);
return container;
}
Widget eventsPage() {
return new EventsWaterfallScreen();
}
}
public class EventsWaterfallScreen : StatefulWidget {
public EventsWaterfallScreen(Key key = null) : base(key: key) {
}
public override State createState() {
return new _EventsWaterfallScreenState();
}
}
class _EventsWaterfallScreenState : State<EventsWaterfallScreen> {
const double headerHeight = 80.0;
double _offsetY = 0.0;
int _index = -1;
Widget _buildHeader(BuildContext context) {
return new Container(
padding: EdgeInsets.only(left: 16.0, right: 8.0),
height: headerHeight - _offsetY,
child: new Row(
children: new List<Widget> {
new Flexible(
flex: 1,
fit: FlexFit.tight,
child: new Text(
"Today",
style: new TextStyle(
fontSize: (34.0 / headerHeight) * (headerHeight - _offsetY),
color: CLColors.white
)
)),
new CustomButton(
padding: EdgeInsets.only(8.0, 0.0, 8.0, 0.0),
child: new Icon(
Icons.notifications,
size: 18.0,
color: CLColors.icon2
)
),
new CustomButton(
padding: EdgeInsets.only(8.0, 0.0, 16.0, 0.0),
child: new Icon(
Icons.account_circle,
size: 18.0,
color: CLColors.icon2
)
)
}
)
);
}
bool _onNotification(ScrollNotification notification, BuildContext context) {
double pixels = notification.metrics.pixels;
if (pixels >= 0.0) {
if (pixels <= headerHeight) {
setState(() => {
_offsetY = pixels / 2.0;
});
}
} else {
if (_offsetY != 0.0) {
setState(() => {
_offsetY = 0.0;
});
}
}
return true;
}
Widget _buildContentList(BuildContext context) {
return new NotificationListener<ScrollNotification>(
onNotification: (ScrollNotification notification) => {
_onNotification(notification, context);
return true;
},
child: new Flexible(
child: ListView.builder(
itemCount: 20,
itemExtent: 100,
physics: new AlwaysScrollableScrollPhysics(),
itemBuilder: (BuildContext context1, int index) => {
return new Container(
color: Color.fromARGB(255, (index * 10) % 256, (index * 10) % 256, (index * 10) % 256)
);
}
)
)
);
}
public override Widget build(BuildContext context) {
var container = new Container(
color: CLColors.background1,
child: new Container(
color: CLColors.background1,
child: new Column(
children: new List<Widget> {
this._buildHeader(context),
this._buildContentList(context)
}
)
)
);
return container;
}
}
public class CustomButton : StatelessWidget {
public CustomButton(
Key key = null,
GestureTapCallback onPressed = null,
EdgeInsets padding = null,
Color backgroundColor = null,
Widget child = null
) : base(key: key) {
this.onPressed = onPressed;
this.padding = padding ?? EdgeInsets.all(8.0);
this.backgroundColor = backgroundColor ?? CLColors.transparent;
this.child = child;
}
public readonly GestureTapCallback onPressed;
public readonly EdgeInsets padding;
public readonly Widget child;
public readonly Color backgroundColor;
public override Widget build(BuildContext context) {
return new GestureDetector(
onTap: this.onPressed,
child: new Container(
padding: this.padding,
color: this.backgroundColor,
child: this.child
)
);
}
}
public static class Icons {
public static readonly IconData notifications = new IconData(0xe7f4, fontFamily: "MaterialIcons");
public static readonly IconData account_circle = new IconData(0xe853, fontFamily: "MaterialIcons");
}
public static class CLColors {
public static readonly Color primary = new Color(0xFFE91E63);
public static readonly Color secondary1 = new Color(0xFF00BCD4);
public static readonly Color secondary2 = new Color(0xFFF0513C);
public static readonly Color background1 = new Color(0xFF292929);
public static readonly Color background2 = new Color(0xFF383838);
public static readonly Color icon1 = new Color(0xFFFFFFFF);
public static readonly Color icon2 = new Color(0xFFA4A4A4);
public static readonly Color text1 = new Color(0xFFFFFFFF);
public static readonly Color text2 = new Color(0xFFD8D8D8);
public static readonly Color text3 = new Color(0xFF959595);
public static readonly Color dividingLine1 = new Color(0xFF666666);
public static readonly Color dividingLine2 = new Color(0xFF404040);
public static readonly Color transparent = new Color(0x00000000);
public static readonly Color white = new Color(0xFFFFFFFF);
public static readonly Color black = new Color(0xFF000000);
public static readonly Color red = new Color(0xFFFF0000);
public static readonly Color green = new Color(0xFF00FF00);
public static readonly Color blue = new Color(0xFF0000FF);
}
}

2
Assets/UIWidgets/foundation/assertions.cs


if (_errorCount == 0 || forceReport) {
Debug.LogError(details.ToString());
} else {
Debug.LogWarning("Another exception was thrown: " + details.exceptionAsString());
Debug.LogWarning("Another exception was thrown: " + details);
}
_errorCount += 1;

58
Assets/UIWidgets/foundation/debug.cs


using System;
using System.Diagnostics;
using UIWidgets.painting;
using UIWidgets.ui;
namespace UIWidgets.foundation {
public static class D {

public static bool debugPrintGestureArenaDiagnostics = true;
public static bool debugPrintHitTestResults = false;
public static bool debugPaintBaselinesEnabled = false;
public static bool debugPrintScheduleFrameStacks = false;
public static bool debugPaintSizeEnabled = false;
public static bool debugRepaintRainbowEnabled = false;
public static bool debugPaintLayerBordersEnabled = false;
public static bool debugPrintScheduleFrameStacks = false;
public static bool debugPrintMarkNeedsLayoutStacks = false;
public static bool debugPrintLayouts = false;
public static bool debugDisableClipLayers = false;
public static bool debugDisableOpacityLayers = false;
public static bool debugPrintMarkNeedsPaintStacks = false;
public static bool debugCheckIntrinsicSizes = false;
// public static Color debugCurrentRepaintColor = Color.fromfromAHSV(0.4, 60.0, 1.0, 1.0);;
public static void _debugDrawDoubleRect(Canvas canvas, Rect outerRect, Rect innerRect, Color color) {
// final Path path = new Path()
// ..fillType = PathFillType.evenOdd
// ..addRect(outerRect)
// ..addRect(innerRect);
// final Paint paint = new Paint()
// ..color = color;
// canvas.drawPath(path, paint);
}
public static void debugPaintPadding(Canvas canvas, Rect outerRect, Rect innerRect, double outlineWidth = 2.0) {
D.assert(() => {
if (innerRect != null && !innerRect.isEmpty) {
_debugDrawDoubleRect(canvas, outerRect, innerRect, new Color(0x900090FF));
} else {
_debugDrawDoubleRect(canvas, innerRect.inflate(outlineWidth).intersect(outerRect), innerRect,
new Color(0xFF0090FF));
Paint paint = new Paint();
paint.color = new Color(0x90909090);
canvas.drawRect(outerRect, BorderWidth.zero, BorderRadius.zero, paint);
}
return true;
});
}
}
[Serializable]

89
Assets/UIWidgets/foundation/diagnostics.cs


using System.Collections.Generic;
using System.Linq;
using System.Text;
using UIWidgets.ui;
namespace UIWidgets.foundation {
public enum DiagnosticLevel {

}
}
public class IntProperty : _NumProperty<int?> {
public IntProperty(String name, int? value,
String ifNull = null,
bool showName = true,
String unit = null,
Object defaultValue = null,
DiagnosticLevel level = DiagnosticLevel.info
) : base(
name,
value,
ifNull: ifNull,
showName: showName,
unit: unit,
defaultValue: defaultValue,
level: level
) {
}
protected override String numberToString() {
if (this.value == null) {
return "null";
}
return this.value.Value.ToString();
}
}
public class DoubleProperty : _NumProperty<double?> {
public DoubleProperty(string name, double? value,
string ifNull = null,

}
}
public class IntProperty : _NumProperty<int?> {
public IntProperty(String name, int? value,
string ifNull = null,
bool showName = true,
string unit = null,
object defaultValue = null,
DiagnosticLevel level = DiagnosticLevel.info
) :base(name,
value,
ifNull: ifNull,
unit: unit,
defaultValue: defaultValue,
showName: showName,
level: level){
}
public class PercentProperty : DoubleProperty {
public PercentProperty(string name, double fraction,
string ifNull = null,
bool showName = true,
string tooltip = null,
string unit = null,
DiagnosticLevel level = DiagnosticLevel.info
) : base(
name,
fraction,
ifNull: ifNull,
showName: showName,
tooltip: tooltip,
unit: unit,
level: level
) {
}
protected override string numberToString()
{
if (value == null)
{
return "null";
protected override string valueToString(TextTreeConfiguration parentConfiguration = null) {
if (this.value == null) {
return "null";
}
return this.unit != null ? this.numberToString() + " " + this.unit : this.numberToString();
}
protected override string numberToString() {
if (this.value == null) {
return "null";
}
return (this.value.Value.clamp(0.0, 1.0) * 100).ToString("F1") + "%";
return value.ToString();
}
public class FlagProperty : DiagnosticsProperty<bool> {
public FlagProperty(String name,

) {
var v = this.value;
var tree = v as DiagnosticableTree;
return tree != null ? tree.toStringShort() : v.ToString();
return tree != null ? tree.toStringShort() : v != null ? v.ToString() : "null";
}
public override string toDescription(

protected DiagnosticableTree() {
}
public string toStringShallow(
public virtual string toStringShallow(
String joiner = ", ",
DiagnosticLevel minLevel = DiagnosticLevel.debug
) {

return result.ToString();
}
public string toStringDeep(
public virtual string toStringDeep(
String prefixLineOne = "",
String prefixOtherLines = null,
DiagnosticLevel minLevel = DiagnosticLevel.debug

4
Assets/UIWidgets/painting/border_radius.cs


return new BorderWidth(top, right, bottom, left);
}
public static BorderWidth all(double width) {
return BorderWidth.only(width, width, width, width);
}
public static readonly BorderWidth zero = BorderWidth.only();
public readonly double top;

20
Assets/UIWidgets/painting/decoration.cs


using UIWidgets.ui;
namespace UIWidgets.painting {
public abstract class Decoration {
public abstract class Decoration : Diagnosticable {
}
public override string toStringShort() {
return this.GetType().ToString();
}
public virtual bool debugAssertIsValid() {
return true;
}
public virtual EdgeInsets padding {

public virtual bool isComplex {
get { return false; }
}
public virtual bool hitTest(Size size, Offset position) {
return true;
}
public abstract class BoxPainter {
protected BoxPainter(VoidCallback onChanged = null) {
this.onChanged = onChanged;

22
Assets/UIWidgets/painting/decoration_image.cs


using System;
using UIWidgets.ui;
using System.Collections.Generic;
using UnityEngine;
using Canvas = UIWidgets.ui.Canvas;
using Rect = UIWidgets.ui.Rect;
namespace UIWidgets.painting {
/// How to paint any portions of a box not covered by an image.

}
public static class DecorationImageUtil {
public static void paintImage(Canvas canvas, Rect rect, ui.Image image) {
canvas.drawImageRect(Rect.fromLTWH(0, 0, 100, 100), rect, new Paint(), image);
}
// todo refine logic below, no just draw in Rect(0, 0, 100, 100) for testing widgets
/*
public static void paintImage(Canvas canvas, Rect rect, ui.Image image, BoxFit fit, Rect centerSlice,
public static void paintImage(
Canvas canvas,
Rect rect,
ui.Image image,
// ColorFilter colorFileter,
BoxFit fit,
Rect centerSlice,
ImageRepeat repeat = ImageRepeat.noRepeat) {
ImageRepeat repeat = ImageRepeat.noRepeat
// bool flipHorizontally = false
) {
if (rect.isEmpty)
return;
alignment = alignment ?? Alignment.center;

if (needSave)
canvas.restore();
}*/
}
public static List<Rect> _generateImageTileRects(Rect outputRect, Rect fundamentalRect,
ImageRepeat repeat) {

37
Assets/UIWidgets/painting/matrix_utils.cs


using System;
using UIWidgets.foundation;
using UIWidgets.ui;
using UnityEngine;
using Rect = UIWidgets.ui.Rect;

}
public static Rect transformRect(Matrix4x4 transform, Offset[] points, out bool isRect) {
if (points == null || points.Length != 4) {
throw new Exception("expected 4 points");
}
D.assert(points != null && points.Length == 4, "expected 4 points");
var topLeft = MatrixUtils.transformPoint(transform, points[0]);
var topRight = MatrixUtils.transformPoint(transform, points[1]);

public static Rect transformRect(Matrix4x4 transform, Rect rect) {
bool isRect;
return MatrixUtils.transformRect(transform, rect, out isRect);
}
public static Rect inverseTransformRect(Matrix4x4 transform, Rect rect) {
D.assert(rect != null);
D.assert(transform.determinant != 0.0);
if (transform.isIdentity) {
return rect;
}
transform = transform.inverse;
return MatrixUtils.transformRect(transform, rect);
}
public static Offset getAsTranslation(ref Matrix4x4 transform) {
if (transform.m00 == 1.0 &&
transform.m10 == 0.0 &&
transform.m20 == 0.0 &&
transform.m30 == 0.0 &&
transform.m01 == 0.0 &&
transform.m11 == 1.0 &&
transform.m21 == 0.0 &&
transform.m31 == 0.0 &&
transform.m02 == 0.0 &&
transform.m12 == 0.0 &&
transform.m22 == 1.0 &&
transform.m32 == 0.0 &&
transform.m23 == 0.0 &&
transform.m33 == 1.0) {
return new Offset(transform.m03, transform.m13);
}
return null;
}
}
}

2
Assets/UIWidgets/painting/text_painter.cs


}
_lastMinWidth = minWidth;
_lastMaxWidth = minWidth;
_lastMaxWidth = maxWidth;
_paragraph.layout(new ParagraphConstraints(maxWidth));
if (minWidth != maxWidth)

16
Assets/UIWidgets/rendering/automatic_keep_alive.cs


using System;
using System.Collections.Generic;
using UIWidgets.foundation;
using UIWidgets.scheduler;

Key key = null,
Widget child = null
) : base(key: key) {
this.child = child;
}
public readonly Widget child;

handle.addListener(this._handles[handle]);
if (!this._keepingAlive) {
this._keepingAlive = true;
ParentDataElement<SliverMultiBoxAdaptorWidget> childElement = this._getChildElement();
ParentDataElement childElement = this._getChildElement();
ParentDataElement<SliverMultiBoxAdaptorWidget> childElement1 = this._getChildElement();
ParentDataElement childElement1 = this._getChildElement();
D.assert(childElement1 != null);
this._updateParentDataOfChild(childElement1);
});

return false;
}
ParentDataElement<SliverMultiBoxAdaptorWidget> _getChildElement() {
ParentDataElement _getChildElement() {
D.assert(childElement == null || childElement is ParentDataElement<SliverMultiBoxAdaptorWidget>);
return (ParentDataElement<SliverMultiBoxAdaptorWidget>) childElement;
D.assert(childElement == null || childElement is ParentDataElement);
return (ParentDataElement) childElement;
void _updateParentDataOfChild(ParentDataElement<SliverMultiBoxAdaptorWidget> childElement) {
childElement.applyWidgetOutOfTurn((ParentDataWidget<SliverMultiBoxAdaptorWidget>) this.build(this.context));
void _updateParentDataOfChild(ParentDataElement childElement) {
childElement.applyWidgetOutOfTurn((ParentDataWidget) this.build(this.context));
}
VoidCallback _createCallback(Listenable handle) {

857
Assets/UIWidgets/rendering/box.cs
文件差异内容过多而无法显示
查看文件

12
Assets/UIWidgets/rendering/editable.cs


return Rect.fromLTWH(0.0, 0.0, _kCaretWidth, preferredLineHeight).shift(caretOffset + _paintOffset);
}
public override double computeMinIntrinsicWidth(double height) {
protected override double computeMinIntrinsicWidth(double height) {
public override double computeMaxIntrinsicWidth(double height) {
protected override double computeMaxIntrinsicWidth(double height) {
public override double computeMinIntrinsicHeight(double width) {
protected override double computeMinIntrinsicHeight(double width) {
public override double computeMaxIntrinsicHeight(double width) {
protected override double computeMaxIntrinsicHeight(double width) {
public override double? computeDistanceToActualBaseline(TextBaseline baseline) {
protected override double? computeDistanceToActualBaseline(TextBaseline baseline) {
_layoutText(constraints.maxWidth);
return _textPainter.computeDistanceToActualBaseline(baseline);
}

}
public override void performLayout() {
protected override void performLayout() {
_layoutText(constraints.maxWidth);
_caretPrototype = Rect.fromLTWH(0.0, _kCaretHeightOffset, _kCaretWidth,
preferredLineHeight - 2.0 * _kCaretHeightOffset);

12
Assets/UIWidgets/rendering/flex.cs


}
}
public override double computeMinIntrinsicWidth(double height) {
protected override double computeMinIntrinsicWidth(double height) {
return this._getIntrinsicSize(
sizingDirection: Axis.horizontal,
extent: height,

public override double computeMaxIntrinsicWidth(double height) {
protected override double computeMaxIntrinsicWidth(double height) {
return this._getIntrinsicSize(
sizingDirection: Axis.horizontal,
extent: height,

public override double computeMinIntrinsicHeight(double width) {
protected override double computeMinIntrinsicHeight(double width) {
return this._getIntrinsicSize(
sizingDirection: Axis.vertical,
extent: width,

public override double computeMaxIntrinsicHeight(double width) {
protected override double computeMaxIntrinsicHeight(double width) {
return this._getIntrinsicSize(
sizingDirection: Axis.vertical,
extent: width,

public override double? computeDistanceToActualBaseline(TextBaseline baseline) {
protected override double? computeDistanceToActualBaseline(TextBaseline baseline) {
if (this._direction == Axis.horizontal) {
return this.defaultComputeDistanceToHighestActualBaseline(baseline);
}

return 0;
}
public override void performLayout() {
protected override void performLayout() {
int totalFlex = 0;
int totalChildren = 0;
double maxMainSize = this._direction == Axis.horizontal

18
Assets/UIWidgets/rendering/image.cs


using UIWidgets.ui;
using UIWidgets.painting;
using UnityEngine;
using Color = UIWidgets.ui.Color;
using Rect = UIWidgets.ui.Rect;
namespace UIWidgets.rendering {
class RenderImage : RenderBox {

constraints = BoxConstraints.tightFor(
_width,
_height
);
constraints = constraints.enforce(constraints);
).enforce(constraints);
if (_image == null)
return constraints.smallest;

));
}
public override void performLayout() {
protected override void performLayout() {
this.size = _sizeForConstraints(constraints);
}

DecorationImageUtil.paintImage(
context.canvas,
offset & size,
_image
// _fit,
// _centerSlice,
// _resolvedAlignment,
// _repeat
_image,
_fit,
_centerSlice,
_resolvedAlignment,
_repeat
);
}
}

268
Assets/UIWidgets/rendering/layer.cs


using UIWidgets.foundation;
using System.Collections.Generic;
using UIWidgets.foundation;
public abstract class Layer : AbstractNode {
public abstract class Layer : AbstractNodeMixinDiagnosticableTree {
public new ContainerLayer parent {
get { return (ContainerLayer) base.parent; }
}

}
public Layer _nextSibling;
internal Layer _nextSibling;
public Layer _previousSibling;
internal Layer _previousSibling;
public virtual void remove() {
if (this.parent != null) {

public void replaceWith(Layer newLayer) {
D.assert(this.parent != null);
D.assert(this.attached == this.parent.attached);
D.assert(newLayer.parent == null);
D.assert(newLayer._nextSibling == null);
D.assert(newLayer._previousSibling == null);
D.assert(!newLayer.attached);
newLayer._nextSibling = this.nextSibling;
if (this._nextSibling != null) {
this._nextSibling._previousSibling = newLayer;

this._previousSibling._nextSibling = newLayer;
}
D.assert(() => {
Layer node = this;
while (node.parent != null)
node = node.parent;
D.assert(node != newLayer);
return true;
});
D.assert(newLayer.attached == this.parent.attached);
if (this.parent.firstChild == this) {
this.parent._firstChild = newLayer;
}

this._nextSibling = null;
this._previousSibling = null;
this.parent.dropChild(this);
D.assert(!this.attached);
public object debugCreator;
public override string toStringShort() {
return base.toStringShort() + (this.owner == null ? "DETACHED" : "");
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DiagnosticsProperty<object>("owner", this.owner,
level: this.parent != null ? DiagnosticLevel.hidden : DiagnosticLevel.info,
defaultValue: Diagnostics.kNullDefaultValue));
properties.add(new DiagnosticsProperty<object>("creator", this.debugCreator,
defaultValue: Diagnostics.kNullDefaultValue, level: DiagnosticLevel.debug));
}
public PictureLayer(Rect canvasBounds) {
this.canvasBounds = canvasBounds;
}
public readonly Rect canvasBounds;
public bool isComplexHint = false;
public bool willChangeHint = false;
builder.addPicture(layerOffset, this.picture);
builder.addPicture(layerOffset, this.picture,
isComplexHint: this.isComplexHint, willChangeHint: this.willChangeHint);
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DiagnosticsProperty<Rect>("paint bounds", this.canvasBounds));
}
}

}
public Layer _firstChild;
internal Layer _firstChild;
public Layer _lastChild;
internal Layer _lastChild;
bool _debugUltimatePreviousSiblingOf(Layer child, Layer equals = null) {
D.assert(child.attached == this.attached);
while (child.previousSibling != null) {
D.assert(child.previousSibling != child);
child = child.previousSibling;
D.assert(child.attached == this.attached);
}
return child == equals;
}
bool _debugUltimateNextSiblingOf(Layer child, Layer equals = null) {
D.assert(child.attached == this.attached);
while (child._nextSibling != null) {
D.assert(child._nextSibling != child);
child = child._nextSibling;
D.assert(child.attached == this.attached);
}
return child == equals;
}
public override void attach(object owner) {
base.attach(owner);

}
public void append(Layer child) {
D.assert(child != this);
D.assert(child != this.firstChild);
D.assert(child != this.lastChild);
D.assert(child.parent == null);
D.assert(!child.attached);
D.assert(child.nextSibling == null);
D.assert(child.previousSibling == null);
D.assert(() => {
Layer node = this;
while (node.parent != null)
node = node.parent;
D.assert(node != child);
return true;
});
this.adoptChild(child);
child._previousSibling = this.lastChild;
if (this.lastChild != null) {

if (this._firstChild == null) {
this._firstChild = child;
}
D.assert(child.attached == this.attached);
D.assert(child.parent == this);
D.assert(child.attached == this.attached);
D.assert(this._debugUltimatePreviousSiblingOf(child, equals: this.firstChild));
D.assert(this._debugUltimateNextSiblingOf(child, equals: this.lastChild));
D.assert(this.firstChild == child);
this._firstChild = child.nextSibling;
} else {
child._previousSibling._nextSibling = child.nextSibling;

D.assert(this.lastChild == child);
D.assert((this.firstChild == null) == (this.lastChild == null));
D.assert(this.firstChild == null || this.firstChild.attached == this.attached);
D.assert(this.lastChild == null || this.lastChild.attached == this.attached);
D.assert(this.firstChild == null ||
this._debugUltimateNextSiblingOf(this.firstChild, equals: this.lastChild));
D.assert(this.lastChild == null ||
this._debugUltimatePreviousSiblingOf(this.lastChild, equals: this.firstChild));
D.assert(!child.attached);
}
public void removeAllChildren() {

child._previousSibling = null;
child._nextSibling = null;
D.assert(child.attached == this.attached);
this.dropChild(child);
child = next;
}

child = child.nextSibling;
}
}
public virtual void applyTransform(Layer child, ref Matrix4x4 transform) {
D.assert(child != null);
}
public override List<DiagnosticsNode> debugDescribeChildren() {
var children = new List<DiagnosticsNode>();
if (this.firstChild == null) {
return children;
}
Layer child = this.firstChild;
int count = 1;
while (true) {
children.Add(child.toDiagnosticsNode(name: "child " + count));
if (child == this.lastChild) {
break;
}
count += 1;
child = child.nextSibling;
}
return children;
}
}
public class OffsetLayer : ContainerLayer {

public override void addToScene(SceneBuilder builder, Offset layerOffset) {
this.addChildrenToScene(builder, this.offset + layerOffset);
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DiagnosticsProperty<Offset>("offset", this.offset));
public ClipRectLayer(Rect clipRect) {
public ClipRectLayer(
Rect clipRect = null,
Clip clipBehavior = Clip.hardEdge
) {
D.assert(clipBehavior != Clip.none);
this._clipBehavior = clipBehavior;
}
public readonly Rect clipRect;
public Clip clipBehavior {
get { return this._clipBehavior; }
set {
D.assert(value != Clip.none);
this._clipBehavior = value;
}
public Rect clipRect;
Clip _clipBehavior;
builder.pushClipRect(this.clipRect.shift(layerOffset));
bool enabled = true;
D.assert(() => {
enabled = !D.debugDisableClipLayers;
return true;
});
if (enabled) {
builder.pushClipRect(this.clipRect.shift(layerOffset), clipBehavior: this.clipBehavior);
}
builder.pop();
if (enabled) {
builder.pop();
}
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DiagnosticsProperty<Rect>("clipRect", this.clipRect));
public ClipRRectLayer(RRect clipRRect) {
public ClipRRectLayer(
RRect clipRRect = null,
Clip clipBehavior = Clip.hardEdge
) {
D.assert(clipBehavior != Clip.none);
this._clipBehavior = clipBehavior;
public RRect clipRRect;
public readonly RRect clipRRect;
public Clip clipBehavior {
get { return this._clipBehavior; }
set {
D.assert(value != Clip.none);
this._clipBehavior = value;
}
}
Clip _clipBehavior;
builder.pushClipRRect(this.clipRRect.shift(layerOffset));
bool enabled = true;
D.assert(() => {
enabled = !D.debugDisableClipLayers;
return true;
});
if (enabled) {
builder.pushClipRRect(this.clipRRect.shift(layerOffset), clipBehavior: this.clipBehavior);
}
builder.pop();
if (enabled) {
builder.pop();
}
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DiagnosticsProperty<RRect>("clipRRect", this.clipRRect));
public TransformLayer(Matrix4x4 transform, Offset offset = null) : base(offset) {
public TransformLayer(Matrix4x4 transform = default(Matrix4x4), Offset offset = null) : base(offset) {
this._transform = transform;
}

}
public Matrix4x4 _transform;
public Matrix4x4 _lastEffectiveTransform;
Matrix4x4 _transform;
Matrix4x4 _lastEffectiveTransform;
public override void addToScene(SceneBuilder builder, Offset layerOffset) {
this._lastEffectiveTransform = this.transform;

this.addChildrenToScene(builder, Offset.zero);
builder.pop();
}
public override void applyTransform(Layer child, ref Matrix4x4 transform) {
D.assert(child != null);
transform = transform * this._lastEffectiveTransform;
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DiagnosticsProperty<Matrix4x4>("transform", this.transform));
}
public OpacityLayer(int alpha) {
public OpacityLayer(int alpha = 255) {
this.alpha = alpha;
}

builder.pushOpacity(this.alpha);
bool enabled = true;
D.assert(() => {
enabled = !D.debugDisableOpacityLayers;
return true;
});
if (enabled) {
builder.pushOpacity(this.alpha);
}
builder.pop();
if (enabled) {
builder.pop();
}
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new IntProperty("alpha", this.alpha));
}
}
}

871
Assets/UIWidgets/rendering/object.cs
文件差异内容过多而无法显示
查看文件

237
Assets/UIWidgets/rendering/object.mixin.gen.cs


namespace UIWidgets.rendering {
public abstract class RenderObjectWithChildMixinRenderObject<ChildType> : RenderObject, RenderObjectWithChildMixin<ChildType>, RenderObjectWithChildMixin where ChildType : RenderObject {
internal ChildType _child;
public ChildType child {
get { return this._child; }
set {
if (this._child != null) {
this.dropChild(this._child);
}
this._child = value;
if (this._child != null) {
this.adoptChild(this._child);
}
}
}
RenderObject RenderObjectWithChildMixin.child {
get { return this.child; }
set { this.child = (ChildType) value; }
}
public bool debugValidateChild(RenderObject child) {
D.assert(() => {
if (!(child is ChildType)) {

return true;
}
internal ChildType _child;
public ChildType child {
get { return this._child; }
set {
if (this._child != null) {
this.dropChild(this._child);
}
this._child = value;
if (this._child != null) {
this.adoptChild(this._child);
}
}
}
RenderObject RenderObjectWithChildMixin.child {
get { return this.child; }
set { this.child = (ChildType) value; }
}
public override void attach(object owner) {
base.attach(owner);
if (this._child != null) {

visitor(this._child);
}
}
}
public abstract class RenderObjectWithChildMixinRenderBox<ChildType> : RenderBox, RenderObjectWithChildMixin<ChildType>, RenderObjectWithChildMixin where ChildType : RenderObject {
internal ChildType _child;
public ChildType child {
get { return this._child; }
set {
if (this._child != null) {
this.dropChild(this._child);
}
this._child = value;
if (this._child != null) {
this.adoptChild(this._child);
}
}
public override List<DiagnosticsNode> debugDescribeChildren() {
return this.child != null
? new List<DiagnosticsNode>{this.child.toDiagnosticsNode(name: "child")}
: new List<DiagnosticsNode>();
}
RenderObject RenderObjectWithChildMixin.child {
get { return this.child; }
set { this.child = (ChildType) value; }
}
public abstract class RenderObjectWithChildMixinRenderBox<ChildType> : RenderBox, RenderObjectWithChildMixin<ChildType>, RenderObjectWithChildMixin where ChildType : RenderObject {
public bool debugValidateChild(RenderObject child) {
D.assert(() => {
if (!(child is ChildType)) {

return true;
}
internal ChildType _child;
public ChildType child {
get { return this._child; }
set {
if (this._child != null) {
this.dropChild(this._child);
}
this._child = value;
if (this._child != null) {
this.adoptChild(this._child);
}
}
}
RenderObject RenderObjectWithChildMixin.child {
get { return this.child; }
set { this.child = (ChildType) value; }
}
public override void attach(object owner) {
base.attach(owner);
if (this._child != null) {

visitor(this._child);
}
}
public override List<DiagnosticsNode> debugDescribeChildren() {
return this.child != null
? new List<DiagnosticsNode>{this.child.toDiagnosticsNode(name: "child")}
: new List<DiagnosticsNode>();
}
internal ChildType _child;
public ChildType child {
get { return this._child; }
set {
if (this._child != null) {
this.dropChild(this._child);
}
this._child = value;
if (this._child != null) {
this.adoptChild(this._child);
}
}
}
RenderObject RenderObjectWithChildMixin.child {
get { return this.child; }
set { this.child = (ChildType) value; }
}
public bool debugValidateChild(RenderObject child) {
D.assert(() => {
if (!(child is ChildType)) {

return true;
}
internal ChildType _child;
public ChildType child {
get { return this._child; }
set {
if (this._child != null) {
this.dropChild(this._child);
}
this._child = value;
if (this._child != null) {
this.adoptChild(this._child);
}
}
}
RenderObject RenderObjectWithChildMixin.child {
get { return this.child; }
set { this.child = (ChildType) value; }
}
public override void attach(object owner) {
base.attach(owner);
if (this._child != null) {

visitor(this._child);
}
}
public override List<DiagnosticsNode> debugDescribeChildren() {
return this.child != null
? new List<DiagnosticsNode>{this.child.toDiagnosticsNode(name: "child")}
: new List<DiagnosticsNode>();
}
}

public override void detach() {
base.detach();
if (this.previousSibling != null) {
var previousSiblingParentData = (ContainerParentDataMixin<ChildType>) this.previousSibling.parentData;
previousSiblingParentData.nextSibling = this.nextSibling;
}
D.assert(this.previousSibling == null);
D.assert(this.nextSibling == null);
// if (this.previousSibling != null) {
// var previousSiblingParentData = (ContainerParentDataMixin<ChildType>) this.previousSibling.parentData;
// previousSiblingParentData.nextSibling = this.nextSibling;
// }
if (this.nextSibling != null) {
var nextSiblingParentData = (ContainerParentDataMixin<ChildType>) this.nextSibling.parentData;
nextSiblingParentData.previousSibling = this.previousSibling;
}
// if (this.nextSibling != null) {
// var nextSiblingParentData = (ContainerParentDataMixin<ChildType>) this.nextSibling.parentData;
// nextSiblingParentData.previousSibling = this.previousSibling;
// }
this.previousSibling = null;
this.nextSibling = null;
// this.previousSibling = null;
// this.nextSibling = null;
}
}

public override void detach() {
base.detach();
if (this.previousSibling != null) {
var previousSiblingParentData = (ContainerParentDataMixin<ChildType>) this.previousSibling.parentData;
previousSiblingParentData.nextSibling = this.nextSibling;
}
D.assert(this.previousSibling == null);
D.assert(this.nextSibling == null);
if (this.nextSibling != null) {
var nextSiblingParentData = (ContainerParentDataMixin<ChildType>) this.nextSibling.parentData;
nextSiblingParentData.previousSibling = this.previousSibling;
}
// if (this.previousSibling != null) {
// var previousSiblingParentData = (ContainerParentDataMixin<ChildType>) this.previousSibling.parentData;
// previousSiblingParentData.nextSibling = this.nextSibling;
// }
this.previousSibling = null;
this.nextSibling = null;
// if (this.nextSibling != null) {
// var nextSiblingParentData = (ContainerParentDataMixin<ChildType>) this.nextSibling.parentData;
// nextSiblingParentData.previousSibling = this.previousSibling;
// }
// this.previousSibling = null;
// this.nextSibling = null;
}
}

public override void detach() {
base.detach();
if (this.previousSibling != null) {
var previousSiblingParentData = (ContainerParentDataMixin<ChildType>) this.previousSibling.parentData;
previousSiblingParentData.nextSibling = this.nextSibling;
}
D.assert(this.previousSibling == null);
D.assert(this.nextSibling == null);
// if (this.previousSibling != null) {
// var previousSiblingParentData = (ContainerParentDataMixin<ChildType>) this.previousSibling.parentData;
// previousSiblingParentData.nextSibling = this.nextSibling;
// }
if (this.nextSibling != null) {
var nextSiblingParentData = (ContainerParentDataMixin<ChildType>) this.nextSibling.parentData;
nextSiblingParentData.previousSibling = this.previousSibling;
}
// if (this.nextSibling != null) {
// var nextSiblingParentData = (ContainerParentDataMixin<ChildType>) this.nextSibling.parentData;
// nextSiblingParentData.previousSibling = this.previousSibling;
// }
this.previousSibling = null;
this.nextSibling = null;
// this.previousSibling = null;
// this.nextSibling = null;
}
}

public override void detach() {
base.detach();
if (this.previousSibling != null) {
var previousSiblingParentData = (ContainerParentDataMixin<ChildType>) this.previousSibling.parentData;
previousSiblingParentData.nextSibling = this.nextSibling;
}
D.assert(this.previousSibling == null);
D.assert(this.nextSibling == null);
// if (this.previousSibling != null) {
// var previousSiblingParentData = (ContainerParentDataMixin<ChildType>) this.previousSibling.parentData;
// previousSiblingParentData.nextSibling = this.nextSibling;
// }
if (this.nextSibling != null) {
var nextSiblingParentData = (ContainerParentDataMixin<ChildType>) this.nextSibling.parentData;
nextSiblingParentData.previousSibling = this.previousSibling;
}
// if (this.nextSibling != null) {
// var nextSiblingParentData = (ContainerParentDataMixin<ChildType>) this.nextSibling.parentData;
// nextSiblingParentData.previousSibling = this.previousSibling;
// }
this.previousSibling = null;
this.nextSibling = null;
// this.previousSibling = null;
// this.nextSibling = null;
}
}

return this.childAfter((ChildType) child);
}
}
}

72
Assets/UIWidgets/rendering/object.mixin.njk


namespace UIWidgets.rendering {
{% macro RenderObjectWithChildMixin(with) %}
public abstract class RenderObjectWithChildMixin{{with}}<ChildType> : {{with}}, RenderObjectWithChildMixin<ChildType>, RenderObjectWithChildMixin where ChildType : RenderObject {
internal ChildType _child;
public ChildType child {
get { return this._child; }
set {
if (this._child != null) {
this.dropChild(this._child);
}
this._child = value;
if (this._child != null) {
this.adoptChild(this._child);
}
}
}
RenderObject RenderObjectWithChildMixin.child {
get { return this.child; }
set { this.child = (ChildType) value; }
}
public bool debugValidateChild(RenderObject child) {
D.assert(() => {
if (!(child is ChildType)) {

return true;
}
internal ChildType _child;
public ChildType child {
get { return this._child; }
set {
if (this._child != null) {
this.dropChild(this._child);
}
this._child = value;
if (this._child != null) {
this.adoptChild(this._child);
}
}
}
RenderObject RenderObjectWithChildMixin.child {
get { return this.child; }
set { this.child = (ChildType) value; }
}
public override void attach(object owner) {
base.attach(owner);
if (this._child != null) {

visitor(this._child);
}
}
public override List<DiagnosticsNode> debugDescribeChildren() {
return this.child != null
? new List<DiagnosticsNode>{this.child.toDiagnosticsNode(name: "child")}
: new List<DiagnosticsNode>();
}
}
{% endmacro %}

public override void detach() {
base.detach();
if (this.previousSibling != null) {
var previousSiblingParentData = (ContainerParentDataMixin<ChildType>) this.previousSibling.parentData;
previousSiblingParentData.nextSibling = this.nextSibling;
}
D.assert(this.previousSibling == null);
D.assert(this.nextSibling == null);
// if (this.previousSibling != null) {
// var previousSiblingParentData = (ContainerParentDataMixin<ChildType>) this.previousSibling.parentData;
// previousSiblingParentData.nextSibling = this.nextSibling;
// }
if (this.nextSibling != null) {
var nextSiblingParentData = (ContainerParentDataMixin<ChildType>) this.nextSibling.parentData;
nextSiblingParentData.previousSibling = this.previousSibling;
}
// if (this.nextSibling != null) {
// var nextSiblingParentData = (ContainerParentDataMixin<ChildType>) this.nextSibling.parentData;
// nextSiblingParentData.previousSibling = this.previousSibling;
// }
this.previousSibling = null;
this.nextSibling = null;
// this.previousSibling = null;
// this.nextSibling = null;
}
}

{{ ContainerRenderObjectMixin('RenderBox') }}
{{ ContainerRenderObjectMixin('RenderSliver') }}
}

12
Assets/UIWidgets/rendering/paragraph.cs


get { return _textPainter.size; }
}
public override double computeMinIntrinsicWidth(double height) {
protected override double computeMinIntrinsicWidth(double height) {
public override double computeMaxIntrinsicWidth(double height) {
protected override double computeMaxIntrinsicWidth(double height) {
_layoutText();
return _textPainter.maxIntrinsicWidth;
}

return _textPainter.height;
}
public override double computeMinIntrinsicHeight(double width) {
protected override double computeMinIntrinsicHeight(double width) {
public override double computeMaxIntrinsicHeight(double width) {
protected override double computeMaxIntrinsicHeight(double width) {
public override double? computeDistanceToActualBaseline(TextBaseline baseline) {
protected override double? computeDistanceToActualBaseline(TextBaseline baseline) {
public override void performLayout() {
protected override void performLayout() {
_layoutTextWithConstraints(constraints);
var textSize = _textPainter.size;
var didOverflowHeight = _textPainter.didExceedMaxLines;

532
Assets/UIWidgets/rendering/proxy_box.cs


using UIWidgets.painting;
using UIWidgets.ui;
using UnityEngine;
using Color = UIWidgets.ui.Color;
namespace UIWidgets.rendering {
public class RenderProxyBox : RenderProxyBoxMixinRenderObjectWithChildMixinRenderBox<RenderBox> {

public RenderConstrainedBox(
RenderBox child = null,
BoxConstraints additionalConstraints = null) : base(child) {
D.assert(additionalConstraints != null);
D.assert(additionalConstraints.debugAssertIsValid());
D.assert(value != null);
D.assert(value.debugAssertIsValid());
if (this._additionalConstraints == value) {
return;
}

}
}
public BoxConstraints _additionalConstraints;
BoxConstraints _additionalConstraints;
public override double computeMinIntrinsicWidth(double height) {
protected override double computeMinIntrinsicWidth(double height) {
D.assert(width.isFinite());
if (!this._additionalConstraints.hasInfiniteWidth) {
return this._additionalConstraints.constrainWidth(width);
}

public override double computeMaxIntrinsicWidth(double height) {
protected override double computeMaxIntrinsicWidth(double height) {
return this._additionalConstraints.maxWidth;
return this._additionalConstraints.minWidth;
D.assert(width.isFinite());
if (!this._additionalConstraints.hasInfiniteWidth) {
return this._additionalConstraints.constrainWidth(width);
}

public override double computeMinIntrinsicHeight(double width) {
protected override double computeMinIntrinsicHeight(double width) {
D.assert(height.isFinite());
if (!this._additionalConstraints.hasInfiniteHeight) {
return this._additionalConstraints.constrainHeight(height);
}

public override double computeMaxIntrinsicHeight(double width) {
protected override double computeMaxIntrinsicHeight(double width) {
D.assert(height.isFinite());
if (!this._additionalConstraints.hasInfiniteHeight) {
return this._additionalConstraints.constrainHeight(height);
}

public override void performLayout() {
protected override void performLayout() {
if (this.child != null) {
this.child.layout(this._additionalConstraints.enforce(this.constraints), parentUsesSize: true);
this.size = this.child.size;

}
protected override void debugPaintSize(PaintingContext context, Offset offset) {
base.debugPaintSize(context, offset);
D.assert(() => {
if (this.child == null || this.child.size.isEmpty) {
var paint = new Paint {
color = new Color(0x90909090)
};
context.canvas.drawRect(offset & this.size, BorderWidth.zero, BorderRadius.zero, paint);
}
return true;
});
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(
new DiagnosticsProperty<BoxConstraints>("additionalConstraints", this.additionalConstraints));
}
}
public class RenderLimitedBox : RenderProxyBox {

double maxHeight = double.PositiveInfinity
) : base(child) {
D.assert(maxWidth >= 0.0);
D.assert(maxHeight >= 0.0);
this._maxWidth = maxWidth;
this._maxHeight = maxHeight;
}

set {
D.assert(value >= 0.0);
if (this._maxWidth == value) {
return;
}

}
}
public double _maxWidth;
double _maxWidth;
D.assert(value >= 0.0);
if (this._maxHeight == value) {
return;
}

}
}
public double _maxHeight;
double _maxHeight;
public BoxConstraints _limitConstraints(BoxConstraints constraints) {
BoxConstraints _limitConstraints(BoxConstraints constraints) {
return new BoxConstraints(
minWidth: constraints.minWidth,
maxWidth: constraints.hasBoundedWidth

);
}
public override void performLayout() {
protected override void performLayout() {
if (this.child != null) {
this.child.layout(this._limitConstraints(this.constraints), parentUsesSize: true);
this.size = this.constraints.constrain(this.child.size);

}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DoubleProperty("maxWidth", this.maxWidth, defaultValue: double.PositiveInfinity));
properties.add(new DoubleProperty("maxHeight", this.maxHeight, defaultValue: double.PositiveInfinity));
}
}
public class RenderOpacity : RenderProxyBox {
public RenderOpacity(double opacity = 1.0, RenderBox child = null) : base(child) {
D.assert(opacity >= 0.0 && opacity <= 1.0);
this._opacity = opacity;
this._alpha = _getAlphaFromOpacity(opacity);
}
protected override bool alwaysNeedsCompositing {
get { return this.child != null && (this._alpha != 0 && this._alpha != 255); }
}
int _alpha;
static int _getAlphaFromOpacity(double opacity) {
return (opacity * 255).round();
}
public double opacity {
get { return this._opacity; }
set {
D.assert(value >= 0.0 && value <= 1.0);
if (this._opacity == value) {
return;
}
bool didNeedCompositing = this.alwaysNeedsCompositing;
this._opacity = value;
this._alpha = _getAlphaFromOpacity(this._opacity);
if (didNeedCompositing != this.alwaysNeedsCompositing) {
this.markNeedsCompositingBitsUpdate();
}
this.markNeedsPaint();
}
}
double _opacity;
public override void paint(PaintingContext context, Offset offset) {
if (this.child != null) {
if (this._alpha == 0) {
return;
}
}
if (this._alpha == 255) {
context.paintChild(this.child, offset);
return;
}
D.assert(this.needsCompositing);
context.pushOpacity(offset, this._alpha, base.paint);
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DoubleProperty("opacity", this.opacity));
}
}
public enum DecorationPosition {

public class RenderDecoratedBox : RenderProxyBox {
public RenderDecoratedBox(
Decoration decoration,
Decoration decoration = null,
D.assert(decoration != null);
public BoxPainter _painter;
BoxPainter _painter;
D.assert(value != null);
if (value == this._decoration) {
return;
}

}
}
public Decoration _decoration;
Decoration _decoration;
public DecorationPosition position {
get { return this._position; }

}
}
public DecorationPosition _position;
DecorationPosition _position;
D.assert(value != null);
if (value == this._configuration) {
return;
}

}
}
public ImageConfiguration _configuration;
ImageConfiguration _configuration;
public override void detach() {
if (this._painter != null) {

}
public override void paint(PaintingContext context, Offset offset) {
if (this._painter == null) {
this._painter = this._decoration.createBoxPainter(this.markNeedsPaint);
}
this._painter = this._painter ?? this._decoration.createBoxPainter(this.markNeedsPaint);
int debugSaveCount = 0;
D.assert(() => {
debugSaveCount = context.canvas.getSaveCount();
return true;
});
D.assert(() => {
if (debugSaveCount != context.canvas.getSaveCount()) {
throw new UIWidgetsError(
this._decoration.GetType() + " painter had mismatching save and restore calls.\n" +
"Before painting the decoration, the canvas save count was $debugSaveCount. " +
"After painting it, the canvas save count was " + context.canvas.getSaveCount() + ". " +
"Every call to save() or saveLayer() must be matched by a call to restore().\n" +
"The decoration was:\n" +
" " + this.decoration + "\n" +
"The painter was:\n" +
" " + this._painter
);
}
return true;
});
if (this.decoration.isComplex) {
context.setIsComplexHint();
}
}
base.paint(context, offset);

if (this.decoration.isComplex) {
context.setIsComplexHint();
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(this._decoration.toDiagnosticsNode(name: "decoration"));
properties.add(new DiagnosticsProperty<ImageConfiguration>("configuration", this.configuration));
}
}
public class RenderTransform : RenderProxyBox {
public RenderTransform(
Matrix4x4 transform,
Offset origin = null,
Alignment alignment = null,
bool transformHitTests = true,
RenderBox child = null
) : base(child) {
this.transform = transform;
this.origin = origin;
this.alignment = alignment;
this.transformHitTests = transformHitTests;
}
public Offset origin {
get { return this._origin; }
set {
if (this._origin == value) {
return;
}
this._origin = value;
this.markNeedsPaint();
}
}
Offset _origin;
public Alignment alignment {
get { return this._alignment; }
set {
if (this._alignment == value) {
return;
}
this._alignment = value;
this.markNeedsPaint();
}
}
Alignment _alignment;
public bool transformHitTests;
public Matrix4x4 transform {
set {
if (this._transform == value) {
return;
}
this._transform = value;
this.markNeedsPaint();
}
}
Matrix4x4 _transform;
public void setIdentity() {
this._transform = Matrix4x4.identity;
this.markNeedsPaint();
}
public void rotateX(double degrees) {
this._transform = Matrix4x4.Rotate(Quaternion.Euler((float) degrees, 0, 0)) * this._transform;
this.markNeedsPaint();
}
public void rotateY(double degrees) {
this._transform = Matrix4x4.Rotate(Quaternion.Euler(0, (float) degrees, 0)) * this._transform;
this.markNeedsPaint();
}
public void rotateZ(double degrees) {
this._transform = Matrix4x4.Rotate(Quaternion.Euler(0, 0, (float) degrees)) * this._transform;
this.markNeedsPaint();
}
public void translate(double x, double y = 0.0, double z = 0.0) {
this._transform = Matrix4x4.Translate(new Vector3((float) x, (float) y, (float) z)) * this._transform;
this.markNeedsPaint();
}
public void scale(double x, double y, double z) {
this._transform = Matrix4x4.Scale(new Vector3((float) x, (float) y, (float) z)) * this._transform;
this.markNeedsPaint();
}
Matrix4x4 _effectiveTransform {
get {
Alignment resolvedAlignment = this.alignment;
if (this._origin == null && resolvedAlignment == null) {
return this._transform;
}
var result = Matrix4x4.identity;
if (this._origin != null) {
result = Matrix4x4.Translate(new Vector2((float) this._origin.dx, (float) this._origin.dy)) *
result;
}
Offset translation = null;
if (resolvedAlignment != null) {
translation = resolvedAlignment.alongSize(this.size);
result = Matrix4x4.Translate(new Vector2((float) translation.dx, (float) translation.dy)) * result;
}
result = this._transform * result;
if (resolvedAlignment != null) {
result = Matrix4x4.Translate(new Vector2((float) -translation.dx, (float) -translation.dy)) *
result;
}
if (this._origin != null) {
result = Matrix4x4.Translate(new Vector2((float) -this._origin.dx, (float) -this._origin.dy)) *
result;
}
return result;
}
}
public override bool hitTest(HitTestResult result, Offset position = null) {
return this.hitTestChildren(result, position: position);
}
protected override bool hitTestChildren(HitTestResult result, Offset position = null) {
if (this.transformHitTests) {
var transform = this._effectiveTransform;
if (transform.determinant == 0) {
return false;
}
position = MatrixUtils.transformPoint(transform.inverse, position);
}
return base.hitTestChildren(result, position: position);
}
public override void paint(PaintingContext context, Offset offset) {
if (this.child != null) {
var transform = this._effectiveTransform;
Offset childOffset = MatrixUtils.getAsTranslation(ref transform);
if (childOffset == null) {
context.pushTransform(this.needsCompositing, offset, transform, base.paint);
} else {
base.paint(context, offset + childOffset);
}
}
}
public override void applyPaintTransform(RenderObject child, ref Matrix4x4 transform) {
transform = this._effectiveTransform * transform;
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DiagnosticsProperty<Matrix4x4>("transform matrix", this._transform));
properties.add(new DiagnosticsProperty<Offset>("origin", this.origin));
properties.add(new DiagnosticsProperty<Alignment>("alignment", this.alignment));
properties.add(new DiagnosticsProperty<bool>("transformHitTests", this.transformHitTests));
}
}
public delegate void PointerDownEventListener(PointerDownEvent evt);

public PointerCancelEventListener onPointerCancel;
public override void performResize() {
protected override void performResize() {
this.size = this.constraints.biggest;
}

}
}
public class RenderTransform : RenderProxyBox {
public RenderTransform(
Matrix4x4 transform,
Offset origin,
Alignment alignment,
TextDirection textDirection,
RenderBox child = null,
bool transformHitTests = true
) {
this.transform = transform;
this.origin = origin;
this.alignment = alignment;
this.textDirection = textDirection;
this.child = child;
this.transformHitTests = transformHitTests;
public class RenderRepaintBoundary : RenderProxyBox {
public RenderRepaintBoundary(
RenderBox child = null
) : base(child) {
public Offset origin {
get { return _origin; }
set {
if (_origin.Equals(value)) {
return;
}
_origin = value;
markNeedsPaint();
}
}
private Offset _origin;
public Alignment alignment {
get { return _alignment; }
set {
if (_alignment.Equals(value)) {
return;
}
_alignment = value;
markNeedsPaint();
}
}
private Alignment _alignment;
public TextDirection textDirection {
get { return _textDirection; }
set {
if (_textDirection.Equals(value)) {
return;
}
_textDirection = value;
markNeedsPaint();
}
public override bool isRepaintBoundary {
get { return true; }
private TextDirection _textDirection;
public bool transformHitTests;
public Matrix4x4 transform {
set {
if (_transform.Equals(value)) {
return;
}
_transform = value;
}
public int debugSymmetricPaintCount {
get { return this._debugSymmetricPaintCount; }
private Matrix4x4 _transform;
}
int _debugSymmetricPaintCount = 0;
public class RenderOpacity : RenderProxyBox {
public RenderOpacity(RenderBox child = null, double opacity = 1.0) : base(child) {
D.assert(opacity >= 0.0 && opacity <= 1.0);
this._opacity = opacity;
this._alpha = _getAlphaFromOpacity(opacity);
public int debugAsymmetricPaintCount {
get { return this._debugAsymmetricPaintCount; }
public override bool alwaysNeedsCompositing {
get { return base.alwaysNeedsCompositing; }
}
int _debugAsymmetricPaintCount = 0;
private int _alpha;
private static int _getAlphaFromOpacity(double opacity) {
return (opacity * 255).round();
public void debugResetMetrics() {
D.assert(() => {
this._debugSymmetricPaintCount = 0;
this._debugAsymmetricPaintCount = 0;
return true;
});
public double opacity {
get { return _opacity; }
set {
D.assert(value >= 0.0 && value <= 1.0);
if (_opacity == value) {
return;
public override void debugRegisterRepaintBoundaryPaint(bool includedParent = true, bool includedChild = false) {
D.assert(() => {
if (includedParent && includedChild) {
this._debugSymmetricPaintCount += 1;
} else {
this._debugAsymmetricPaintCount += 1;
bool didNeedCompositing = alwaysNeedsCompositing;
bool wasVisible = _alpha != 0;
_opacity = value;
_alpha = _getAlphaFromOpacity(_opacity);
if (didNeedCompositing != alwaysNeedsCompositing) {
markNeedsCompositingBitsUpdate();
}
return true;
});
}
markNeedsPaint();
}
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
bool inReleaseMode = true;
D.assert(() => {
inReleaseMode = false;
if (this.debugSymmetricPaintCount + this.debugAsymmetricPaintCount == 0) {
properties.add(new MessageProperty("usefulness ratio", "no metrics collected yet (never painted)"));
} else {
double fraction = (double) this.debugAsymmetricPaintCount /
(this.debugSymmetricPaintCount + this.debugAsymmetricPaintCount);
private double _opacity;
string diagnosis;
if (this.debugSymmetricPaintCount + this.debugAsymmetricPaintCount < 5) {
diagnosis = "insufficient data to draw conclusion (less than five repaints)";
} else if (fraction > 0.9) {
diagnosis = "this is an outstandingly useful repaint boundary and should definitely be kept";
} else if (fraction > 0.5) {
diagnosis = "this is a useful repaint boundary and should be kept";
} else if (fraction > 0.30) {
diagnosis =
"this repaint boundary is probably useful, but maybe it would be more useful in tandem with adding more repaint boundaries elsewhere";
} else if (fraction > 0.1) {
diagnosis = "this repaint boundary does sometimes show value, though currently not that often";
} else if (this.debugAsymmetricPaintCount == 0) {
diagnosis = "this repaint boundary is astoundingly ineffectual and should be removed";
} else {
diagnosis = "this repaint boundary is not very effective and should probably be removed";
}
public override void paint(PaintingContext context, Offset offset) {
if (child != null) {
if (_alpha == 0) {
return;
properties.add(new PercentProperty("metrics", fraction, unit: "useful",
tooltip: this.debugSymmetricPaintCount + " bad vs " + this.debugAsymmetricPaintCount + " good"));
properties.add(new MessageProperty("diagnosis", diagnosis));
}
if (_alpha == 255) {
context.paintChild(child, offset);
return;
return true;
});
if (inReleaseMode) {
properties.add(DiagnosticsNode.message("(run in checked mode to collect repaint boundary statistics)"));
D.assert(needsCompositing);
context.pushOpacity(offset, _alpha, base.paint);
}
}
public class RenderRepaintBoundary : RenderProxyBox {
public RenderRepaintBoundary(
RenderBox child = null
) : base(child) {
}
public override bool isRepaintBoundary {
get { return true; }
}
}

28
Assets/UIWidgets/rendering/proxy_box.mixin.gen.cs


}
}
public override double computeMinIntrinsicWidth(double height) {
protected override double computeMinIntrinsicWidth(double height) {
if (this.child != null) {
return this.child.getMinIntrinsicWidth(height);
}

public override double computeMaxIntrinsicWidth(double height) {
protected override double computeMaxIntrinsicWidth(double height) {
if (this.child != null) {
return this.child.getMaxIntrinsicWidth(height);
}

public override double computeMinIntrinsicHeight(double width) {
protected override double computeMinIntrinsicHeight(double width) {
if (this.child != null) {
return this.child.getMinIntrinsicHeight(width);
}

public override double computeMaxIntrinsicHeight(double width) {
protected override double computeMaxIntrinsicHeight(double width) {
if (this.child != null) {
return this.child.getMaxIntrinsicHeight(width);
}

public override double? computeDistanceToActualBaseline(TextBaseline baseline) {
protected override double? computeDistanceToActualBaseline(TextBaseline baseline) {
if (this.child != null) {
return this.child.getDistanceToActualBaseline(baseline);
}

public override void performLayout() {
protected override void performLayout() {
if (this.child != null) {
this.child.layout(this.constraints, parentUsesSize: true);
this.size = this.child.size;

}
protected override bool hitTestChildren(HitTestResult result, Offset position = null) {
if (this.child != null) {
return this.child.hitTest(result, position);
}
return false;
}
public override void applyPaintTransform(RenderObject child, ref Matrix4x4 transform) {
}

}
}
protected override bool hitTestChildren(HitTestResult result, Offset position = null) {
if (this.child != null) {
return this.child.hitTest(result, position);
}
return false;
}
}

28
Assets/UIWidgets/rendering/proxy_box.mixin.njk


}
}
public override double computeMinIntrinsicWidth(double height) {
protected override double computeMinIntrinsicWidth(double height) {
if (this.child != null) {
return this.child.getMinIntrinsicWidth(height);
}

public override double computeMaxIntrinsicWidth(double height) {
protected override double computeMaxIntrinsicWidth(double height) {
if (this.child != null) {
return this.child.getMaxIntrinsicWidth(height);
}

public override double computeMinIntrinsicHeight(double width) {
protected override double computeMinIntrinsicHeight(double width) {
if (this.child != null) {
return this.child.getMinIntrinsicHeight(width);
}

public override double computeMaxIntrinsicHeight(double width) {
protected override double computeMaxIntrinsicHeight(double width) {
if (this.child != null) {
return this.child.getMaxIntrinsicHeight(width);
}

public override double? computeDistanceToActualBaseline(TextBaseline baseline) {
protected override double? computeDistanceToActualBaseline(TextBaseline baseline) {
if (this.child != null) {
return this.child.getDistanceToActualBaseline(baseline);
}

public override void performLayout() {
protected override void performLayout() {
if (this.child != null) {
this.child.layout(this.constraints, parentUsesSize: true);
this.size = this.child.size;

}
protected override bool hitTestChildren(HitTestResult result, Offset position = null) {
if (this.child != null) {
return this.child.hitTest(result, position);
}
return false;
}
public override void applyPaintTransform(RenderObject child, ref Matrix4x4 transform) {
}

}
}
protected override bool hitTestChildren(HitTestResult result, Offset position = null) {
if (this.child != null) {
return this.child.hitTest(result, position);
}
return false;
}
}
{% endmacro %}

182
Assets/UIWidgets/rendering/shifted_box.cs


using System;
using UIWidgets.foundation;
using UIWidgets.gestures;
using UIWidgets.painting;
using UIWidgets.ui;

this.child = child;
}
public override double computeMinIntrinsicWidth(double height) {
protected override double computeMinIntrinsicWidth(double height) {
if (this.child != null) {
return this.child.getMinIntrinsicWidth(height);
}

public override double computeMaxIntrinsicWidth(double height) {
protected override double computeMaxIntrinsicWidth(double height) {
if (this.child != null) {
return this.child.getMaxIntrinsicWidth(height);
}

public override double computeMinIntrinsicHeight(double width) {
protected override double computeMinIntrinsicHeight(double width) {
if (this.child != null) {
return this.child.getMinIntrinsicHeight(width);
}

public override double computeMaxIntrinsicHeight(double width) {
protected override double computeMaxIntrinsicHeight(double width) {
if (this.child != null) {
return this.child.getMaxIntrinsicHeight(width);
}

public override double? computeDistanceToActualBaseline(TextBaseline baseline) {
protected override double? computeDistanceToActualBaseline(TextBaseline baseline) {
D.assert(!this.debugNeedsLayout);
result = this.child.getDistanceToActualBaseline(baseline);
if (result != null) {
var childParentData = (BoxParentData) this.child.parentData;

}
}
protected override bool hitTestChildren(HitTestResult result, Offset position = null)
{
if (child != null)
{
var childParentData = child.parentData as BoxParentData;
if (childParentData != null)
{
position = position - childParentData.offset;
}
return child.hitTest(result, position);
protected override bool hitTestChildren(HitTestResult result, Offset position = null) {
if (this.child != null) {
var childParentData = (BoxParentData) this.child.parentData;
return this.child.hitTest(result, position - childParentData.offset);
return false;
}
}

EdgeInsets padding = null,
RenderBox child = null
) : base(child) {
D.assert(padding != null);
D.assert(padding.isNonNegative);
this._padding = padding;
}

D.assert(value != null);
D.assert(value.isNonNegative);
if (this._padding == value) {
return;
}

}
}
public EdgeInsets _padding;
EdgeInsets _padding;
public override double computeMinIntrinsicWidth(double height) {
protected override double computeMinIntrinsicWidth(double height) {
if (this.child != null) {
return this.child.getMinIntrinsicWidth(Math.Max(0.0, height - this._padding.vertical)) +
this._padding.horizontal;

}
public override double computeMaxIntrinsicWidth(double height) {
protected override double computeMaxIntrinsicWidth(double height) {
if (this.child != null) {
return this.child.getMaxIntrinsicWidth(Math.Max(0.0, height - this._padding.vertical)) +
this._padding.horizontal;

}
public override double computeMinIntrinsicHeight(double width) {
protected override double computeMinIntrinsicHeight(double width) {
if (this.child != null) {
return this.child.getMinIntrinsicHeight(Math.Max(0.0, width - this._padding.horizontal)) +
this._padding.vertical;

}
public override double computeMaxIntrinsicHeight(double width) {
protected override double computeMaxIntrinsicHeight(double width) {
if (this.child != null) {
return this.child.getMaxIntrinsicHeight(Math.Max(0.0, width - this._padding.horizontal)) +
this._padding.vertical;

}
public override void performLayout() {
protected override void performLayout() {
if (this.child == null) {
this.size = this.constraints.constrain(this._padding.inflateSize(Size.zero));
return;

childParentData.offset = this._padding.topLeft;
this.size = this.constraints.constrain(this._padding.inflateSize(this.child.size));
}
protected override void debugPaintSize(PaintingContext context, Offset offset) {
base.debugPaintSize(context, offset);
D.assert(() => {
Rect outerRect = offset & size;
D.debugPaintPadding(context.canvas, outerRect, this.child != null ? this._padding.deflateRect(outerRect) : null);
return true;
});
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DiagnosticsProperty<EdgeInsets>("padding", this.padding));
}
}
public abstract class RenderAligningShiftedBox : RenderShiftedBox {

public Alignment alignment {
get { return this._alignment; }
set {
D.assert(value != null);
if (this._alignment == value) {
return;
}

}
}
public Alignment _alignment;
Alignment _alignment;
D.assert(this.child != null);
D.assert(!this.child.debugNeedsLayout);
D.assert(this.child.hasSize);
D.assert(this.hasSize);
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DiagnosticsProperty<Alignment>("alignment", this.alignment));
}
}

double? heightFactor = null,
Alignment alignment = null
) : base(alignment, child) {
D.assert(widthFactor == null || widthFactor >= 0.0);
D.assert(heightFactor == null || heightFactor >= 0.0);
this._widthFactor = widthFactor;
this._heightFactor = heightFactor;
}

set {
D.assert(value == null || value >= 0.0);
if (this._widthFactor == value) {
return;
}

}
}
public double? _widthFactor;
double? _widthFactor;
D.assert(value == null || value >= 0.0);
if (this._heightFactor == value) {
return;
}

}
}
public double? _heightFactor;
double? _heightFactor;
public override void performLayout() {
protected override void performLayout() {
bool shrinkWrapWidth = this._widthFactor != null || double.IsPositiveInfinity(this.constraints.maxWidth);
bool shrinkWrapHeight = this._heightFactor != null || double.IsPositiveInfinity(this.constraints.maxHeight);

shrinkWrapHeight ? 0.0 : double.PositiveInfinity));
}
}
protected override void debugPaintSize(PaintingContext context, Offset offset) {
base.debugPaintSize(context, offset);
D.assert(() => {
Paint paint;
if (this.child != null && !this.child.size.isEmpty) {
// Path path;
// paint = Paint()
// ..style = PaintingStyle.stroke
// ..strokeWidth = 1.0
// ..color = const Color(0xFFFFFF00);
// path = Path();
// final BoxParentData childParentData = child.parentData;
// if (childParentData.offset.dy > 0.0) {
// // vertical alignment arrows
// final double headSize = math.min(childParentData.offset.dy * 0.2, 10.0);
// path
// ..moveTo(offset.dx + size.width / 2.0, offset.dy)
// ..relativeLineTo(0.0, childParentData.offset.dy - headSize)
// ..relativeLineTo(headSize, 0.0)
// ..relativeLineTo(-headSize, headSize)
// ..relativeLineTo(-headSize, -headSize)
// ..relativeLineTo(headSize, 0.0)
// ..moveTo(offset.dx + size.width / 2.0, offset.dy + size.height)
// ..relativeLineTo(0.0, -childParentData.offset.dy + headSize)
// ..relativeLineTo(headSize, 0.0)
// ..relativeLineTo(-headSize, -headSize)
// ..relativeLineTo(-headSize, headSize)
// ..relativeLineTo(headSize, 0.0);
// context.canvas.drawPath(path, paint);
// }
// if (childParentData.offset.dx > 0.0) {
// // horizontal alignment arrows
// final double headSize = math.min(childParentData.offset.dx * 0.2, 10.0);
// path
// ..moveTo(offset.dx, offset.dy + size.height / 2.0)
// ..relativeLineTo(childParentData.offset.dx - headSize, 0.0)
// ..relativeLineTo(0.0, headSize)
// ..relativeLineTo(headSize, -headSize)
// ..relativeLineTo(-headSize, -headSize)
// ..relativeLineTo(0.0, headSize)
// ..moveTo(offset.dx + size.width, offset.dy + size.height / 2.0)
// ..relativeLineTo(-childParentData.offset.dx + headSize, 0.0)
// ..relativeLineTo(0.0, headSize)
// ..relativeLineTo(-headSize, -headSize)
// ..relativeLineTo(headSize, -headSize)
// ..relativeLineTo(0.0, headSize);
// context.canvas.drawPath(path, paint);
// }
} else {
// paint = Paint()
// ..color = const Color(0x90909090);
// context.canvas.drawRect(offset & size, paint);
}
return true;
});
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DoubleProperty("widthFactor", this._widthFactor, ifNull: "expand"));
properties.add(new DoubleProperty("heightFactor", this._heightFactor, ifNull: "expand"));
}
}
public class RenderConstrainedOverflowBox : RenderAligningShiftedBox {

);
}
public override bool sizedByParent {
protected override bool sizedByParent {
public override void performResize() {
protected override void performResize() {
public override void performLayout() {
protected override void performLayout() {
if (this.child != null) {
this.child.layout(this._getInnerConstraints(this.constraints), parentUsesSize: true);
this.alignChild();

public Rect _overflowChildRect = Rect.zero;
public bool _isOverflowing = false;
public override void performLayout() {
protected override void performLayout() {
if (this.child != null) {
BoxConstraints childConstraints = null;
if (this.constrainedAxis != null) {

public Size _requestedSize;
public override double computeMinIntrinsicWidth(double height) {
protected override double computeMinIntrinsicWidth(double height) {
public override double computeMaxIntrinsicWidth(double height) {
protected override double computeMaxIntrinsicWidth(double height) {
public override double computeMinIntrinsicHeight(double width) {
protected override double computeMinIntrinsicHeight(double width) {
public override double computeMaxIntrinsicHeight(double width) {
protected override double computeMaxIntrinsicHeight(double width) {
public override double? computeDistanceToActualBaseline(TextBaseline baseline) {
protected override double? computeDistanceToActualBaseline(TextBaseline baseline) {
if (this.child != null) {
return this.child.getDistanceToActualBaseline(baseline);
}

public override void performLayout() {
protected override void performLayout() {
this.size = this.constraints.constrain(this._requestedSize);
if (this.child != null) {
this.child.layout(this.constraints);

);
}
public override double computeMinIntrinsicWidth(double height) {
protected override double computeMinIntrinsicWidth(double height) {
double result;
if (this.child == null) {
result = base.computeMinIntrinsicWidth(height);

return result / (this._widthFactor ?? 1.0);
}
public override double computeMaxIntrinsicWidth(double height) {
protected override double computeMaxIntrinsicWidth(double height) {
double result;
if (this.child == null) {
result = base.computeMaxIntrinsicWidth(height);

return result / (this._widthFactor ?? 1.0);
}
public override double computeMinIntrinsicHeight(double width) {
protected override double computeMinIntrinsicHeight(double width) {
double result;
if (this.child == null) {
result = base.computeMinIntrinsicHeight(width);

return result / (this._heightFactor ?? 1.0);
}
public override double computeMaxIntrinsicHeight(double width) {
protected override double computeMaxIntrinsicHeight(double width) {
double result;
if (this.child == null) {
result = base.computeMaxIntrinsicHeight(width);

return result / (this._heightFactor ?? 1.0);
}
public override void performLayout() {
protected override void performLayout() {
if (this.child != null) {
this.child.layout(this._getInnerConstraints(this.constraints), parentUsesSize: true);
this.size = this.constraints.constrain(this.child.size);

public TextBaseline _baselineType;
public override void performLayout() {
protected override void performLayout() {
if (this.child != null) {
this.child.layout(this.constraints.loosen(), parentUsesSize: true);
double? childBaseline = this.child.getDistanceToBaseline(this.baselineType);

475
Assets/UIWidgets/rendering/sliver.cs


using System;
using System.Text;
using UIWidgets.foundation;
using UIWidgets.gestures;
using Canvas = UIWidgets.ui.Canvas;
using Rect = UIWidgets.ui.Rect;
namespace UIWidgets.rendering {

);
}
D.assert(false);
public override bool debugAssertIsValid(
bool isAppliedConstraint = false,
InformationCollector informationCollector = null
) {
D.assert(() => {
var verify = new Action<bool, string>((bool check, string message) => {
if (check) {
return;
}
var information = new StringBuilder();
if (informationCollector != null) {
informationCollector(information);
}
throw new UIWidgetsError(string.Format(
"{0} is not valid: {1}\n{2}The offending constraints were: \n {3}",
this.GetType(), message, information, this));
});
verify(this.scrollOffset >= 0.0, "The \"scrollOffset\" is negative.");
verify(this.crossAxisExtent >= 0.0, "The \"crossAxisExtent\" is negative.");
verify(
AxisUtils.axisDirectionToAxis(this.axisDirection) !=
AxisUtils.axisDirectionToAxis(this.crossAxisDirection),
"The \"axisDirection\" and the \"crossAxisDirection\" are along the same axis.");
verify(this.viewportMainAxisExtent >= 0.0, "The \"viewportMainAxisExtent\" is negative.");
verify(this.remainingPaintExtent >= 0.0, "The \"remainingPaintExtent\" is negative.");
verify(this.remainingCacheExtent >= 0.0, "The \"remainingCacheExtent\" is negative.");
verify(this.cacheOrigin <= 0.0, "The \"cacheOrigin\" is positive.");
verify(this.isNormalized, "The constraints are not normalized.");
return true;
});
return true;
}
public bool Equals(SliverConstraints other) {
if (object.ReferenceEquals(null, other)) return false;
if (object.ReferenceEquals(this, other)) return true;

}
public static bool operator ==(SliverConstraints left, SliverConstraints right) {
return Equals(left, right);
return object.Equals(left, right);
return !Equals(left, right);
return !object.Equals(left, right);
}
public override String ToString() {
return string.Format(
"SliverConstraints({0}, {1}, {2}, scrollOffset: {3:F1}, remainingPaintExtent: {4:F1}, " +
"{5}crossAxisExtent: {6:F1}, crossAxisDirection: {7}, " +
"viewportMainAxisExtent: {8:F1}, remainingCacheExtent: {9:F1} " +
"cacheOrigin: {10:F1})", this.axisDirection, this.growthDirection, this.userScrollDirection,
this.scrollOffset, this.remainingCacheExtent,
this.overlap != 0.0 ? "overlap: " + this.overlap.ToString("F1") + ", " : "",
this.crossAxisExtent, this.crossAxisDirection,
this.viewportMainAxisExtent, this.remainingCacheExtent, this.cacheOrigin);
public class SliverGeometry {
public class SliverGeometry : Diagnosticable {
public SliverGeometry(
double scrollExtent = 0.0,
double paintExtent = 0.0,

double? hitTestExtent = null,
bool? visible = null,
bool hasVisualOverflow = false,
double scrollOffsetCorrection = 0.0,
double? scrollOffsetCorrection = null,
D.assert(scrollOffsetCorrection != 0.0);
this.scrollExtent = scrollExtent;
this.paintExtent = paintExtent;
this.paintOrigin = paintOrigin;

public readonly double hitTestExtent;
public readonly bool visible;
public readonly bool hasVisualOverflow;
public readonly double scrollOffsetCorrection;
public readonly double? scrollOffsetCorrection;
}
public class SliverPhysicalParentData : ParentData {
public Offset paintOffset = Offset.zero;
internal static string _debugCompareFloats(string labelA, double valueA, string labelB, double valueB) {
if (valueA.ToString("F1") != valueB.ToString("F1")) {
return string.Format("The {0} is {1:F1}, but the {2} is {3:F1}. ", labelA, valueA, labelB, valueB);
}
public void applyPaintTransform(ref Matrix4x4 transform) {
transform = Matrix4x4.Translate(this.paintOffset.toVector()) * transform;
return string.Format(
"The {0} is {1}, but the {2} is {3}. " +
"Maybe you have fallen prey to floating point rounding errors, and should explicitly " +
"apply the min() or max() functions, or the clamp() method, to the {2}? ",
labelA, valueA, labelB, valueB);
}
public bool debugAssertIsValid(InformationCollector informationCollector = null) {
D.assert(() => {
var verify = new Action<bool, string>((bool check, string message) => {
if (check)
return;
var information = new StringBuilder();
if (informationCollector != null) {
informationCollector(information);
}
throw new UIWidgetsError(string.Format("{0} is not valid: {1}\n{2}", this.GetType(), message,
information));
});
verify(this.scrollExtent >= 0.0, "The \"scrollExtent\" is negative.");
verify(this.paintExtent >= 0.0, "The \"paintExtent\" is negative.");
verify(this.layoutExtent >= 0.0, "The \"layoutExtent\" is negative.");
verify(this.cacheExtent >= 0.0, "The \"cacheExtent\" is negative.");
if (this.layoutExtent > this.paintExtent) {
verify(false,
"The \"layoutExtent\" exceeds the \"paintExtent\".\n" +
_debugCompareFloats("paintExtent", paintExtent, "layoutExtent", layoutExtent)
);
}
if (this.maxPaintExtent < this.paintExtent) {
verify(false,
"The \"maxPaintExtent\" is less than the \"paintExtent\".\n" +
_debugCompareFloats("maxPaintExtent", this.maxPaintExtent, "paintExtent", this.paintExtent) +
"By definition, a sliver can\"t paint more than the maximum that it can paint!"
);
}
verify(this.hitTestExtent >= 0.0, "The \"hitTestExtent\" is negative.");
verify(this.scrollOffsetCorrection != 0.0, "The \"scrollOffsetCorrection\" is zero.");
return true;
});
return true;
}
public override string toStringShort() {
return this.GetType().ToString();
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DoubleProperty("scrollExtent", this.scrollExtent));
if (this.paintExtent > 0.0) {
properties.add(new DoubleProperty("paintExtent", this.paintExtent,
unit: this.visible ? null : " but not painting"));
} else if (this.paintExtent == 0.0) {
if (this.visible) {
properties.add(new DoubleProperty("paintExtent", this.paintExtent,
unit: this.visible ? null : " but visible"));
}
properties.add(new FlagProperty("visible", value: this.visible, ifFalse: "hidden"));
} else {
properties.add(new DoubleProperty("paintExtent", this.paintExtent, tooltip: "!"));
}
properties.add(new DoubleProperty("paintOrigin", this.paintOrigin,
defaultValue: 0.0));
properties.add(new DoubleProperty("layoutExtent", this.layoutExtent,
defaultValue: this.paintExtent));
properties.add(new DoubleProperty("maxPaintExtent", this.maxPaintExtent));
properties.add(new DoubleProperty("hitTestExtent", this.hitTestExtent,
defaultValue: this.paintExtent));
properties.add(new DiagnosticsProperty<bool>("hasVisualOverflow", this.hasVisualOverflow,
defaultValue: false));
properties.add(new DoubleProperty("scrollOffsetCorrection", this.scrollOffsetCorrection,
defaultValue: Diagnostics.kNullDefaultValue));
properties.add(new DoubleProperty("cacheExtent", this.cacheExtent,
defaultValue: 0.0));
public class SliverPhysicalContainerParentData : ContainerParentDataMixinSliverPhysicalParentData<RenderSliver> {
public class SliverHitTestEntry : HitTestEntry {
public SliverHitTestEntry(RenderSliver target,
double mainAxisPosition = 0.0,
double crossAxisPosition = 0.0
) : base(target) {
this.mainAxisPosition = mainAxisPosition;
this.crossAxisPosition = crossAxisPosition;
}
public new RenderSliver target {
get { return (RenderSliver) base.target; }
}
public readonly double mainAxisPosition;
public readonly double crossAxisPosition;
public override string ToString() {
return string.Format("{0}@(mainAix: {1}, crossAix: {2})", this.target.GetType(), this.mainAxisPosition,
this.crossAxisPosition);
}
public override string ToString() {
return "layoutOffset=" + this.layoutOffset.ToString("F1");
}
}
public class SliverLogicalContainerParentData : ContainerParentDataMixinSliverLogicalParentData<RenderSliver> {

public class SliverPhysicalParentData : ParentData {
public Offset paintOffset = Offset.zero;
public void applyPaintTransform(ref Matrix4x4 transform) {
transform = Matrix4x4.Translate(this.paintOffset.toVector()) * transform;
}
public override string ToString() {
return "paintOffset=" + this.paintOffset;
}
}
public class SliverPhysicalContainerParentData : ContainerParentDataMixinSliverPhysicalParentData<RenderSliver> {
}
public abstract class RenderSliver : RenderObject {
public new SliverConstraints constraints {
get { return (SliverConstraints) base.constraints; }

get { return this._geometry; }
set { this._geometry = value; }
set {
D.assert(!(this.debugDoingThisResize && this.debugDoingThisLayout));
D.assert(this.sizedByParent || !this.debugDoingThisResize);
D.assert(() => {
if ((this.sizedByParent && this.debugDoingThisResize) ||
(!this.sizedByParent && this.debugDoingThisLayout)) {
return true;
}
D.assert(!this.debugDoingThisResize);
string contract = "", violation = "", hint = "";
if (this.debugDoingThisLayout) {
D.assert(this.sizedByParent);
violation = "It appears that the geometry setter was called from performLayout().";
hint = "";
} else {
violation =
"The geometry setter was called from outside layout (neither performResize() nor performLayout() were being run for this object).";
if (this.owner != null && this.owner.debugDoingLayout) {
hint =
"Only the object itself can set its geometry. It is a contract violation for other objects to set it.";
}
}
if (this.sizedByParent) {
contract =
"Because this RenderSliver has sizedByParent set to true, it must set its geometry in performResize().";
} else {
contract =
"Because this RenderSliver has sizedByParent set to false, it must set its geometry in performLayout().";
}
throw new UIWidgetsError(
"RenderSliver geometry setter called incorrectly.\n" +
violation + "\n" +
hint + "\n" +
contract + "\n" +
"The RenderSliver in question is:\n" +
" " + this
);
});
this._geometry = value;
}
public SliverGeometry _geometry;
SliverGeometry _geometry;
public override Rect paintBounds {
get {

);
}
D.assert(false);
public override void performResize() {
protected override void debugResetSize() {
}
protected override void debugAssertDoesMeetConstraints() {
D.assert(this.geometry.debugAssertIsValid(
informationCollector: (information) => {
information.AppendLine("The RenderSliver that returned the offending geometry was:");
information.AppendLine(" " + this.toStringShallow(joiner: "\n "));
}));
D.assert(() => {
if (this.geometry.paintExtent > this.constraints.remainingPaintExtent) {
throw new UIWidgetsError(
"SliverGeometry has a paintOffset that exceeds the remainingPaintExtent from the constraints.\n" +
"The render object whose geometry violates the constraints is the following:\n" +
" " + this.toStringShallow(joiner: "\n ") + "\n" +
SliverGeometry._debugCompareFloats(
"remainingPaintExtent", this.constraints.remainingPaintExtent,
"paintExtent", this.geometry.paintExtent) +
"The paintExtent must cause the child sliver to paint within the viewport, and so " +
"cannot exceed the remainingPaintExtent."
);
}
return true;
});
}
protected override void performResize() {
D.assert(false);
}
public double centerOffsetAdjustment {

public bool hitTest(HitTestResult result, double mainAxisPosition = 0, double crossAxisPosition = 0) {
if (mainAxisPosition >= 0.0 && mainAxisPosition < this.geometry.hitTestExtent &&
crossAxisPosition >= 0.0 && crossAxisPosition < this.constraints.crossAxisExtent) {
if (this.hitTestChildren(result, mainAxisPosition: mainAxisPosition,
crossAxisPosition: crossAxisPosition) ||
this.hitTestSelf(mainAxisPosition: mainAxisPosition, crossAxisPosition: crossAxisPosition)) {
result.add(new SliverHitTestEntry(
this,
mainAxisPosition: mainAxisPosition,
crossAxisPosition: crossAxisPosition
));
return true;
}
}
return false;
}
protected virtual bool hitTestSelf(double mainAxisPosition = 0, double crossAxisPosition = 0) {
return false;
}
protected virtual bool hitTestChildren(HitTestResult result, double mainAxisPosition = 0,
double crossAxisPosition = 0) {
return false;
}
D.assert(from <= to);
double a = constraints.scrollOffset;
double b = constraints.scrollOffset + constraints.remainingPaintExtent;
return (to.clamp(a, b) - from.clamp(a, b)).clamp(0.0, constraints.remainingPaintExtent);

D.assert(from <= to);
double a = constraints.scrollOffset + constraints.cacheOrigin;
double b = constraints.scrollOffset + constraints.remainingCacheExtent;
return (to.clamp(a, b) - from.clamp(a, b)).clamp(0.0, constraints.remainingCacheExtent);

D.assert(() => { throw new UIWidgetsError(this.GetType() + " does not implement childPosition."); });
return 0.0;
}

public virtual double childScrollOffset(RenderObject child) {
D.assert(child.parent == this);
D.assert(() => { throw new UIWidgetsError(this.GetType() + " does not implement applyPaintTransform."); });
public Size getAbsoluteSizeRelativeToOrigin() {
internal Size getAbsoluteSizeRelativeToOrigin() {
D.assert(this.geometry != null);
D.assert(!this.debugNeedsLayout);
switch (GrowthDirectionUtils.applyGrowthDirectionToAxisDirection(
this.constraints.axisDirection, this.constraints.growthDirection)) {
case AxisDirection.up:

return new Size(-this.geometry.paintExtent, this.constraints.crossAxisExtent);
}
D.assert(false);
void _debugDrawArrow(Canvas canvas, Paint paint, Offset p0, Offset p1, GrowthDirection direction) {
D.assert(() => {
if (p0 == p1) {
return true;
}
D.assert(p0.dx == p1.dx || p0.dy == p1.dy);
double d = (p1 - p0).distance * 0.2;
Offset temp;
double dx1 = 0, dx2 = 0, dy1 = 0, dy2 = 0;
switch (direction) {
case GrowthDirection.forward:
dx1 = dx2 = dy1 = dy2 = d;
break;
case GrowthDirection.reverse:
temp = p0;
p0 = p1;
p1 = temp;
dx1 = dx2 = dy1 = dy2 = -d;
break;
}
if (p0.dx == p1.dx) {
dx2 = -dx2;
} else {
dy2 = -dy2;
}
// canvas.drawPath(
// new Path()
// ..moveTo(p0.dx, p0.dy)
// ..lineTo(p1.dx, p1.dy)
// ..moveTo(p1.dx - dx1, p1.dy - dy1)
// ..lineTo(p1.dx, p1.dy)
// ..lineTo(p1.dx - dx2, p1.dy - dy2),
// paint
// );
return true;
});
}
public override void debugPaint(PaintingContext context, Offset offset) {
D.assert(() => {
if (D.debugPaintSizeEnabled) {
double strokeWidth = Math.Min(4.0, this.geometry.paintExtent / 30.0);
Paint paint = new Paint();
// ..color = const Color(0xFF33CC33)
// ..strokeWidth = strokeWidth
// ..style = PaintingStyle.stroke
// ..maskFilter = new MaskFilter.blur(BlurStyle.solid, strokeWidth);
double arrowExtent = this.geometry.paintExtent;
double padding = Math.Max(2.0, strokeWidth);
Canvas canvas = context.canvas;
// canvas.drawCircle(
// offset.translate(padding, padding),
// padding * 0.5,
// paint,
// );
switch (constraints.axis) {
case Axis.vertical:
// canvas.drawLine(
// offset,
// offset.translate(constraints.crossAxisExtent, 0.0),
// paint,
// );
this._debugDrawArrow(
canvas,
paint,
offset.translate(this.constraints.crossAxisExtent * 1.0 / 4.0, padding),
offset.translate(this.constraints.crossAxisExtent * 1.0 / 4.0, arrowExtent - padding),
this.constraints.normalizedGrowthDirection
);
this._debugDrawArrow(
canvas,
paint,
offset.translate(this.constraints.crossAxisExtent * 3.0 / 4.0, padding),
offset.translate(this.constraints.crossAxisExtent * 3.0 / 4.0, arrowExtent - padding),
this.constraints.normalizedGrowthDirection
);
break;
case Axis.horizontal:
// canvas.drawLine(
// offset,
// offset.translate(0.0, constraints.crossAxisExtent),
// paint,
// );
this._debugDrawArrow(
canvas,
paint,
offset.translate(padding, this.constraints.crossAxisExtent * 1.0 / 4.0),
offset.translate(arrowExtent - padding, this.constraints.crossAxisExtent * 1.0 / 4.0),
this.constraints.normalizedGrowthDirection
);
this._debugDrawArrow(
canvas,
paint,
offset.translate(padding, this.constraints.crossAxisExtent * 3.0 / 4.0),
offset.translate(arrowExtent - padding, this.constraints.crossAxisExtent * 3.0 / 4.0),
this.constraints.normalizedGrowthDirection
);
break;
}
}
return true;
});
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DiagnosticsProperty<SliverGeometry>("geometry", this.geometry));
}
D.assert(constraints != null);
switch (constraints.axisDirection) {
case AxisDirection.up:
case AxisDirection.left:

return rightWayUp;
}
public static bool hitTestBoxChild(this RenderSliver it, HitTestResult result, RenderBox child,
double mainAxisPosition = 0.0, double crossAxisPosition = 0.0) {
bool rightWayUp = _getRightWayUp(it.constraints);
double absolutePosition = mainAxisPosition - it.childMainAxisPosition(child);
double absoluteCrossAxisPosition = crossAxisPosition - it.childCrossAxisPosition(child);
switch (it.constraints.axis) {
case Axis.horizontal:
if (!rightWayUp) {
absolutePosition = child.size.width - absolutePosition;
}
return child.hitTest(result, position: new Offset(absolutePosition, absoluteCrossAxisPosition));
case Axis.vertical:
if (!rightWayUp) {
absolutePosition = child.size.height - absolutePosition;
}
return child.hitTest(result, position: new Offset(absoluteCrossAxisPosition, absolutePosition));
}
return false;
}
bool rightWayUp = RenderSliverHelpers._getRightWayUp(it.constraints);
bool rightWayUp = _getRightWayUp(it.constraints);
double delta = it.childMainAxisPosition(child);
double crossAxisDelta = it.childCrossAxisPosition(child);
switch (it.constraints.axis) {

}
}
protected override bool hitTestChildren(HitTestResult result, double mainAxisPosition = 0.0,
double crossAxisPosition = 0.0) {
D.assert(this.geometry.hitTestExtent > 0.0);
if (this.child != null) {
return this.hitTestBoxChild(result, this.child, mainAxisPosition: mainAxisPosition,
crossAxisPosition: crossAxisPosition);
}
return false;
}
D.assert(child != null);
D.assert(child == this.child);
var childParentData = (SliverPhysicalParentData) child.parentData;
childParentData.applyPaintTransform(ref transform);
}

) : base(child) {
}
public override void performLayout() {
protected override void performLayout() {
if (this.child == null) {
this.geometry = SliverGeometry.zero;
return;

double paintedChildSize = this.calculatePaintOffset(this.constraints, from: 0.0, to: childExtent);
double cacheExtent = this.calculateCacheOffset(this.constraints, from: 0.0, to: childExtent);
D.assert(paintedChildSize.isFinite());
D.assert(paintedChildSize >= 0.0);
this.geometry = new SliverGeometry(
scrollExtent: childExtent,

29
Assets/UIWidgets/rendering/sliver_fixed_extent_list.cs


using System;
using UIWidgets.foundation;
using UIWidgets.ui;
namespace UIWidgets.rendering {

public abstract double itemExtent { get; set; }
public double indexToLayoutOffset(double itemExtent, int index) {
protected double indexToLayoutOffset(double itemExtent, int index) {
public int getMinChildIndexForScrollOffset(double scrollOffset, double itemExtent) {
protected int getMinChildIndexForScrollOffset(double scrollOffset, double itemExtent) {
public int getMaxChildIndexForScrollOffset(double scrollOffset, double itemExtent) {
protected int getMaxChildIndexForScrollOffset(double scrollOffset, double itemExtent) {
public double? estimateMaxScrollOffset(SliverConstraints constraints,
protected double estimateMaxScrollOffset(SliverConstraints constraints,
int firstIndex = 0,
int lastIndex = 0,
double leadingScrollOffset = 0.0,

);
}
public double computeMaxScrollOffset(SliverConstraints constraints, double itemExtent) {
protected double computeMaxScrollOffset(SliverConstraints constraints, double itemExtent) {
public override void performLayout() {
protected override void performLayout() {
this.childManager.didStartLayout();
this.childManager.setDidUnderflow(false);

D.assert(scrollOffset >= 0.0);
D.assert(remainingExtent >= 0.0);
double targetEndScrollOffset = scrollOffset + remainingExtent;
BoxConstraints childConstraints = this.constraints.asBoxConstraints(

int firstIndex = this.getMinChildIndexForScrollOffset(scrollOffset, itemExtent);
int? targetLastIndex = !double.IsInfinity(targetEndScrollOffset)
int? targetLastIndex = targetEndScrollOffset.isFinite()
? this.getMaxChildIndexForScrollOffset(targetEndScrollOffset, itemExtent)
: (int?) null;

var childParentData = (SliverMultiBoxAdaptorParentData) child.parentData;
childParentData.layoutOffset = this.indexToLayoutOffset(itemExtent, index);
D.assert(childParentData.index == index);
trailingChildWithLayout = trailingChildWithLayout ?? child;
}

}
trailingChildWithLayout = child;
D.assert(child != null);
var childParentData = (SliverMultiBoxAdaptorParentData) child.parentData;
childParentData.layoutOffset = this.indexToLayoutOffset(itemExtent, childParentData.index);
}

double trailingScrollOffset = this.indexToLayoutOffset(itemExtent, lastIndex + 1);
D.assert(firstIndex == 0 || this.childScrollOffset(firstChild) <= scrollOffset);
D.assert(this.debugAssertChildListIsNonEmptyAndContiguous());
D.assert(this.indexOf(firstChild) == firstIndex);
D.assert(targetLastIndex == null || lastIndex <= targetLastIndex);
double estimatedMaxScrollOffset = this.estimateMaxScrollOffset(
this.constraints,
firstIndex: firstIndex,

).Value;
);
double paintExtent = this.calculatePaintOffset(
this.constraints,

hasVisualOverflow: (targetLastIndexForPaint != null && lastIndex >= targetLastIndexForPaint)
|| this.constraints.scrollOffset > 0.0
);
if (estimatedMaxScrollOffset == trailingScrollOffset) {
this.childManager.setDidUnderflow(true);
}

33
Assets/UIWidgets/rendering/sliver_list.cs


using System;
using UIWidgets.foundation;
namespace UIWidgets.rendering {
public class RenderSliverList : RenderSliverMultiBoxAdaptor {

}
public override void performLayout() {
protected override void performLayout() {
D.assert(scrollOffset >= 0.0);
D.assert(remainingExtent >= 0.0);
double targetEndScrollOffset = scrollOffset + remainingExtent;
BoxConstraints childConstraints = this.constraints.asBoxConstraints();
int leadingGarbage = 0;

if (firstChildScrollOffset < 0.0) {
double correction = 0.0;
while (earliestUsefulChild != null) {
correction += this.paintExtentOf(firstChild);
D.assert(this.firstChild == earliestUsefulChild);
correction += this.paintExtentOf(this.firstChild);
earliestUsefulChild =
this.insertAndLayoutLeadingChild(childConstraints, parentUsesSize: true);
}

} else {
var childParentData = (SliverMultiBoxAdaptorParentData) earliestUsefulChild.parentData;
childParentData.layoutOffset = firstChildScrollOffset;
D.assert(earliestUsefulChild == this.firstChild);
leadingChildWithLayout = earliestUsefulChild;
trailingChildWithLayout = trailingChildWithLayout ?? earliestUsefulChild;
}

D.assert(earliestUsefulChild == this.firstChild);
D.assert(this.childScrollOffset(earliestUsefulChild) <= scrollOffset);
if (leadingChildWithLayout == null) {
earliestUsefulChild.layout(childConstraints, parentUsesSize: true);
leadingChildWithLayout = earliestUsefulChild;

double endScrollOffset = this.childScrollOffset(child) + this.paintExtentOf(child);
Func<bool> advance = () => {
D.assert(child != null);
if (child == trailingChildWithLayout) {
inLayoutRange = false;
}

index += 1;
if (!inLayoutRange) {
if (child == null || this.indexOf(child) != index) {
child = insertAndLayoutChild(childConstraints,
child = this.insertAndLayoutChild(childConstraints,
after: trailingChildWithLayout,
parentUsesSize: true
);

trailingChildWithLayout = child;
}
D.assert(child != null);
D.assert(childParentData.index == index);
endScrollOffset = this.childScrollOffset(child) + this.paintExtentOf(child);
return true;
};

if (!advance()) {
D.assert(leadingGarbage == this.childCount);
D.assert(child == null);
D.assert(this.firstChild == this.lastChild);
double extent = this.childScrollOffset(this.lastChild) + this.paintExtentOf(this.lastChild);
this.geometry = new SliverGeometry(
scrollExtent: extent,

this.collectGarbage(leadingGarbage, trailingGarbage);
double estimatedMaxScrollOffset;
D.assert(this.debugAssertChildListIsNonEmptyAndContiguous());
double? estimatedMaxScrollOffset;
if (reachedEnd) {
estimatedMaxScrollOffset = endScrollOffset;
} else {

lastIndex: this.indexOf(this.lastChild),
leadingScrollOffset: this.childScrollOffset(this.firstChild),
trailingScrollOffset: endScrollOffset
).Value;
);
D.assert(estimatedMaxScrollOffset >= endScrollOffset - this.childScrollOffset(this.firstChild));
}
double paintExtent = this.calculatePaintOffset(

double targetEndScrollOffsetForPaint =
this.constraints.scrollOffset + this.constraints.remainingPaintExtent;
this.geometry = new SliverGeometry(
scrollExtent: estimatedMaxScrollOffset,
scrollExtent: estimatedMaxScrollOffset.Value,
maxPaintExtent: estimatedMaxScrollOffset,
maxPaintExtent: estimatedMaxScrollOffset.Value,
hasVisualOverflow: endScrollOffset > targetEndScrollOffsetForPaint ||
this.constraints.scrollOffset > 0.0
);

151
Assets/UIWidgets/rendering/sliver_multi_box_adaptor.cs


using System.Collections.Generic;
using System.Linq;
using UIWidgets.foundation;
using UIWidgets.gestures;
using UIWidgets.painting;
using UIWidgets.ui;
using UnityEngine;

void removeChild(RenderBox child);
double? estimateMaxScrollOffset(
double estimateMaxScrollOffset(
SliverConstraints constraints,
int firstIndex = 0,
int lastIndex = 0,

void didStartLayout();
void didFinishLayout();
bool debugAssertChildListLocked();
}

public bool keepAlive = false;
public bool _keptAlive = false;
internal bool _keptAlive = false;
public override string ToString() {
return string.Format(
"index={0}; {1}{2}", this.index, this.keepAlive ? "keeyAlive; " : "", base.ToString());
}
}
public abstract class RenderSliverMultiBoxAdaptor

) {
D.assert(childManager != null);
this._childManager = childManager;
}

}
}
public RenderSliverBoxChildManager childManager {
protected RenderSliverBoxChildManager childManager {
public RenderSliverBoxChildManager _childManager;
readonly RenderSliverBoxChildManager _childManager;
public readonly Dictionary<int, RenderBox> _keepAliveBucket = new Dictionary<int, RenderBox>();
readonly Dictionary<int, RenderBox> _keepAliveBucket = new Dictionary<int, RenderBox>();
protected override void adoptChild(AbstractNodeMixinDiagnosticableTree childNode) {
base.adoptChild(childNode);

}
}
bool _debugAssertChildListLocked() {
return this.childManager.debugAssertChildListLocked();
}
D.assert(this.firstChild != null);
D.assert(() => {
int index = this.indexOf(this.firstChild);
RenderBox childAfter = this.childAfter(this.firstChild);
while (childAfter != null) {
D.assert(this.indexOf(childAfter) > index);
index = this.indexOf(childAfter);
childAfter = this.childAfter(childAfter);
}
return true;
});
}
public override void remove(RenderBox child) {

return;
}
D.assert(this._keepAliveBucket[childParentData.index] == child);
this._keepAliveBucket.Remove(childParentData.index);
this.dropChild(child);
}

}
void _createOrObtainChild(int index, RenderBox after = null) {
this.invokeLayoutCallback<SliverConstraints>((SliverConstraints constraints) => {
this.invokeLayoutCallback<SliverConstraints>(constraints => {
D.assert(constraints == this.constraints);
D.assert(childParentData._keptAlive);
this.dropChild(child);
child.parentData = childParentData;
this.insert(child, after: after);

public void _destroyOrCacheChild(RenderBox child) {
var childParentData = (SliverMultiBoxAdaptorParentData) child.parentData;
if (childParentData.keepAlive) {
D.assert(!childParentData._keptAlive);
this.remove(child);
this._keepAliveBucket[childParentData.index] = child;
child.parentData = childParentData;

D.assert(child.parent == this);
D.assert(child.parent == null);
}
}

}
}
public bool addInitialChild(int index = 0, double layoutOffset = 0.0) {
protected bool addInitialChild(int index = 0, double layoutOffset = 0.0) {
D.assert(this._debugAssertChildListLocked());
D.assert(this.firstChild == null);
D.assert(this.firstChild == this.lastChild);
D.assert(this.indexOf(this.firstChild) == index);
var firstChildParentData = (SliverMultiBoxAdaptorParentData) this.firstChild.parentData;
firstChildParentData.layoutOffset = layoutOffset;
return true;

return false;
}
public RenderBox insertAndLayoutLeadingChild(BoxConstraints childConstraints, bool parentUsesSize = false) {
protected RenderBox insertAndLayoutLeadingChild(BoxConstraints childConstraints, bool parentUsesSize = false) {
D.assert(this._debugAssertChildListLocked());
int index = this.indexOf(this.firstChild) - 1;
this._createOrObtainChild(index, after: null);
if (this.indexOf(this.firstChild) == index) {

return null;
}
public RenderBox insertAndLayoutChild(
protected RenderBox insertAndLayoutChild(
D.assert(this._debugAssertChildListLocked());
D.assert(after != null);
int index = this.indexOf(after) + 1;
this._createOrObtainChild(index, after: after);
RenderBox child = this.childAfter(after);

return null;
}
public void collectGarbage(int leadingGarbage, int trailingGarbage) {
this.invokeLayoutCallback<SliverConstraints>((SliverConstraints constraints) => {
protected void collectGarbage(int leadingGarbage, int trailingGarbage) {
D.assert(this._debugAssertChildListLocked());
D.assert(this.childCount >= leadingGarbage + trailingGarbage);
this.invokeLayoutCallback<SliverConstraints>(constraints => {
while (leadingGarbage > 0) {
this._destroyOrCacheChild(this.firstChild);
leadingGarbage -= 1;

trailingGarbage -= 1;
}
this._keepAliveBucket.Values.Where((RenderBox child) => {
this._keepAliveBucket.Values.Where(child => {
D.assert(this._keepAliveBucket.Values.Where(child => {
var childParentData = (SliverMultiBoxAdaptorParentData) child.parentData;
return !childParentData.keepAlive;
}).ToList().isEmpty());
D.assert(child != null);
public double paintExtentOf(RenderBox child) {
protected double paintExtentOf(RenderBox child) {
D.assert(child != null);
D.assert(child.hasSize);
switch (this.constraints.axis) {
case Axis.horizontal:
return child.size.width;

return 0.0;
}
protected override bool hitTestChildren(HitTestResult result, double mainAxisPosition = 0.0,
double crossAxisPosition = 0.0) {
RenderBox child = this.lastChild;
while (child != null) {
if (this.hitTestBoxChild(result, child, mainAxisPosition: mainAxisPosition,
crossAxisPosition: crossAxisPosition)) {
return true;
}
child = this.childBefore(child);
}
return false;
}
D.assert(child != null);
D.assert(child.parent == this);
var childParentData = (SliverMultiBoxAdaptorParentData) child.parentData;
return childParentData.layoutOffset;
}

child = this.childAfter(child);
}
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(DiagnosticsNode.message(this.firstChild != null
? "currently live children: " + this.indexOf(this.firstChild) + " to " + this.indexOf(this.lastChild)
: "no children current live"));
}
public bool debugAssertChildListIsNonEmptyAndContiguous() {
D.assert(() => {
D.assert(this.firstChild != null);
int index = this.indexOf(this.firstChild);
RenderBox child = this.childAfter(this.firstChild);
while (child != null) {
index += 1;
D.assert(this.indexOf(child) == index);
child = this.childAfter(child);
}
return true;
});
return true;
}
public override List<DiagnosticsNode> debugDescribeChildren() {
var children = new List<DiagnosticsNode>();
if (this.firstChild != null) {
RenderBox child = this.firstChild;
while (true) {
var childParentData = (SliverMultiBoxAdaptorParentData) child.parentData;
children.Add(child.toDiagnosticsNode(name: "child with index " + childParentData.index));
if (child == this.lastChild) {
break;
}
child = childParentData.nextSibling;
}
}
if (this._keepAliveBucket.isNotEmpty()) {
List<int> indices = this._keepAliveBucket.Keys.ToList();
indices.Sort();
foreach (int index in indices) {
children.Add(this._keepAliveBucket[index].toDiagnosticsNode(
name: "child with index " + index + " (kept alive offstage)",
style: DiagnosticsTreeStyle.offstage
));
}
}
return children;
}
}
}

86
Assets/UIWidgets/rendering/sliver_padding.cs


using System;
using UIWidgets.foundation;
using UIWidgets.gestures;
using Rect = UIWidgets.ui.Rect;
namespace UIWidgets.rendering {
public class RenderSliverPadding : RenderObjectWithChildMixinRenderSliver<RenderSliver> {

) {
D.assert(padding != null);
D.assert(padding.isNonNegative);
this._padding = padding;
this.child = child;
}

set {
D.assert(value != null);
D.assert(value.isNonNegative);
if (this._padding == value) {
return;
}

}
}
public EdgeInsets _padding;
EdgeInsets _padding;
D.assert(this.constraints != null);
switch (GrowthDirectionUtils.applyGrowthDirectionToAxisDirection(
this.constraints.axisDirection, this.constraints.growthDirection)) {
case AxisDirection.up:

public double afterPadding {
get {
D.assert(this.constraints != null);
switch (GrowthDirectionUtils.applyGrowthDirectionToAxisDirection(
this.constraints.axisDirection, this.constraints.growthDirection)) {
case AxisDirection.up:

}
public double mainAxisPadding {
get { return this._padding.along(this.constraints.axis); }
get {
D.assert(this.constraints != null);
return this._padding.along(this.constraints.axis);
}
D.assert(this.constraints != null);
switch (this.constraints.axis) {
case Axis.horizontal:
return this._padding.vertical;

D.assert(false);
return 0.0;
}
}

}
}
public override void performLayout() {
protected override void performLayout() {
double beforePadding = this.beforePadding;
double afterPadding = this.afterPadding;
double mainAxisPadding = this.mainAxisPadding;

);
SliverGeometry childLayoutGeometry = this.child.geometry;
if (childLayoutGeometry.scrollOffsetCorrection != 0.0) {
if (childLayoutGeometry.scrollOffsetCorrection != null) {
this.geometry = new SliverGeometry(
scrollOffsetCorrection: childLayoutGeometry.scrollOffsetCorrection
);

this._padding.top);
break;
}
D.assert(childParentData.paintOffset != null);
D.assert(beforePadding == this.beforePadding);
D.assert(afterPadding == this.afterPadding);
D.assert(mainAxisPadding == this.mainAxisPadding);
D.assert(crossAxisPadding == this.crossAxisPadding);
}
protected override bool hitTestChildren(HitTestResult result, double mainAxisPosition = 0.0,
double crossAxisPosition = 0.0) {
if (this.child != null && this.child.geometry.hitTestExtent > 0.0) {
return this.child.hitTest(result,
mainAxisPosition: mainAxisPosition - this.childMainAxisPosition(this.child),
crossAxisPosition: crossAxisPosition - this.childCrossAxisPosition(this.child));
}
return false;
D.assert(child != null);
D.assert(child == this.child);
D.assert(child != null);
D.assert(child == this.child);
D.assert(this.constraints != null);
switch (GrowthDirectionUtils.applyGrowthDirectionToAxisDirection(
this.constraints.axisDirection, this.constraints.growthDirection)) {
case AxisDirection.up:

}
public override double childScrollOffset(RenderObject child) {
D.assert(child.parent == this);
D.assert(child != null);
D.assert(child == this.child);
var childParentData = (SliverPhysicalParentData) child.parentData;
childParentData.applyPaintTransform(ref transform);
}

var childParentData = (SliverPhysicalParentData) this.child.parentData;
context.paintChild(this.child, offset + childParentData.paintOffset);
}
}
public override void debugPaint(PaintingContext context, Offset offset) {
base.debugPaint(context, offset);
D.assert(() => {
if (D.debugPaintSizeEnabled) {
Size parentSize = this.getAbsoluteSizeRelativeToOrigin();
Rect outerRect = offset & parentSize;
Size childSize = null;
Rect innerRect = null;
if (this.child != null) {
childSize = this.child.getAbsoluteSizeRelativeToOrigin();
var childParentData = (SliverPhysicalParentData) this.child.parentData;
innerRect = (offset + childParentData.paintOffset) & childSize;
D.assert(innerRect.top >= outerRect.top);
D.assert(innerRect.left >= outerRect.left);
D.assert(innerRect.right <= outerRect.right);
D.assert(innerRect.bottom <= outerRect.bottom);
}
D.debugPaintPadding(context.canvas, outerRect, innerRect);
}
return true;
});
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DiagnosticsProperty<EdgeInsets>("padding", this.padding));
}
}
}

46
Assets/UIWidgets/rendering/view.cs


using System;
using UIWidgets.foundation;
using UIWidgets.gestures;
using UIWidgets.ui;
using UnityEngine;

public RenderView(
RenderBox child = null,
ViewConfiguration configuration = null) {
D.assert(configuration != null);
this.child = child;
this._configuration = configuration;
}

}
public Size _size = Size.zero;
Size _size = Size.zero;
D.assert(value != null);
if (value == this._configuration) {
return;
}

}
}
public ViewConfiguration _configuration;
ViewConfiguration _configuration;
D.assert(this.owner != null);
public Matrix4x4 _rootTransform;
Matrix4x4 _rootTransform;
public Layer _updateMatricesAndCreateNewRootLayer() {
this._rootTransform = this.configuration.toMatrix();

}
public override void performResize() {
throw new NotImplementedException();
protected override void debugAssertDoesMeetConstraints() {
D.assert(false);
}
protected override void performResize() {
D.assert(false);
public override void performLayout() {
protected override void performLayout() {
D.assert(this._size.isFinite);
if (this.child != null) {
this.child.layout(BoxConstraints.tight(this._size));
}

this.layer.addToScene(builder, Offset.zero);
var scene = builder.build();
Window.instance.render(scene);
scene.dispose();
D.assert(() => {
// if (D.debugRepaintRainbowEnabled || D.debugRepaintTextRainbowEnabled) {
// debugCurrentRepaintColor =
// debugCurrentRepaintColor.withHue((debugCurrentRepaintColor.hue + 2.0) % 360.0);
// }
return true;
});
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
D.assert(() => {
properties.add(DiagnosticsNode.message("debug mode enabled"));
return true;
});
properties.add(new DiagnosticsProperty<Size>("window size", Window.instance.physicalSize,
tooltip: "in physical pixels"));
properties.add(new DoubleProperty("device pixel ratio", Window.instance.devicePixelRatio,
tooltip: "physical pixels per logical pixel"));
properties.add(new DiagnosticsProperty<ViewConfiguration>("configuration", this.configuration,
tooltip: "in logical pixels"));
}
}
}

10
Assets/UIWidgets/ui/compositing.cs


this._layerBuilder.pushTransform(matrix);
}
public void pushClipRect(Rect rect) {
public void pushClipRect(Rect rect, Clip clipBehavior = Clip.hardEdge) {
public void pushClipRRect(RRect rrect) {
public void pushClipRRect(RRect rrect, Clip clipBehavior = Clip.antiAlias) {
this._layerBuilder.pushClipRRect(rrect);
}

this._layerBuilder.pop();
}
public void addPicture(Offset offset, Picture picture) {
public void addPicture(Offset offset, Picture picture,
bool isComplexHint = false, bool willChangeHint = false) {
this._layerBuilder.addPicture(offset, picture);
}

public Layer takeLayer() {
return this._rootLayer;
}
public void dispose() {
}
}
}

14
Assets/UIWidgets/ui/geometry.cs


return Math.Sign(value);
}
public static bool isInfinite(this double it) {
return double.IsInfinity(it);
}
public static bool isNaN(this double it) {
return double.IsNaN(it);
}
public static double lerpDouble(double a, double b, double t) {
return a + (b - a) * t;
}

}
public static int floor(this double value) {
return (int) Math.Floor(value);
}

public Rect inflate(double delta) {
return Rect.fromLTRB(this.left - delta, this.top - delta, this.right + delta, this.bottom + delta);
}
public Rect deflate(double delta) {
return this.inflate(-delta);
}
public Rect intersect(Rect other) {

29
Assets/UIWidgets/ui/painting/canvas.cs


void restore();
void clipRect(Rect rect);
int getSaveCount();
void clipRRect(RRect rrect);
void clipRect(Rect rect, bool doAntiAlias = true);
void clipRRect(RRect rrect, bool doAntiAlias = true);
void drawTextBlob(TextBlob textBlob, double x, double y);
}

this._recorder = recorder;
}
private readonly PictureRecorder _recorder;
readonly PictureRecorder _recorder;
int _saveCount = 1;
public void drawPloygon4(Offset[] points, Paint paint) {
this._recorder.addDrawCmd(new DrawPloygon4 {

}
public void drawImageRect(Rect src, Rect dst, Paint paint, Image image) {
this._recorder.addDrawCmd(new DrawImageRect
{
this._recorder.addDrawCmd(new DrawImageRect {
paint = paint,
image = image,
src = src,

}
public void save() {
this._saveCount++;
this._saveCount++;
this._recorder.addDrawCmd(new DrawSaveLayer {
rect = rect,
paint = paint,

public void restore() {
this._saveCount--;
public void clipRect(Rect rect) {
public int getSaveCount() {
return this._saveCount;
}
public void clipRect(Rect rect, bool doAntiAlias = true) {
public void clipRRect(RRect rrect) {
public void clipRRect(RRect rrect, bool doAntiAlias = true) {
public void drawTextBlob(TextBlob textBlob, double x, double y)
{
public void drawTextBlob(TextBlob textBlob, double x, double y) {
this._recorder.addDrawCmd(new DrawTextBlob() {
textBlob = textBlob,
x = x,

}
}
}

14
Assets/UIWidgets/ui/painting/canvas_impl.cs


}
public void drawImageRect(Rect src, Rect dst, Paint paint, Image image) {
if (image != null) {
Texture2D _texture = new Texture2D(0, 0);
_texture.LoadImage(image.rawData);
Graphics.DrawTexture(dst.toRect(), _texture);
if (image != null && image.texture != null) {
Graphics.DrawTexture(dst.toRect(), image.texture);
}
}

}
}
public void clipRect(Rect rect) {
public int getSaveCount() {
return this._stack.Count + 1;
}
public void clipRect(Rect rect, bool doAntiAlias = true) {
if (rect.isInfinite) {
return;
}

public void clipRRect(RRect rect) {
public void clipRRect(RRect rect, bool doAntiAlias = true) {
if (rect.isInfinite) {
return;
}

36
Assets/UIWidgets/ui/painting/image.cs


using System;
using System.Collections.Generic;
using UIWidgets.painting;
using UnityEngine;
namespace UIWidgets.ui

public Image(byte[] raw, int height = 100, int width = 100) {
this.rawData = raw;
this.height = height;
this.width = width;
public Image(byte[] raw) {
rawData = raw;
public int height;
public int width;
public int height {
get {
return texture != null ? texture.height : 0;
}
}
public int width {
get {
return texture != null ? texture.width : 0;
}
}
public Texture2D texture {
get {
if (_texture == null && rawData.Length != 0) {
_texture = new Texture2D(2, 2);
_texture.LoadImage(rawData);
}
return _texture;
}
}
private Texture2D _texture;
}
}

25
Assets/UIWidgets/ui/painting/painting.cs


}
}
public enum Clip {
none,
hardEdge,
antiAlias,
antiAliasWithSaveLayer,
}
public class Paint {
public Color color;
public double blurSigma;

}
}
public class ColorFilter {
public ColorFilter(Color color, BlendMode blendMode) {
_color = color;
_blendMode = blendMode;
}
Color _color;
BlendMode _blendMode;
}
// public class ColorFilter {
// public ColorFilter(Color color, BlendMode blendMode) {
// _color = color;
// _blendMode = blendMode;
// }
//
// Color _color;
// BlendMode _blendMode;
// }
public enum BlendMode {
None = 0, // explicitly assign zero to make it more clear

13
Assets/UIWidgets/ui/painting/txt/font_manager.cs


using System.Collections.Generic;
using System.Linq;
using UIWidgets.foundation;
using UnityEngine;
namespace UIWidgets.ui

{
return founded;
}
var newFont = Font.CreateDynamicFontFromOSFont(names,
fontSize);
if (names.SequenceEqual(new string[] {"MaterialIcons"})) {
var font = Resources.Load<Font>("MaterialIcons-Regular");
D.assert(font != null);
_fonts.Add(font);
return font;
}
var newFont = Font.CreateDynamicFontFromOSFont(names, fontSize);
_fonts.Add(newFont);
return newFont;
}

24
Assets/UIWidgets/ui/painting/txt/mesh_generator.cs


using UIWidgets.ui.txt;
using UnityEditor;
using UnityEngine;
namespace UIWidgets.ui.painting.txt

var triangles = new int[length * 6];
var uv = new Vector2[length * 4];
var text = textBlob.text;
var scale = EditorGUIUtility.pixelsPerPoint;
var fontSizeToLoad = (int)scale * style.UnityFontSize;
style.UnityFontSize, style.UnityFontStyle);
fontSizeToLoad, style.UnityFontStyle);
for (int charIndex = 0; charIndex < length; ++charIndex)
{
var ch = text[charIndex + textBlob.start];

}
else
{
font.GetCharacterInfo(ch, out charInfo, style.UnityFontSize, style.UnityFontStyle);
vertices[4 * charIndex + 0] = offset + new Vector3((float)(position.x + charInfo.minX),
(float)(position.y - charInfo.maxY), 0);
vertices[4 * charIndex + 1] = offset + new Vector3((float)(position.x + charInfo.maxX),
(float)(position.y - charInfo.maxY), 0);
font.GetCharacterInfo(ch, out charInfo, fontSizeToLoad, style.UnityFontStyle);
var minX = charInfo.minX / scale;
var maxX = charInfo.maxX / scale;
var minY = charInfo.minY / scale;
var maxY = charInfo.maxY / scale;
vertices[4 * charIndex + 0] = offset + new Vector3((float)(position.x + minX),
(float)(position.y - maxY), 0);
vertices[4 * charIndex + 1] = offset + new Vector3((float)(position.x + maxX),
(float)(position.y - maxY), 0);
(float)(position.x + charInfo.maxX), (float)(position.y - charInfo.minY), 0);
(float)(position.x + maxX), (float)(position.y - minY), 0);
(float)(position.x + charInfo.minX), (float)(position.y - charInfo.minY), 0);
(float)(position.x + minX), (float)(position.y - minY), 0);
uv[4 * charIndex + 0] = charInfo.uvTopLeft;
uv[4 * charIndex + 1] = charInfo.uvTopRight;

2
Assets/UIWidgets/ui/text.cs


public readonly double letterSpacing = 0.0;
public readonly double wordSpacing = 0.0;
public readonly TextBaseline textBaseline = TextBaseline.alphabetic;
public readonly double height = 1.0;
public double height = 1.0;
public readonly TextDecoration decoration = TextDecoration.none;
public readonly Color decorationColor;
public readonly TextDecorationStyle decorationStyle = TextDecorationStyle.solid;

2
Assets/UIWidgets/ui/txt/paragraph.cs


if (run != null && run.start < run.end && run.start < line.end && run.end > line.start)
{
var font = FontManager.instance.getOrCreate(run.style.fontFamily, run.style.UnityFontSize);
var styleHeight = (double) run.style.UnityFontSize / font.fontSize;
run.style.height = styleHeight;
var metrics = FontMetrics.fromFont(font, run.style.height);
var ascent = font.ascent * (run.style.height);
var descent = (font.lineHeight - font.ascent) * (run.style.height);

572
Assets/UIWidgets/widgets/basic.cs


using System.Collections.Generic;
using System.Linq;
using UIWidgets.foundation;
using UIWidgets.painting;
using UIWidgets.rendering;

public class LimitedBox : SingleChildRenderObjectWidget {
public LimitedBox(
Key key = null,
Widget child = null,
double maxHeight = double.MaxValue
double maxHeight = double.MaxValue,
Widget child = null
D.assert(maxWidth >= 0.0);
D.assert(maxHeight >= 0.0);
public double maxWidth;
public double maxHeight;
public readonly double maxWidth;
public readonly double maxHeight;
maxWidth: maxWidth,
maxHeight: maxHeight
maxWidth: this.maxWidth,
maxHeight: this.maxHeight
public override void updateRenderObject(BuildContext context, RenderObject renderObject) {
((RenderLimitedBox) renderObject).maxWidth = maxWidth;
((RenderLimitedBox) renderObject).maxHeight = maxHeight;
public override void updateRenderObject(BuildContext context, RenderObject renderObjectRaw) {
var renderObject = (RenderLimitedBox) renderObjectRaw;
renderObject.maxWidth = this.maxWidth;
renderObject.maxHeight = this.maxHeight;
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DoubleProperty("maxWidth", this.maxWidth, defaultValue: double.PositiveInfinity));
properties.add(new DoubleProperty("maxHeight", this.maxHeight, defaultValue: double.PositiveInfinity));
}
}
public class SizedBox : SingleChildRenderObjectWidget {
public SizedBox(Key key = null, double? width = null, double? height = null, Widget child = null)
: base(key: key, child: child) {
this.width = width;
this.height = height;
}
public static SizedBox expand(Key key = null, Widget child = null) {
return new SizedBox(key, double.PositiveInfinity, double.PositiveInfinity, child);
}
public static SizedBox shrink(Key key = null, Widget child = null) {
return new SizedBox(key, 0, 0, child);
}
public static SizedBox fromSize(Key key = null, Widget child = null, Size size = null) {
return new SizedBox(key,
size == null ? (double?) null : size.width,
size == null ? (double?) null : size.height, child);
}
public readonly double? width;
public readonly double? height;
public override RenderObject createRenderObject(BuildContext context) {
return new RenderConstrainedBox(
additionalConstraints: this._additionalConstraints
);
}
BoxConstraints _additionalConstraints {
get { return BoxConstraints.tightFor(width: this.width, height: this.height); }
}
public override void updateRenderObject(BuildContext context, RenderObject renderObjectRaw) {
var renderObject = (RenderConstrainedBox) renderObjectRaw;
renderObject.additionalConstraints = this._additionalConstraints;
}
public override string toStringShort() {
string type;
if (this.width == double.PositiveInfinity && this.height == double.PositiveInfinity) {
type = this.GetType() + "expand";
} else if (this.width == 0.0 && this.height == 0.0) {
type = this.GetType() + "shrink";
} else {
type = this.GetType() + "";
}
return this.key == null ? type : type + "-" + this.key;
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
DiagnosticLevel level;
if ((this.width == double.PositiveInfinity && this.height == double.PositiveInfinity) ||
(this.width == 0.0 && this.height == 0.0)) {
level = DiagnosticLevel.hidden;
} else {
level = DiagnosticLevel.info;
}
properties.add(new DoubleProperty("width", this.width,
defaultValue: Diagnostics.kNullDefaultValue,
level: level));
properties.add(new DoubleProperty("height", this.height,
defaultValue: Diagnostics.kNullDefaultValue,
level: level));
public class ConstrainedBox : SingleChildRenderObjectWidget {
public ConstrainedBox(

) : base(key, child) {
D.assert(constraints != null);
D.assert(constraints.debugAssertIsValid());
public BoxConstraints constraints;
public readonly BoxConstraints constraints;
return new RenderConstrainedBox(additionalConstraints: constraints);
return new RenderConstrainedBox(additionalConstraints: this.constraints);
}
public override void updateRenderObject(BuildContext context, RenderObject renderObjectRaw) {
var renderObject = (RenderConstrainedBox) renderObjectRaw;
renderObject.additionalConstraints = this.constraints;
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DiagnosticsProperty<BoxConstraints>("constraints",
this.constraints, showName: false));
}
}
public class Flex : MultiChildRenderObjectWidget {
public Flex(
Axis direction = Axis.vertical,
TextDirection? textDirection = null,
TextBaseline? textBaseline = null,
Key key = null,
MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
MainAxisSize mainAxisSize = MainAxisSize.max,
CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
VerticalDirection verticalDirection = VerticalDirection.down,
List<Widget> children = null
) : base(key, children) {
this.direction = direction;
this.mainAxisAlignment = mainAxisAlignment;
this.mainAxisSize = mainAxisSize;
this.crossAxisAlignment = crossAxisAlignment;
this.textDirection = textDirection;
this.verticalDirection = verticalDirection;
this.textBaseline = textBaseline;
}
public Axis direction;
public MainAxisAlignment mainAxisAlignment;
public MainAxisSize mainAxisSize;
public CrossAxisAlignment crossAxisAlignment;
public TextDirection? textDirection;
public VerticalDirection verticalDirection;
public TextBaseline? textBaseline;
private bool _needTextDirection {
get {
D.assert(direction != null);
switch (direction) {
case Axis.horizontal:
return true;
case Axis.vertical:
return (this.crossAxisAlignment == CrossAxisAlignment.start ||
this.crossAxisAlignment == CrossAxisAlignment.end);
}
return false;
}
}
public TextDirection getEffectiveTextDirection(BuildContext context) {
return textDirection ?? (_needTextDirection ? Directionality.of(context) : TextDirection.ltr);
}
public override RenderObject createRenderObject(BuildContext context) {
return new RenderFlex(
direction: direction,
mainAxisAlignment: mainAxisAlignment,
mainAxisSize: mainAxisSize,
crossAxisAlignment: crossAxisAlignment,
textDirection: getEffectiveTextDirection(context),
verticalDirection: verticalDirection,
textBaseline: textBaseline ?? TextBaseline.alphabetic
);
((RenderConstrainedBox) renderObject)._additionalConstraints = constraints;
((RenderFlex) renderObject).direction = this.direction;
((RenderFlex) renderObject).mainAxisAlignment = this.mainAxisAlignment;
((RenderFlex) renderObject).mainAxisSize = this.mainAxisSize;
((RenderFlex) renderObject).crossAxisAlignment = this.crossAxisAlignment;
((RenderFlex) renderObject).textDirection = this.textDirection ?? TextDirection.ltr;
((RenderFlex) renderObject).verticalDirection = this.verticalDirection;
((RenderFlex) renderObject).textBaseline = this.textBaseline ?? TextBaseline.alphabetic;
}
}
public class Row : Flex {
public Row(
TextDirection? textDirection = null,
TextBaseline? textBaseline = null,
Key key = null,
MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
MainAxisSize mainAxisSize = MainAxisSize.max,
CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
VerticalDirection verticalDirection = VerticalDirection.down,
List<Widget> children = null
) : base(
children: children,
key: key,
direction: Axis.horizontal,
textDirection: textDirection,
textBaseline: textBaseline,
mainAxisAlignment: mainAxisAlignment,
mainAxisSize: mainAxisSize,
crossAxisAlignment: crossAxisAlignment,
verticalDirection: verticalDirection
) {
}
}
public class Column : Flex {
public Column(
TextDirection? textDirection = null,
TextBaseline? textBaseline = null,
Key key = null,
MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
MainAxisSize mainAxisSize = MainAxisSize.max,
CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
VerticalDirection verticalDirection = VerticalDirection.down,
List<Widget> children = null
) : base(
children: children,
key: key,
direction: Axis.vertical,
textDirection: textDirection,
textBaseline: textBaseline,
mainAxisAlignment: mainAxisAlignment,
mainAxisSize: mainAxisSize,
crossAxisAlignment: crossAxisAlignment,
verticalDirection: verticalDirection
) {
}
}
public class Flexible : ParentDataWidget {
public Flexible(
Key key = null,
int flex = 1,
FlexFit fit = FlexFit.loose,
Widget child = null
) : base(key: key, child: child) {
this.flex = flex;
this.fit = fit;
}
public readonly int flex;
public readonly FlexFit fit;
public override void applyParentData(RenderObject renderObject) {
D.assert(renderObject.parentData is FlexParentData);
FlexParentData parentData = (FlexParentData) renderObject.parentData;
bool needsLayout = false;
if (parentData.flex != this.flex) {
parentData.flex = this.flex;
needsLayout = true;
}
if (parentData.fit != this.fit) {
parentData.fit = this.fit;
needsLayout = true;
}
if (needsLayout) {
var targetParent = renderObject.parent;
if (targetParent is RenderObject) {
((RenderObject) targetParent).markNeedsLayout();
}
}
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new IntProperty("flex", this.flex));
EdgeInsets padding,
EdgeInsets padding = null,
D.assert(padding != null);
public EdgeInsets padding;
public readonly EdgeInsets padding;
padding: padding
padding: this.padding
public override void updateRenderObject(BuildContext context, RenderObject renderObject) {
((RenderPadding) renderObject).padding = padding;
public override void updateRenderObject(BuildContext context, RenderObject renderObjectRaw) {
var renderObject = (RenderPadding) renderObjectRaw;
renderObject.padding = this.padding;
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DiagnosticsProperty<EdgeInsets>("padding", this.padding));
Matrix4x4 transform,
Key key = null,
Matrix4x4? transform = null,
bool transformHitTests = false,
Key key = null,
bool transformHitTests = true,
this.alignment = alignment ?? Alignment.center;
D.assert(transform != null);
this.transform = transform.Value;
this.alignment = alignment;
this.transform = transform;
// scale
public Transform(
double scale,
Offset origin,
Alignment alignment,
bool transformHitTests = false,
private Transform(
Key key = null,
Offset origin = null,
Alignment alignment = null,
bool transformHitTests = true,
Widget child = null,
double degree = 0.0
) : base(key: key, child: child) {
this.transform = Matrix4x4.Rotate(Quaternion.Euler(0, 0, (float) degree));
this.origin = origin;
this.alignment = alignment;
this.transformHitTests = transformHitTests;
}
public static Transform rotate(
Key key = null,
double degree = 0.0,
Offset origin = null,
Alignment alignment = null,
bool transformHitTests = true,
Widget child = null
) {
return new Transform(key, origin, alignment, transformHitTests, child, degree);
}
private Transform(
Key key = null,
Offset offset = null,
bool transformHitTests = true,
Widget child = null
) : base(key: key, child: child) {
D.assert(offset != null);
this.transform = Matrix4x4.Translate(new Vector3((float) offset.dx, (float) offset.dy, 0.0f));
this.origin = null;
this.alignment = null;
this.transformHitTests = transformHitTests;
}
public static Transform translate(
Key key = null,
Offset offset = null,
bool transformHitTests = true,
Widget child = null
) {
return new Transform(key, offset, transformHitTests, child);
}
private Transform(
double scale = 1.0,
Offset origin = null,
Alignment alignment = null,
bool transformHitTests = true,
) : base(key, child) {
this.alignment = alignment ?? Alignment.center;
) : base(key: key, child: child) {
this.transform = Matrix4x4.Scale(new Vector3((float) scale, (float) scale, 1.0f));
this.alignment = alignment;
this.transform = Matrix4x4.Scale(new Vector3((float) scale, (float) scale, (float) 1.0));
public Matrix4x4 transform;
public Offset origin;
public Alignment alignment;
public bool transformHitTests;
public static Transform scale(
Key key = null,
double scale = 1.0,
Offset origin = null,
Alignment alignment = null,
bool transformHitTests = true,
Widget child = null
) {
return new Transform(key, scale, origin, alignment, transformHitTests, child);
}
public readonly Matrix4x4 transform;
public readonly Offset origin;
public readonly Alignment alignment;
public readonly bool transformHitTests;
transform: transform,
origin: origin,
alignment: alignment,
textDirection: Directionality.of(context),
transformHitTests: transformHitTests
transform: this.transform,
origin: this.origin,
alignment: this.alignment,
transformHitTests: this.transformHitTests
public override void updateRenderObject(BuildContext context, RenderObject renderObject) {
((RenderTransform) renderObject).transform = transform;
((RenderTransform) renderObject).origin = origin;
((RenderTransform) renderObject).alignment = alignment;
((RenderTransform) renderObject).textDirection = Directionality.of(context);
((RenderTransform) renderObject).transformHitTests = transformHitTests;
public override void updateRenderObject(BuildContext context, RenderObject renderObjectRaw) {
var renderObject = (RenderTransform) renderObjectRaw;
renderObject.transform = this.transform;
renderObject.origin = this.origin;
renderObject.alignment = this.alignment;
renderObject.transformHitTests = this.transformHitTests;
double widthFactor = 0.0,
double heightFactor = 0.0,
Widget child = null,
Alignment alignment = null
Alignment alignment = null,
double? widthFactor = null,
double? heightFactor = null,
Widget child = null
D.assert(widthFactor == null || widthFactor >= 0.0);
D.assert(heightFactor == null || heightFactor >= 0.0);
public Alignment alignment;
public readonly Alignment alignment;
public double widthFactor;
public readonly double? widthFactor;
public double heightFactor;
public readonly double? heightFactor;
alignment: alignment,
widthFactor: widthFactor,
heightFactor: heightFactor
alignment: this.alignment,
widthFactor: this.widthFactor,
heightFactor: this.heightFactor
public override void updateRenderObject(BuildContext context, RenderObject renderObjectRaw) {
var renderObject = (RenderPositionedBox) renderObjectRaw;
renderObject.alignment = this.alignment;
renderObject.widthFactor = this.widthFactor;
renderObject.heightFactor = this.heightFactor;
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DiagnosticsProperty<Alignment>("alignment", this.alignment));
properties.add(new DoubleProperty("widthFactor",
this.widthFactor, defaultValue: Diagnostics.kNullDefaultValue));
properties.add(new DoubleProperty("heightFactor",
this.heightFactor, defaultValue: Diagnostics.kNullDefaultValue));
}
}
public class Center : Align {
public Center(
Key key = null,
double? widthFactor = null,
double? heightFactor = null,
Widget child = null)
: base(
key: key,
widthFactor: widthFactor,
heightFactor: heightFactor,
child: child) {
}
}
public class SliverPadding : SingleChildRenderObjectWidget {

}
}
public class RichText : LeafRenderObjectWidget
{
public RichText(TextSpan text, Key key = null,
TextAlign textAlign = TextAlign.left, TextDirection? textDirection = null,
bool softWrap = true, TextOverflow overflow = TextOverflow.clip, double textScaleFactor = 1.0,
int maxLines = 0): base(key)
{
public class RichText : LeafRenderObjectWidget {
public RichText(
Key key = null,
TextSpan text = null,
TextAlign textAlign = TextAlign.left,
bool softWrap = true,
TextOverflow overflow = TextOverflow.clip,
double textScaleFactor = 1.0,
int? maxLines = null
) : base(key: key) {
D.assert(maxLines == null || maxLines > 0);
this.textDirection = textDirection;
public override RenderObject createRenderObject(BuildContext context) {
D.assert(textDirection != null || WidgetsD.debugCheckHasDirectionality(context));
return new RenderParagraph(text,
textAlign: textAlign,
textDirection: textDirection ?? Directionality.of(context),
softWrap: softWrap,
overflow: overflow,
textScaleFactor: textScaleFactor,
maxLines: maxLines
public readonly TextSpan text;
public readonly TextAlign textAlign;
public readonly bool softWrap;
public readonly TextOverflow overflow;
public readonly double textScaleFactor;
public readonly int? maxLines;
public override RenderObject createRenderObject(BuildContext context) {
return new RenderParagraph(
this.text,
textAlign: this.textAlign,
softWrap: this.softWrap,
overflow: this.overflow,
textScaleFactor: this.textScaleFactor,
maxLines: this.maxLines ?? 0 // todo: maxLines should be nullable.
public override void updateRenderObject(BuildContext context, RenderObject r) {
D.assert(textDirection != null || WidgetsD.debugCheckHasDirectionality(context));
var renderObject = (RenderParagraph) (r);
renderObject.text = text;
renderObject.textAlign = textAlign;
renderObject.textDirection = textDirection ?? Directionality.of(context);
renderObject.softWrap = softWrap;
renderObject.overflow = overflow;
renderObject.textScaleFactor = textScaleFactor;
renderObject.maxLines = maxLines;
public override void updateRenderObject(BuildContext context, RenderObject renderObjectRaw) {
var renderObject = (RenderParagraph) renderObjectRaw;
renderObject.text = this.text;
renderObject.textAlign = this.textAlign;
renderObject.softWrap = this.softWrap;
renderObject.overflow = this.overflow;
renderObject.textScaleFactor = this.textScaleFactor;
renderObject.maxLines = this.maxLines ?? 0; // todo: maxLines should be nullable.
properties.add(new EnumProperty<TextAlign>("textAlign", textAlign, defaultValue: TextAlign.left));
properties.add(new EnumProperty<TextDirection?>("textDirection", textDirection, defaultValue: null));
properties.add(new FlagProperty("softWrap", value: softWrap, ifTrue: "wrapping at box width", ifFalse: "no wrapping except at line break characters", showName: true));
properties.add(new EnumProperty<TextOverflow>("overflow", overflow, defaultValue: TextOverflow.clip));
properties.add(new DoubleProperty("textScaleFactor", textScaleFactor, defaultValue: 1.0));
properties.add(new IntProperty("maxLines", maxLines, ifNull: "unlimited"));
properties.add(new StringProperty("text", text.toPlainText()));
properties.add(new EnumProperty<TextAlign>("textAlign", this.textAlign, defaultValue: TextAlign.left));
properties.add(new FlagProperty("softWrap", value: this.softWrap, ifTrue: "wrapping at box width",
ifFalse: "no wrapping except at line break characters", showName: true));
properties.add(new EnumProperty<TextOverflow>("overflow", this.overflow, defaultValue: TextOverflow.clip));
properties.add(new DoubleProperty("textScaleFactor", this.textScaleFactor, defaultValue: 1.0));
properties.add(new IntProperty("maxLines", this.maxLines, ifNull: "unlimited"));
properties.add(new StringProperty("text", this.text.toPlainText()));
public readonly TextSpan text;
public readonly TextAlign textAlign;
public readonly TextDirection? textDirection;
public readonly bool softWrap;
public readonly TextOverflow overflow;
public readonly double textScaleFactor;
public readonly int maxLines;
}
public class RawImage : LeafRenderObjectWidget {

}
public static List<RepaintBoundary> wrapAll(List<Widget> widgets) {
List<RepaintBoundary> result = new List<RepaintBoundary>(widgets.Count);
List<RepaintBoundary> result = Enumerable.Repeat((RepaintBoundary) null, widgets.Count).ToList();
for (int i = 0; i < result.Count; ++i) {
result[i] = RepaintBoundary.wrap(widgets[i], i);
}

}
}
public class Builder : StatelessWidget
{
public Builder(WidgetBuilder builder, Key key = null) : base(key)
{
public class Builder : StatelessWidget {
public Builder(
Key key = null,
WidgetBuilder builder = null
) : base(key: key) {
D.assert(builder != null);
this.builder = builder;
}

public override Widget build(BuildContext context)
{
return builder(context);
public override Widget build(BuildContext context) {
return this.builder(context);
}
}
}

155
Assets/UIWidgets/widgets/container.cs


using UIWidgets.foundation;
using UIWidgets.rendering;
using UIWidgets.painting;
using UnityEngine;
using Color = UIWidgets.ui.Color;
Decoration decoration,
Widget child,
DecorationPosition position = DecorationPosition.background
Decoration decoration = null,
DecorationPosition position = DecorationPosition.background,
Widget child = null
D.assert(decoration != null);
public Decoration decoration;
public readonly Decoration decoration;
public DecorationPosition position;
public readonly DecorationPosition position;
decoration: decoration,
position: position,
decoration: this.decoration,
position: this.position,
public override void updateRenderObject(BuildContext context, RenderObject renderObject) {
((RenderDecoratedBox) renderObject).decoration = decoration;
((RenderDecoratedBox) renderObject).configuration = ImageUtil.createLocalImageConfiguration(context);
((RenderDecoratedBox) renderObject).position = position;
public override void updateRenderObject(BuildContext context, RenderObject renderObjectRaw) {
var renderObject = (RenderDecoratedBox) renderObjectRaw;
renderObject.decoration = this.decoration;
renderObject.configuration = ImageUtil.createLocalImageConfiguration(context);
renderObject.position = this.position;
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
string label = "decoration";
switch (this.position) {
case DecorationPosition.background:
label = "bg";
break;
case DecorationPosition.foreground:
label = "fg";
break;
}
properties.add(new EnumProperty<DecorationPosition>(
"position", this.position, level: DiagnosticLevel.hidden));
properties.add(new DiagnosticsProperty<Decoration>(
label,
this.decoration,
ifNull: "no decoration",
showName: this.decoration != null
));
// todo transform
ui.Color color = null,
Color color = null,
double width = 0.0,
double height = 0.0,
double? width = null,
double? height = null,
// Matrix4x4 transfrom = default(Matrix4x4),
Matrix4x4? transfrom = null,
D.assert(margin == null || margin.isNonNegative);
D.assert(padding == null || padding.isNonNegative);
D.assert(decoration == null || decoration.debugAssertIsValid());
D.assert(constraints == null || constraints.debugAssertIsValid());
D.assert(color == null || decoration == null,
"Cannot provide both a color and a decoration\n" +
"The color argument is just a shorthand for \"decoration: new BoxDecoration(color: color)\"."
);
this.padding = padding;
// this.transform = transfrom;
this.transform = transfrom;
this.padding = padding;
this.constraints = (width != 0.0 || height != 0.0)
? ((constraints == null ? null : constraints.tighten(width, height))
?? BoxConstraints.tightFor(width, height))
this.constraints = (width != null || height != null)
? (constraints != null ? constraints.tighten(width, height) : BoxConstraints.tightFor(width, height))
public Widget child;
public Alignment alignment;
public EdgeInsets padding;
public Decoration decoration;
public Decoration foregroundDecoration;
public BoxConstraints constraints;
public EdgeInsets margin;
// public Matrix4x4 transform;
public readonly Widget child;
public readonly Alignment alignment;
public readonly EdgeInsets padding;
public readonly Decoration decoration;
public readonly Decoration foregroundDecoration;
public readonly BoxConstraints constraints;
public readonly EdgeInsets margin;
public readonly Matrix4x4? transform;
if (decoration == null || decoration.padding == null)
return padding;
EdgeInsets decorationPadding = decoration.padding;
if (padding == null)
if (this.decoration == null || this.decoration.padding == null) {
return this.padding;
}
EdgeInsets decorationPadding = this.decoration.padding;
if (this.padding == null) {
return padding.add(decorationPadding);
}
return this.padding.add(decorationPadding);
Widget current = child;
Widget current = this.child;
if (child == null && (constraints == null || !constraints.isTight)) {
if (this.child == null && (this.constraints == null || !this.constraints.isTight)) {
current = new LimitedBox(
maxWidth: 0.0,
maxHeight: 0.0,

if (alignment != null) {
current = new Align(alignment: alignment, child: current);
if (this.alignment != null) {
current = new Align(alignment: this.alignment, child: current);
EdgeInsets effetivePadding = _paddingIncludingDecoration;
EdgeInsets effetivePadding = this._paddingIncludingDecoration;
if (decoration != null) {
current = new DecoratedBox(decoration: decoration, child: current);
if (this.decoration != null) {
current = new DecoratedBox(decoration: this.decoration, child: current);
if (foregroundDecoration != null) {
if (this.foregroundDecoration != null) {
decoration: decoration,
decoration: this.foregroundDecoration,
if (constraints != null) {
current = new ConstrainedBox(constraints: constraints, child: current);
if (this.constraints != null) {
current = new ConstrainedBox(constraints: this.constraints, child: current);
if (margin != null) {
current = new Padding(padding: margin, child: current);
if (this.margin != null) {
current = new Padding(padding: this.margin, child: current);
// if (transform != null) {
// current = new Transform(transform: transform, child: current);
// }
if (this.transform != null) {
current = new Transform(transform: this.transform.Value, child: current);
}
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DiagnosticsProperty<Alignment>("alignment",
this.alignment, showName: false, defaultValue: Diagnostics.kNullDefaultValue));
properties.add(new DiagnosticsProperty<EdgeInsets>("padding",
this.padding, defaultValue: Diagnostics.kNullDefaultValue));
properties.add(new DiagnosticsProperty<Decoration>("bg",
this.decoration, defaultValue: Diagnostics.kNullDefaultValue));
properties.add(new DiagnosticsProperty<Decoration>("fg",
this.foregroundDecoration, defaultValue: Diagnostics.kNullDefaultValue));
properties.add(new DiagnosticsProperty<BoxConstraints>("constraints",
this.constraints, defaultValue: Diagnostics.kNullDefaultValue));
properties.add(new DiagnosticsProperty<EdgeInsets>("margin",
this.margin, defaultValue: Diagnostics.kNullDefaultValue));
properties.add(ObjectFlagProperty<Matrix4x4?>.has("transform",
this.transform));
}
}
}

43
Assets/UIWidgets/widgets/framework.cs


public readonly Widget child;
}
public abstract class ParentDataWidget<T> : ProxyWidget where T : RenderObjectWidget {
public abstract class ParentDataWidget : ProxyWidget {
return new ParentDataElement<T>(this);
return new ParentDataElement(this);
D.assert(typeof(T) != typeof(RenderObjectWidget));
return ancestor is T;
return ancestor is RenderObjectWidget;
}
public virtual string debugDescribeInvalidAncestorChain(

D.assert(typeof(T) != typeof(RenderObjectWidget));
"{2} has no {1} ancestor at all.\n", this.GetType(), typeof(T), description);
"{2} has no {1} ancestor at all.\n", this.GetType(), typeof(RenderObjectWidget), description);
this.GetType(), typeof(T), description);
this.GetType(), typeof(RenderObjectWidget), description);
foreach (Widget ancestor in badAncestors) {
if (ancestor.GetType() == this.GetType()) {

}
}
result += "These widgets cannot come between a " + this.GetType() + " and its " + typeof(T) + ".\n";
result += "These widgets cannot come between a " + this.GetType() + " and its " + typeof(RenderObjectWidget) + ".\n";
}
result += "The ownership chain for the parent of the offending "

public abstract void notifyClients(ProxyWidget oldWidget);
}
public class ParentDataElement<T> : ProxyElement where T : RenderObjectWidget {
public ParentDataElement(ParentDataWidget<T> widget) : base(widget) {
public class ParentDataElement : ProxyElement {
public ParentDataElement(ParentDataWidget widget) : base(widget) {
public new ParentDataWidget<T> widget {
get { return (ParentDataWidget<T>) base.widget; }
public new ParentDataWidget widget {
get { return (ParentDataWidget) base.widget; }
}
public override void mount(Element parent, object newSlot) {

while (ancestor != null) {
if (ancestor is ParentDataElement<RenderObjectWidget>) {
if (ancestor is ParentDataElement) {
badAncestors.Add(ancestor.widget);
} else if (ancestor is RenderObjectElement) {
if (this.widget.debugIsValidAncestor(((RenderObjectElement) ancestor).widget)) {

base.mount(parent, newSlot);
}
void _applyParentData(ParentDataWidget<T> widget) {
void _applyParentData(ParentDataWidget widget) {
D.assert(!(child is ParentDataElement<RenderObjectWidget>));
D.assert(!(child is ParentDataElement));
child.visitChildren(applyParentDataToChild);
}
};

public void applyWidgetOutOfTurn(ParentDataWidget<T> newWidget) {
public void applyWidgetOutOfTurn(ParentDataWidget newWidget) {
D.assert(newWidget != null);
D.assert(newWidget.debugCanApplyOutOfTurn());
D.assert(newWidget.child == this.widget.child);

return ancestor as RenderObjectElement;
}
ParentDataElement<RenderObjectWidget> _findAncestorParentDataElement() {
ParentDataElement _findAncestorParentDataElement() {
var element = ancestor as ParentDataElement<RenderObjectWidget>;
var element = ancestor as ParentDataElement;
if (element != null) {
return element;
}

var newChildren = oldChildren.Count == newWidgets.Count
? oldChildren
: new List<Element>(newWidgets.Count);
: Enumerable.Repeat((Element) null, newWidgets.Count).ToList();
Element previousChild = null;

this.widget.didUnmountRenderObject(this.renderObject);
}
internal void _updateParentData<T>(ParentDataWidget<T> parentData) where T : RenderObjectWidget {
internal void _updateParentData(ParentDataWidget parentData) {
parentData.applyParentData(this.renderObject);
}

this._ancestorRenderObjectElement.insertChildRenderObject(this.renderObject, newSlot);
}
ParentDataElement<RenderObjectWidget> parentDataElement = this._findAncestorParentDataElement();
ParentDataElement parentDataElement = this._findAncestorParentDataElement();
if (parentDataElement != null) {
this._updateParentData(parentDataElement.widget);
}

public override void mount(Element parent, object newSlot) {
base.mount(parent, newSlot);
this._children = new List<Element>(this.widget.children.Count);
this._children = Enumerable.Repeat((Element) null, this.widget.children.Count).ToList();
Element previousChild = null;
for (int i = 0; i < this._children.Count; i += 1) {
Element newChild = this.inflateWidget(this.widget.children[i], previousChild);

2
Assets/UIWidgets/widgets/scroll_controller.cs


Curve curve
) {
D.assert(this._positions.isNotEmpty(), "ScrollController not attached to any scroll views.");
List<IPromise> animations = new List<IPromise>(this._positions.Count);
List<IPromise> animations = Enumerable.Repeat((IPromise) null, this._positions.Count).ToList();
for (int i = 0; i < this._positions.Count; i += 1) {
animations[i] = this._positions[i].animateTo(to, duration: duration, curve: curve);
}

4
Assets/UIWidgets/widgets/scroll_notification.mixin.gen.cs


public abstract class ViewportNotificationMixinNotification : Notification {
public int depth {
get { return _depth; }
get { return this._depth; }
}
int _depth = 0;

public abstract class ViewportNotificationMixinLayoutChangedNotification : LayoutChangedNotification {
public int depth {
get { return _depth; }
get { return this._depth; }
}
int _depth = 0;

2
Assets/UIWidgets/widgets/scroll_notification.mixin.njk


{% macro ViewportNotificationMixin(with) %}
public abstract class ViewportNotificationMixin{{with}} : {{with}} {
public int depth {
get { return _depth; }
get { return this._depth; }
}
int _depth = 0;

2
Assets/UIWidgets/widgets/scroll_position.cs


Curve curve = null
) {
D.assert(renderObject.attached);
RenderAbstractViewport viewport = RenderAbstractViewportUtils.of(renderObject);
RenderAbstractViewport viewport = RenderViewportUtils.of(renderObject);
D.assert(viewport != null);
double target = viewport.getOffsetToReveal(renderObject, alignment).offset.clamp(

14
Assets/UIWidgets/widgets/sliver.cs


bool addRepaintBoundaries = true
) {
D.assert(builder != null);
this.builder = build;
this.builder = builder;
public readonly IndexedWidgetBuilder builder;

Element newChild;
try {
this._currentlyUpdatingChildIndex = index;
newChild = this.updateChild(this._childElements[index], this._build(index), index);
this._childElements.TryGetValue(index, out newChild);
newChild = this.updateChild(newChild, this._build(index), index);
}
finally {
this._currentlyUpdatingChildIndex = null;

}
Element newChild = base.updateChild(child, newWidget, newSlot);
if (child != null && child.renderObject != null) {
if (newChild != null && newChild.renderObject != null) {
newParentData = (SliverMultiBoxAdaptorParentData) newChild.renderObject.parentData;
}

return trailingScrollOffset + averageExtent * remainingCount;
}
public double? estimateMaxScrollOffset(SliverConstraints constraints,
public double estimateMaxScrollOffset(SliverConstraints constraints,
int firstIndex = 0,
int lastIndex = 0,
double leadingScrollOffset = 0,

}
}
public class KeepAlive : ParentDataWidget<SliverMultiBoxAdaptorWidget> {
public class KeepAlive : ParentDataWidget{
public KeepAlive(
Key key = null,
bool keepAlive = true,

2
Assets/UIWidgets/widgets/text.cs


using System.Collections.Generic;
using System.Collections.Generic;
using UIWidgets.foundation;
using UIWidgets.painting;
using UIWidgets.rendering;

4
Assets/UIWidgets/widgets/viewport.cs


Viewport.getDefaultCrossAxisDirection(context, this.axisDirection),
anchor: this.anchor,
offset: this.offset,
cacheExtent: this.cacheExtent
cacheExtent: this.cacheExtent ?? RenderViewportUtils.defaultCacheExtent
);
}

Viewport.getDefaultCrossAxisDirection(context, this.axisDirection);
renderObject.anchor = this.anchor;
renderObject.offset = this.offset;
renderObject.cacheExtent = this.cacheExtent ?? RenderAbstractViewportUtils.defaultCacheExtent;
renderObject.cacheExtent = this.cacheExtent ?? RenderViewportUtils.defaultCacheExtent;
}
public override Element createElement() {

465
Assets/UIWidgets/Resources/MaterialIcons-Regular.ttf


�pGDEF5S��$GPOS�����6GSUB B�b��o�OS/2
s"cx`cmap��; �cvt D�gasp����glyfwL"���head �c�6hhea4$hmtxr�p5�
loca�5��maxp\�X name5���zpost��2�x א�3�_<� ���E���H���@.�LfGLf���0�� +++@U+@@U@U5+@@Ukk@+++++�++�++++@+@@UU��+�+++@+k�@@+@"UUUUUU+U+U++,@++@@@+@Uw@kU+@++@U++k@@+k+++3@+[kk++@U+*+@U+k@k@++@+k++@@+@kU=@+++!k++@@@@+@k++@@+++k+@++++++�����k@U@+U@+++@kU++3+ +f+@��@@@@@@@@@@@@@@@�+U@@� 5+Uk@@kUk�@+U+@+@w+@kU@UUUUWUK+U5+k@++U@++kk+++++�+@@+����@�++k@Ukk@@@UkkU@+U@+k++@k�+@55+k�@+++kk+@@+@@@+@@@@@@@@kU+@@+U+U+�@@+,1@+�@@U+@*@+@@@+@@@@@@+++�k+��@++U+@U+++@WU@+++@+Y@%++@@@+L++@@@@+U@%UUU�+@++++@+@+@@U@U@@U+�@@@+++:+@@@`kk+:@@U>kk@k@@U@+Uk++@k++�+UU�+�U+I��k��kk@U�V��UkUU�w���}k@+++@@@@++@@@@@UU++U=@k+@+* +@@+U+�UU@U+�++U++@+@++UUU+U@+UUU@+@U+++++@@+++++@+@@+++#+++@@@@@@@UUkkU++U++@kU@I @@++++++UU@@k+++++��U++U@@+@@UUU++U@@+++@kU@ @+++@+k+@-@k�k@UZk++4+@U+@k+U@@++@+kk@+U+U+UUUUU++++++k++@@@+5'�k@+Z+>kek+@++@@U+�@U@+@Uk@+k@�++U+@Kk*@@7I@k+?+@++UU+U+++++,
$,
$�z@:9_z���!�$�,�1�9�S�s���������q�����������������i���������:������.�>�6�{��� �E��������������:�Q�s��������?�L��0_a����#�(�.�3�;�U���������E�����������������&��������
���������0�-�9����#������������� ��4�M�S�u��������;�������� (      ����oQKEA=62����a`_�����
�������������������� �=09__ az��(��-��!.�#�$5�(�,7�.�1<�3�9@�;�SG�U�s`��������������������E�q�������������������� ����
�������������&�i����Z����c����g��h�
�j��:y����������������.�0�>(�-�67�9�{A������� ��#�E������������������������������� ������4�:��M�Q�S�s�u��)����k������������?��;�L�����
 !"#$%&'D)))19AIQYaiqy���������������� !)19AIQn���A���1Bh��.Y���1k��0Xd{���%[���%7J���  < ] � � � �

>
z
� B � V � { �e��5i���#j���;]|��5����-@]��� Z�� 9n��?Y|��-v��4Wy���Ov��/��Gr���-[����O~���A{�����^���  ! . E g { � � �!Z!k!�!�!�!�""P"�"�"�##7#{#�#�$$7$^$�$�$�%%;%[%{%�%�&&=&v&�&�&�'!'Q'�'�'�(9(j(�(�)/)U)b)x)�** *g*�++S+}+�+�+�,,,0,?,�,�,�--U-�-�. .F.k.�/L/p/�0*0�0�1(1^1�2+2P2v2�2�2�33J3o3�3�3�3�44W4�4�4�4�5535U5u5�5�5�66B6r6�6�6�77757G7�7�7�7�88H8Z8�8�8�9 9)9g9y9�9�:
:2:v:�:�:�;;G;�;�;�<<<:<_<�<�<�=<=a=�=�=�>">H>m>�>�>�?? ?0?E?[?�?�?�@@:@W@�@�@�AAGAtA�A�B.BYB|B�B�CCbC�C�C�DD-DPDvD�D�E!EaE�E�E�F%F9FTF�G}H[IOI`IzI�I�I�JJBJpJ�J�K KLK�K�L LTL�L�L�M+MUM�M�M�M�NN=NaN�N�N�OO(OAOTOsO�O�O�PPTP�P�QQdQ�Q�R!RoR�S SXS�S�TTUT�T�T�U+U�U�U�VV VjV�W+W�W�XX\X�X�Y!YEY~Y�Y�ZZTZfZ�Z�Z�[[W[{[�[�\ \G\`\}\�\�\�]"]F]c]�]�]�^^I^^�_ _E_q_�_�``A`r`�`�aaKa{a�b#b�b�ccec�c�dd'd]d~d�d�e+eOe�ff;fpf�ggGg�g�g�hNhh�h�i,isi�jjDjsj�j�k k/kMk~k�k�l"l?lfl�mm2m�m�nn>nbn�n�oo@ojo�o�o�pp<pap�p�p�q1qxq�q�r rrFrnr�r�r�s"s5s�s�s�t*t;tot�t�uuFu�u�vvdv�v�v�w^w�w�w�w�xxNxcxox�x�x�x�x�x�x�yy*y;y_y�y�y�y�zz/zJz_zuz�z�z�z�z�z�z�{{G{�{�{�{�|?|t|�|�}}8}u}�}�~3~u~�?i��߀�R�������9�r�����#�O�o���͂��D��������G�g���̅�N���ą��
�!�A�k�����҇-������E��������X���̊�G��ۊ��!�U�s���܋��0�b���ۍ�h���ȍ�� �1�H�i������D�{���Ԑ%�Y����������ܒ�H���Ǔ�8�p���ɓ���"�p���ɔܔ��)�L�g�����ϕ��@�Q�q���Ԗ��7�s���ٗ��3�h�ƙ�&�=�q���՚��<�Q�����њ���6�X������K���ȝ
�.�\��������E���Ÿ6�c���˟���G�d������� �N���š���B�l�ΣF�u���ۤ�I�����E�o�Ǧ�>�t������R���ʨ�)�K�o���¨ۨ���G�l�Ѫ�?�m���ݫ�<�����٫����8�W�������Ԭ���F�m������� �`�����-�X�����ְ�1�i���԰��&�P�o��������V��A�}�����6�����յ�4�u���ڵ��i������M���ɷ��!�Z�Ź �F�}���ع��$�A�N�[�u���ܻ�!�6�`���̻���6�W�x����>�p����{������B����������]�����U.�/<��2��<��2�/<��2��<��233'3#�wffU��31111111111111111111111111111111111111++��%5#5#2"&4***C�}}�}뀀V++@}�}}�++��6264&"2"&473#3#��ee�eS�}}�}�****Ue�ee�}�}}��++@��
%5#5#***����VVU++@��k@�� %%5#5##335!57546754623"&U@*@@*~-��-@11@�T"�+@@+@@Q--|3Q  Q3�U+��
"%"&5375#5#3!5754675462V***�+��+3--3+�UUU**++j2J    J2++��2"&4264&"62"&4�  P88P8�}}�}  i8P88P�}�}}�@@��*26462"6"&462'32"&5475'2654&'#462"�  �  �Ppp�pM�t!W|WJ6*  �    �p�ppP`9�s)5>WW>8T)�  @U��/?54&##"332655##53#54&##"332655##5372#!"&5463� @ @ ++u @ @ ++��� V  @  V  @ ��UU�� 3#!5333UVV�V*V@뫫V��@@�� 5#35#535#572#!"&5463@��UUU���@+�++*+���*U���#��������5���7#'7���������++�� 3#'7##5%'53`uu@`@@� @@u@@�@�@`@@u@@� @@u@+��5462"'&472653#"'&'&'&'&5462#4&"� ,,r88EE�+2#))W~V+=Z>$( *,,�8�8E�E�o#27%)*?VV?->>- "& @U��#3%5354&##"33353265##5#35372#!"&54635+ @   � + +����@@ V V �55�++��U��%55"&5472'654&#'7UUFeK5FeK5UU�@UV@eF2)!5K+eF2)!5K@UVk@��3#5&&5326"&55462q$K5*5K$C\CW4&&4&6QFFQ6/==&�&&�k@��(3#5&&5326'326574&""&55462q$K5*5K$C\C�
44&&4&6QFFQ6/==��
 � �&�&&�@@��!''#5&&53327'#"&55''5462'65[eY!*5K$C.#&��&4&U ���YFFQ6/= #&��&&�%!+U��3#!"&546333'33'33�U��*@**+@+++@���VVVVV++�� $5#5##33572#!"&5463!!"&5�U+UU+k�V+��+UU+UU��U��*+++�� $5#5#75#72#!"&5463!!"&5�Հ�����V+��k**�++U++��U��*+++��&!!"&55#&#"265572#!"&5463U+��UU ,k����*+*u ,vj�!��%5#5#%'''7'7'777***4M(II(M44M(II(M뀀V++k;ODCO;<NDDO++��%654&#"27'2"&4�$eF<-i<-�$e�}}�}�-<Fe$��$�-<Fe�}�}}��k��3##3+UU�U���*��++��%5##5#2"&4@+*+�}}�}�����*}�}}�++�� %53264&"2"&453+��ee�eS�}}�}�+���Ve�ee�}�}}�����k��������++��
77'&2"&4Հ�-�}}�}�``u}�}}�++��6264&"2"&45��ee�eS�}}�}��Ue�ee�}�}}���`+U��75373##5#5353'!5!5+��UU+UU+U���****VV*VU++U++++�� $5#5##33572#!"&5463!!"&5�U+UU+k�V+��+UU+UU��U��*+@U�� 3#"&4632537!5%!5kj@&4&&�իU���+�&&4&&**�++U++++��!5!!53264&"%32#!"&54���+��4&&4&����UU++�&4&&4n$G�k��#'%54&"6"26472#!"&546333# B<Bs&&P � @*+++��&&W �  ��*��*��@+��%53!'75#5!55k*�UU*UU�V�@UU@�V�@UU@@+��%#5#57353!'75#5!55 +V*�UU*UU�U�V�@UU@�V�@UU@U@��2"&53264&#'7Gde�e+KjKK5kk�dFGddG5KKjKVkkUU�� %7#7'73'''7<C,v,Cv,�� o�C,v,C�v,�� Co����3##U++յ�������73#˵�++���++�� !533#57264&"62"&4%'7'7��MM�MK|WW|WE�pp�p�b�bb+&Z+'Y�X|WW|�q�qq�L!S R R����!!����+U�� %5#5##5#535%2#!"&5463���V*�V���++U++++�++��+U��!12"&464'&264&"&547'2#!"&5463�""�22&%~F22F2&%22$��+""�2�2&46%2F22F7&46%2�2$�++��%7'72#!"&5463!!"&5����V+���``J�U��*+@���7'#!"&55463!2kUU �   U�UK � +@��'#!"&554633''32FzD� :��� ���D � :E�� KkU�� 37'#$5kUkkU 6@k��k{v��UU�37'#�VjjV@k��k@@��$'''567''#53'4&'5'6''5-xe,%)[kUeeU;/AT 545�Z-B��,
,[�k�e�3N,iD0)! 4/@E�� 5664&'537'#+ATTA/;;/55�UkkU�i�i,NfNSx�k��k+U�� %5#'5#5#2#!"&5463�V���V�����kUUkUU+�@@�� )%53'326554&#5##5#3532#!"&54635+KV � + +����@@`� V ��55�++��*"1�� %3#57#533''3#'##3#7P��~}���S*#`'m'�c23e2�"�"�o.�44#2l2+��2##53!3#"&54637�UU��UU@����*�*�k��U@��4;O%3277655&4&#"7#"#"'&&'&55477632632#557346355"2653"&
 (     Y&�dGkk4LLhL+e�e�++      5F FdVkkVKjKK5GddU@��'G�746355"2653"&73277655&4&#"7#"#"'&'&55477632632#255&4##"#4632632#"#"#"'&&'&53336255&4##5UdGkk4LLhL+e�e�
 *  q        �FdVkkVKjKK5Gdd++         U@��2F7#73#25465332#"'&&'&533277655''&#'46355"2653"&� 3%    �dGkk4LLhL+e�e�/  
  FdVkkVKjKK5GddU@��4;O%3277655&4&#"7#"#"'&&'&55477632632#557372"&53264&#'7
 *     [&Gde�e+LhLL4kk�++      5F �dFGddG5KKjKVkkU@��5w�%32776554&54&#"7#"#"'&'&55477632632#255&4##"#4632632#"#"#"'&&'&53336255&4##572"&53264&#'7 (  q        3Gde�e+LhLL4kk�++         �dFGddG5KKjKVkkU@��4H7#73#25465332#"'&&'&533277655''&#52"&53264&#'7�3%    Gde�e+LhLL4kk�/  
 �dFGddG5KKjKVkk@�� ###5#5353!2###5#"&5463U@*@@*����k�k++@@+@@��+�++@�� .2654&##3533'67#'#'54&##326%2#!"&54633#%3#�K  �&  %B KK �� ++++ �++- 6�II� @����*�@@+U��'7%5##5##5#3326'5#35#535#55#'#35%2#!"&5463� U �UU555667���k`KK`k Y�e�KK�KK��UU��
%'3#5!!!!+jj֫����@@�*�+*++��k 7''7##"&5546332535#5#53�0%%���+������@0 0����++�++�*UU��6462"Ue�ee���ee�eU�� 5664&'462"k8HH8&//&��e�ee��\v\, BTB ��ee�e@�� !6463253#"!2#!"&5463�&k@&4�������4&�+�%*��U��*++��%'%#!"&55463!2'!5!5!U���VU�+��V�E�����**�++U�� '7%537!5!5� �a A�ժV�� �` @**�++U++ �(%'7'7'3##5#535372#5!!##5#"&5463` @@ �@@*@@*�+��@+�k�` @@ K+@@+@U���*++@��#5!2###5#"&5463U����k�k+++��+�++,,�� #'5664&'57&'&'7#677'67�nQ?VV?Q�%/?U)M+)�/%3?+??AR�z+a�a+��+�/$3?~%/?3")�//1@U��%5!2#!"&5463���*�����+�+U�� )-%5#'#35#5#'54&##3532672#!"&54633#�56� +K +��� ++��KK�KK��K�+���@��%5#2#!"&5463�����k��U��*@��%5!2#!"&5463������k@@U��*@��5#5#%2#!"&5463������k**V++���*@��5#%2#!"&5463���������*+U��37#"&5463!@u ���v�@��� %5#5##33577'#!"&55463!2+@+@@+�UU �  �*@@*@@5U�UK � @��%5!2#!"&5463�����������*@@��
(%'7#5#35'5#5##5#33572#!"&5463�++%* *` @ ����@@@@�@@ @@@` ���*@���
77''35#3577'#!"&55463!2�kZB6^�UU �  �k[C^6 U�UK � +@��#'+/39%#57#55#3#3#5#5#5#5#5#5#5#5#3!3�+++V�+++++*******++++++++���V��++U**��+*++***V++U++U****V++U++U**���@@��7632#"&546332�0]/
$( �� K  ]0/
 K Ֆ ($ �k""''&476 "'&'&55&4. 5i"i5 2@B5dd5BUU��3#5'7#��*����Ս��wM�� 7#'75'7�``K�t�IIU``��sw��HH@��k
'#53#���+�bwk��b�+wkk��3#537����*���*Ս�UU��#5'533''7�1q*e1ր1>>�1q��e1��1>>++�� 5!5#5!572#!463����+��UU++�++k++��U�@��k !!5!%5!�+��U+�*k+�++V**++�� 5!5!5!%'!"&5463!2����UU��VU++@++@++���U+�#'%54&"6"26472#!"&54635!!5kIDI(({��V���  �((W��U++++@@�� &26%2#"&5463327675#'3##'#535#53#7#5� �� K  //^/ $(@+@@++@+V� K Ֆ ($ /\1/  �+@+@@@+kk
U��'/7?GO2"&42"&462"&42"&4&2"&46"&4622"&462"&462"&42"&4�""""�""""f""�""��""""""�""�""f""""f""""�""�""�""�""��""+U��5'72#!"&5463�������U+kk+j��++�� ##463!22'#"&55!5k �U  U U�  V+ @ ��U +�k@�� %3'353'##5#U@UU@*�U@*@�UU��U��@ ��'7'5''#"'&&7'71Oy&�fL�:/<G2.);+�0Oy&k/��gf"+4L:&2/�2;��@��,654&"34623475#2##'#"&5463A2F2*" **�U@@U%#33#" ! "�++U��@@+++��#'.547'77"'632'654&�mDH$
4' D�E,@>W$M lDG. EAR D�gD.W>0ENk+��264&"&2.54�,, |W,+4'  ,,�W>PF=EAR>++�� 5!5!5!2#!463����+��UU++@++@++�U�++�� 2#!463���U��U�++��%!72#!463���++��U���+*�U�3�� '##"&55'%'732Nu( �8b�2����)�8��2@@��7632#"&546332�0]/
$( �� K  ]0/
 K Ֆ ($ +5��"2B'#"&57'&&547'&&547'"'632'654&'654&#"'632Fe�" *#!.'19,,�+%2=X} e1#2# #5K����"1%;#&.6.O%c:J9-}X=2')Fe�# #2# K5@�/%&4737'7'54&""26472#!"&5463}# *,,* uXPX�4&&4&��V�,*+!4,4!+*U%%&4&&4f��*@� #)5#54&""26472#!"&5463'57ժXPX�4&&4&��V�@@@@���%%&4&&4f��*k**++C� *&'77#5'7"'&'&55&""''&476 �JLn*�LLU5 .h. 5i"/JL�jj[KL�5BB5d[+��#%5#72##"&55463&2&"'62&"@�}

z

#�E8�8:,~,ZU���

�E88=,,k��!!%463!2#!"&5���*�����k���k��%#2##"&5463k���k*�����k��!!%463!2#!"&5���*�����k���k��%#2##"&5463k���k*�����+k��!#"&554&"3'354622655#�U@2F2"@UU@2F2"@�V�#22#��UU�#33#��++�� 5##5##5#%2#!463k++*++��U++++++��U���#$264&"264&"$2#!"&4623&54l>++>,�>,,>+/bDD1��1DDbE`�,>++>,,>++>�DbEEbDD1+ +1���6264&"73##5##"&4632�""��+U] B*5KK5*B�""<VUU&/KjK/@��#2##"&5533##5463''7'77��+��+UUUUVUUVU���@+V+@�UVUUVUUUU��554&"32##"&55463546272##"&5533##5463�[
 u

%.$��+��+   K
 K
  ���@+V+@+��"%#2##"&5463'6'7'64'+���+B((UV�������4B&k%O*��]2##"&5533##5463264&"7''##"5'&'''&6774&465'&776677433276��+��+&  x ,  +���@*@��  %

%%
 %@��
#7##!2#!"&5463�*UU*V������UUUA,��V��*5�� &%5&#"6322#"'&#"&#""#"&56326�!*A44A''L*)=A4+J60+KJ++u�
�  �� 9 +U��7!5'2#!"&5463���V��V��k��jj�+�U�%7'633!53"&55463!2VVi+U�U�UV�PP.n:z++���!%767'''!53"&5547''7'"'!23#�1" n�:�}U!�v"Vp;�( "��[:+� !�� v O-o�+@��k
77#53#5@�wb�+�M�w+�b�UU��2#4&#52#4&#462#"&UX|=Y>��<�q()|X>Y�Éq��(++��-6264&"&2#"'"&46226554&"33#"&4�4&&4&�}+' X??X?e�eeFkkX}�&4&&4�}X , ?X??,  Fee�e*}�k�� %"675#2##"&5463C#RDDZ����/Z $@?V*�����@@�� (##5#53532#"&54633276�@+@@++ �� K  //^/ $�+@@+@@� K Ֆ ($ /\1/  kk�� %##5#53533��*��*�뀀*��@@�� %5#5##33572#!"&5463kV*VV*����*VV*VV���*++�� %5#5##335&2"&4kV*VV*m�}}�}�*VV*VV�}�}}�++��6264&"2"&473##5#535��ee�eS�}}�}�VV*VVUe�ee�}�}}�V*VV*V@@��
!'!7#5##%#!"&547763!2m&��uJVJ+
��


���u++� ��
 $ @� %'7''72#!"''763�LLLMMMML^��ss�MMMMMMMM+����++��%2654''7&#"62"&4Fe$�-o$�-<FeS�}}�}UeF<-�$�<-�$e�}�}}�kk�� ''7'77�wwwwwwwwwwwwwwwww+��%#2##"&54637!#463������*@+��U��+V+��+++��53'24"264&"6264&"#'"&46327'#"&462�@�+ �""""y@�22F22#22#22F2��+K�$$�$$���2#22F2222F22#@+�%%##5#"26472#!"&54633662�*�*�  ���Y * UV@@���   ��V@@�� '7627#�'P'2���P�Pj'P'2��P�+U��%7'#!"&55477���������ngg�� qq @��� 75!%!!53�������V�**�+�++k@�� 3#'##33x�x*���*�kUU��55#5���UV��V�=@��E%267''67632327676323##"&5467.#"&54>76'&(
�%
#  09*)54>!(<7
;  #2  t%&&  �$ ('$$<7"5E>'!H
 I 0$$"@@�� %5!32652#!"&5463���V&4&U�����&&��*+��k#2##53264&##553$33#"&4633#"k,>>,VV''Vj���'VV,>>,VVk?X?)'6')�**06')?X?)+U��5'72#!"&5463�������U+kk+j��+U��5'72#!"&5463�������U+kk+j��!��k7#7&#"'6632�L�N0>8Y2uIUM�M(A4DVk��%!5!���*�*++�� %5#62"&4k��}}�}�**�}�}}�++��6264&"2"&43#��ee�eS�}}�}j��Ue�ee�}�}}�C*@U��&#'7�hqM���@�[mW��U�&#'7'7hqM����UU��@�[mW��@UU@��@@�� %5#264&"#'57*
lpp�pp뀀\ p�pp�p@@�� 5#264&"#!"&5463@�{4&&4&�U��@UU�&4&&4/U�*@@��  $(,16:>BFK35535353753'5353'5353#553"&532#'#55353'53'463����++++*++++++�*U+U++*+�*�+*+�++@�����++��++U++�++�+�**�++�++��++UU+++�++�++�**�++@��75%%5+@���@�++��@��� 75!%!!53@������**�+�++kk��
3#73#'!!(P],e e,�*���k&/��/Z*+��k2&&#"#56 It2Y8>0N�L?UVD4A(M�M7++��%3#3732#!"&54637T-m(m-xo��,,u��@ ��V�vv@@�� '3535!32652#!"&5463UUU*Vj��V&4&U��+VV@@k��&&��*@@��
!'!33537#!"&547763!2m&��uJVJA
��


�vu++� ��
 # ++�� #77'355232#!"&5546335463�UU@@VV��VuVU@@
**+*��*k��'2!54&'54632#!"&55462!54��/"��"*�. ,, .jkk@@+U��!537353##"&%3#53#3#+�@U�������UU�**�����+�*�++U��64633#"3355#"73#53#53#+Q9KK(88( @@ 9��������rQ*8P8*@@+++�+�*k@��%5#'#353#'##3�kk���k*�Հ+�+��*�k+@��-7'#5'#53'33#"&5467#'72'6654&##5+eV%0:,"'VV,>$�*D,>:'V���U%1*,%')?,!6 N**V?,A$')��6264&"'#'57'7'73'5��M#�p#N�R�p��pN#p�#MpRp��?@@��%7'7533#!"&553!8kk8*�+��+*�7kk7�����++��6264&"62"&47'5''7'7�|WW|WE�pp�p�UeCbbHbUX|WW|�q�qq�p2<�cR RR!S ++��6264&"62"&47'5''7'7�|WW|WE�pp�p�UdBcbHcUX|WW|�p�pp�q3>�bQ QQ T ++�� '5264&"2"&4 `p1�ee�eS�}}�}kp9D���e�ee�}�}}�++�� #3##5#535264&"62"&4%'7'7@@*@@)|WW|WE�pp�p�b�bb@@+@@+@�X|WW|�q�qq�L!S R R++��7''575577''5462@P{+KJ*�k�D����zO  u5*Pk*�N  ++��''575575462���+KJ*���@�5u  u5*ku  uk�+k�%5#5#2##"&5463353***c  �  #V�kkU+++ ��  G **�+k�77#5372##"&5463353�U+U+c  �  #VU�v�� ��  G **�+k�2##"&5463353N  �  #V� ��  G **�+k�2##"&5463353N  �  #V� ��  G **�+k�,%654&"34623475#2##"&54633531&4&  "(b  �  #V�&&  a))* ��  G **k+z�%'73#5'7'753=((=\\zbwwb�)QQ)\\y�bwwb�@+�� ''73#5'7'753'7�++*.((=\\zbwwbk*++++++\)QQ)\\y�bwwb��+++U+�� %7'''#5'7''53'7((�81\bw��*zA"|()���1[�bw� E+kyA#@+��!%'73#5'7'753'64'7((<\\zbwwb�!V1
�)QQ)\\y�bwwb�d2z4*X*V1��%3'#3737#'#5'7537371)E*E)D�FFdGGdFFdGGd����*rGGdFFdGGdFF�NN��2"&4264&"%#'#5'75373�F22F2 jKKjK+FFdGGdFFdGGdU2F22F�KjKKj|GGdFFdGGdFF��6264&"#'#5'75373�jKKjK+dGGdFFdGGdF�KjKKjdFFdGGdFFdG��%264&##'#5'753735KK5�dGGdFFdGGdF�KjK�dFFdGGdFFdG++��%27#"&5467'654&'H,8@lX}oQ6JWSQo8
J6k8!W}XSy@T8>WiyS0'!8TU�� '%53##"&5537'7'7'7%#54632#5k*�*@bbC�CCb��*�*k*UU*QbbDbDDb�*UU*U� %5#72##"&55463%3!535463!�Uk � �����+����� � � +�@@�+@�� '#57#5#57#5!2###5#"&5463�****������k�k++U**U++U**��+�++��'6264&"%3##5&&'#53667532"&4�|WW|WT,,`C*C`,,`C*C`�F22F2kW|WW|S*C`,,`C*C`,,`2F22F��6264&"%3##5&&'#5366753�|WW|WT,,`C*C`,,`C*C`kW|WW|S*C`,,`C*C`,,`��/%'327'#5&&'#53673#'654&#"'6753[�W>2�e,-7*C`,,%S,, W> %*C`��)2>W:��,%,,`C*7-d*' >W ,,`��/%'327'#5&&'#53673#'654&#"'6753[�W>2�e,-7*C`,,%S,, W> %*C`��)2>W:��,%,,`C*7-d*' >W ,,`��6264&"%3##5&&'#5366753�|WW|WT,,`C*C`,,`C*C`kW|WW|S*C`,,`C*C`,,`@+�� 3#3%533'3�++U+��+�*�++VU�UVV���VU�++��%!��V�+�6�� '07'62���Dy�y��TUU++��,!3#35#"&5475463!2#!"&5463��U*�@"���V����+��0  0��V�����V++��"'073#"&5553##52#5#5"&4627!#54633U���*��*�V�@+@�+*���*����*���*}�O9U+��*@@�� 3#53'#5353cyy]�Nx�����yx��xN�]�ݫ�k��!1354&""&5546354622#5!2#!"&55463�4 $ j��U��+
� @  @ ����k��1%#2##"&5463354&""&5546354622#k���Q4 $ k*�������
� @  @ �'?354&""&5546354622#7"&'3%"'&47762'7'7fI , ��Qd� Ep
� 
� 
4-y�x/� � V  V �Q�c;a� 
 
4,x�y/� '77"&'377"'&47762'72#&&�Qd� Dш���
� 
��
� �Qd� D6Q�c<`����� 
 
Q�c<`U+�� 5##5##5#72#!"&57�+++��UVVVVVV����@��&%!2#!"&5463"&5467363232#�������&!.*j,��V��*��&$+%,++��7+�+��V++�� 7#353'53+�U+***+����**U��3�� '##"&55'%'732Nu( �8b�2����)�8��2++��!!��V�����VC���� '!7'%'fo*����u����+��f���6��%62�y�y65UU +�#9%7>2&#"54&"32##"&554635462KK�  $'-.-'$  ,-=�V k .�8^6  

  8=M  U U 6��
'67''632F HGS�!-+�t�-,� ��JGg5,[��
+U�� 355!%5#'!!355!U+U���+*��V*+U�**@VV�**@V�**@VVf&��,3###"&5475#"&55&546235#7#35#@U@(@&@+@@+@kV*AA, ,�VV�*+�)%54&"32##"&554635462'"6 &�V k , 6,>K�p p9�  U U j>,=cUUUL+2��-52'6654&"&&54'654&"&&54622"&4��}91'/d�d.'19U#*2F2*#KjK�""�|Y:c%O.FddF/N%c:YY#;%1#22#1%;#5KK ""@�� 75'7#532##"&5533##5463�wwL���+��+�Mxx*�*��@*@���'3"&5462"&55326554&"265` DbE3F2,  , 3F2��1EE1
#33#��� � ��#33#�@`�(#5&&'332654'&546753#&#"� )"@!+/;@d* @!#/4  '..*!-$A)./,-@@�� 5#5#'5#5#!!����*���+��������������U��@@�� #'+/37;?C7#55!%#5%53'3##553'53'#5##5#5'#5'#5#5'#5#5'#5k+���+U++++��+U+++U++*�++*�+�*++�*++�++�++�**+++�+*++�++V**�++++�**V++U++�**�++�++U**@@�� #'+/37;?CGKOS5353535373#5335353'5353'53'5353535353353'5353'53'53@+++++�*�++�*�+++++++�*�+++++++++�***�+++++�++�**�++U++++U++++�++�**V++V**�++U++U**V++U++++U++U++�**�++ 5!!'762#57��*P*2E�P�UU�*P*2E�P�@@�� #'+/37;?C%53#53'53753'3#5!53753#5#57#5##5##553'535#553�+�+�*�++++����*�+�***�+�+*+U+�+++@++++U++�++�+�**�++U+++++U++U++++++��++U++�++��++ @@��#'+/37;%53533##5#535533#53'#5##53#5535#553#53�+++���*��U+*+++U+�+�+U++U+�+�++U++��*��*���++�+U++�++++++��++�++��++++@@�� #'+/37;?C535353'53'3#5353533753'5353753'53'535353@+++*+++++++�+*+��+*++++++*********�++�**�++�**�+�++U++++�����**�++��++�**U++U++�++U++@@�� #5#5!!!%#5##57#5�+�*���+���+++*****U++U*��U���****V++@@�� #'+/37;?C53'5353753533#'5353'5353'5353#53753'53#5353�*****++++*++U+�*�+++++�*�+*+++�+*+@++U++�**�++��++����**V++�++�++V**�++++�**�++++��++@@�� !53%!!#%535353#53353#53�+�����+U+++�*�+�+�+@++�+���**V++U++++++++@@�� #'+/37;?C%53535353753!!53'5353'535353'5353'53#5353@+*+�*++*+�����U+++�*�+++++++�***�+++�**�++++�++U++++�**U++�++�++U**�++U++U++�****�++@@�� #'+/37;?C%53535353'3#5353#3753535353'53353535353@+++++*+++++++�*�+��+�+++++*+++�+++�**�++U++U++�+�**�++���U++++�++U++�****�++U++U++@@�� !!3#5!5!%3#@���U��U���������+*+U**�++�+@@�� !!5!5!5!5!@��������������+U++U**V++U++@@�� !!5!%5!'!5!5@�����������+��++�**�++�++@@�� !!5!5!5!5!@������������+U++U**V++U++��{�%264&##53264&###32 K@  8.-"��$1�@�@[4"/+2H+@��!#'7#'''#7'�+|"-3<:4y!@4��@P,$<��yN{�!5!!"&5467%3'#"''&477'7��+"
���g�
u
v
n3UU / & -fP
 u
u 
n3U=�� '#"&547''7p89%/5KG+�:+G���8 K5"6G� �K6{�
3''3#'##!!�f3*u0�0u��9��@@@U@@�� 753'53%!!5!%753������������UV��**U++�+��++�U�++@@�� 753'53%!!53%5!�������������UU��**U++�+�++�UUk++���� 3#3#537#ի<H/�<H/�@�@@� K�� 75!5!!!#3'35#7����U5JK55KJ�**�****�JJ�JJ5`�� #!!5!5!$2"&42"&42"&4�+��+��+���*�**�**5n+U�� '75!5!!!533#57'5#5353#535#535�+��+��+��j@''@&**@@*�**�****V,,@@V�V

U+��3###"&5535##!"&55463!2�@� + � �  ��� �U U k��k %7#53#7#53+*@�*�+@�+�V��VV��V@k��53##57!###@�@@@j@k@@���@�@k�� 75!%!##5#53@���*jVjjV�++�@@@�@@k+��%5!5!5'"&4633##5##�U��#22#�++*+�U@*@V2F2*���U+��7!!'77"&4633##5##��VV*#22#�+*++�*@UUV2F2*���k@��7!!6"&55326553k*���jK5,>,5k+UK5��++��5�U�� #3!57'5��jj�����@kk@+��+@@�� %5##5##5#2#!"&5463k++*++���VV�֖�+��*++�� 5!5!5!2'!"&5463����+U��U++@++@++��UU+��3''3#!"&546vv����@u ��V++�� %$"&'3&"&462"&462264&"2"&4%J; � ����ee�eS�}}�}�)!!a�e�ee�}�}}�@@��%5!332#!"&54633533#5����+��+�kk���+��*++�kk+��k#2##53264&##553$33#"&4633#"k,>>,VV''Vj���'VV,>>,VVk?X?)'6')�**06')?X?)@@��7!'#!"&5463!2�J*`J���*�`�`5*wM�� 7#'75'7�``K�t�IIU``��sw��HH++�� '!"&5463!2�U��V���U@@�� '7627#�'P'2���P�Pj'P'2��P�kU��
77##5'!!k��U�U*��Ֆ����+U��@3!53!�+��+@��U@���873254&'"&&##5!##"'&'&574#"#4&5&547632�>1 ��SC$'�3$ b "15�6$++=2x-
 %)U@��
7!!%'353UV��UU@*k+�VV��U��
!!%'3537##5UV��UU@*jUU@**�UUVV��UUVVU@��
!!7##5UV��VUU@*�+�VV��U@��2##'73264&#!5%!553k#22#+@@0��V���2F2+@@+"*�**��**W@��"'#5&&'3327'&5'"'6753#&r7/!@!,/<%KSI�@ #/���0..*!-J;I!./,-U��@75!5!5UV���++�++��
"&:73'##73#735#5#'535#5##35#35#3#5##535#53353�8%K#IH"`++++***�***++�++�ր++�ր�Rm*���+��+++*�**�*+++�++Uր++�ր++K+�� 7%773#5!#5j--��-s**k@�t-..-�@�kk@jj+��52#"'#"'##"&463236236�$ > H > $$ > H > 5, , U��@73#5!!U��V���+�+5k��##5#5'!###�@@@�k@k@@��@k@�++��"*%654'&546323&'5##"'#32"&4CZ8-*;9%Y95*C9v�}}�}~ 6=(9**#8 ! (9*�}�}}�kk��!###k*u@u�@�@@��753#"&2!546353#'3#@k@k�kj�kkk��f@@������++�� 5#5##3357'!"&5463!2kV*VV*�U��V+UU+UU���U+U�� '!!!!!!533#57'5#5353#535#535+*��*��*��U@&&@&++@@+*V***V,,@@V�V

UI��$462"462"462""&4&&4�&4&&4|&4&&4o4&&4&4&&4&�4&&4&@@��.%5'7'35#535#37353'7#572#!"&5463��UUUU�V66V65 +$++$+u���5�UU5UU�P P 0�@@@@@@+��*+��k%646332##"&4633#"33264&##"33#"+D1�#22#� �� ��,,��1�bE3F2, +",>++U�#!"&54676632�):?,��5KB0L-:X*=*,?K51I'0I++��%264&##4&#"'"32"&4` 2#-&&�}}�}�,#3%&4&*}�}}�U�77''%#!"&54676632Սo,):?,��5KB0L-:X��n,J=*,?K51I'0IU�%#5##7#!"&54676632k@V@k�):?,��5KB0L-:X�UUk�=*,?K51I'0I+�+#"337'#"&5467'654&##54&#"'632�%#22#���e+�5KH3"):-!& D1 '/:X+3F2��*K54J+=*7 && 1D IU�&%264&##54&#"#"3%#!"&54676632�&& D1(> #22#):?,��5KB0L-:X�&4& 1D0%3F2�=*,?K51I'0IU�%3'337#!"&54676632+@kk@Vr):?,��5KB0L-:X�jjV�=*,?K51I'0IkU��
7!!%'353k*��*��U��+땕��kU��
7!!75#7#k*��UU��U�+V����+U��32#!"&5463�+����+�+U��%5!2#!"&54633���V���+����++U��!%54&"6"26472#!"&54633�;4;f""@���+��""Z�++U�� %5#5##33572#!"&54633�@*@@*V���+�+@@+@@��+@��'2#4&#2#4&#2#2##53!#5463a�+qO>X+?,&@�����++�aPp+W>,?+&���+*@@@��!).2##53!#54632#4&#%#&&'52#4&#2#�����++a�+qO�x_?V>X+?,&@���+*@@��aPpk�?`#�W>,?+&U�!53!53"&55463!2UVU�UV����++��+��%5!2###57#"&5463�����*�*�����@@+��%!2##3#535#"&5463�����*�*���*�+**++@�� /3#'3#73#3#!%#3#3##!"&5463!23UU�kk�UU�kk���*****��+*��kk@@V**���+*++***���%5#2##"&546353U�������*��+�*++++�� 3#'7##5%'53`uu@`@@� @@u@@�@�@`@@u@@� @@u@U��2##5354&"3#"&554��p&@UW|WU@&�qO�&�+>WW>+�&�O@��2##535#5354&"3#"&554��p&��UUW|WU@&�qO�&+�+>WW>+�&�O +k�� #'+;5#5#'5#5#5#'5#5#735'3535'3572#!"&55463�*******�***@******���+**@**@**@**V++�**@*****@**@**@**@�����Y7'�bb��Ybb����I�%'7I��b���b��U�77'7�bb���bb�����U7'7'���b���b@���!'7���L��L*M��M���� 75!''7��b���++�b�� +��
"&*.>%'375#5#'5#5#5#'5#5#735'3535'3572#!"&55463U�@*******�***@******���V�++@++@++@++U++�++@+++++@++@++@++@��+���
3!'7!�+��M��Mk�M��M��� 3#'7'7!5!�**���M��/�����M*k+��3#5&&5326"&55462q$K5*5K$C\CW4&&4&6QFFQ6/>>&�&&�U�!53!53"&55463!2UVU�UV����++��U�%5!5#!3!53!����V+�+����@++@U� #6264&"!53#!"&53"&55463!2�  �VU�VUVk  ������U�!53!535"&55463!2#UVU�UV�����++��@@��37;%5#%#3####5##5#"&55#535#5354633533533235#7#5k�++++++*++++++++*+++�*U���ր*++++++++*+++++++U**U��U�� #465!"&#��WWVe�e�?W���A`��UUFeeo`Ak��%#5#2##"&5463p��V�&&�&&�+��@�&��&&V&k�� %#264&"2##"&5463U�Sv��+��U� �� j U� %5#72##"&55463%3!535463!�Uk � �����+����� � � +�@@�+#�"&2##'35#'5463%3'!53547'!'!� @.U+ �����Q+"2��+
'���+DU � @�o+Y %�HQ��"2@� 'B+@@�� )3%5##5##5#%2#!"&554633537&#"'632&#"'632@+ * +���+1! ()1)10)-=>-�++++++kUUUU� $$--@U��%5##5#%#!"&55463!%7��+*; �� ���++++� uUm(@�� &&55667#5�nRRn�;R���V�Y��Y���iC�BzU+�� %%5#'5#5#'5#5##5##!"&5732k++***++�+�+����UU+**�UUUUUU****@���k��%#2##"&5463k���k*�����k+��)2"&4264&""3264&72##"&5463�4&&4&X??X?kZ�&4&&4�?X??X""*��VU��!13#"&5462"264&"6"326472##"&5463���� ,, F22F3g"/����+U�, , 2F33F�$$D��3U��%!2#!"&5463���U����+�@�%!5#2#!"&5463����V�&&�&&kU��@�&��&&�&+� %!264&"2#!"&5463�������kU��V��j��� "&53"&4632#5462E`F�0EE00EE0E`F0EE0E`F�E`F�0EE0@��%!2###5#"&5463����k�k��+�++U�264&"#'&4773�KjKKj�A�AA�5jKKjK.�4zz2�2zz@@��%3#5'#5375&&5462kUkUUkUV&4&�kAZZAkUD && D+��@ %53!53!53'!!Uk�k�jj��k�++++++�+U��)7%5#72##"&55463264&"7#5&5475'3#"&5463!�Uj� wJU�UU����� �� �b&&&&��++���+264&"264&"'5#5##335%2#!"&55463�B@@+@@+��R*@@*@@���k��+73#&2#4>54&"#4#2##"&5463�&& @+8&&�����&�+2  �*��������$'##5'3#"&5547'"'632'354&0�. @�U@&G�,%1?Ppi>W��U.U�&*�&�7-G$qO�i*>X++�� $5#5##33572#!"&5463!!"&5�U+UU+k�V+��+UU+UU��U��*+++��"&462264&"2"&4@&4&&4`�ee�eS�}}�}4&&4&�e�ee�}�}}�@��%7''2##'#"&5463(XX((XX(�U@@U�((XX((X@��@@+k@�� 3#'##33x�x*���*�k�@��3###"&4632�U6%(88(�@�$18P8++��'/7?GOW_go$2"&42#"54264&"2"&42#"542#"54'"54322"&4'"54322#"542#"54'2#"542"&462"&4"  
f�ee�eS�}}�}@
5
  @
K
J
6
A    �  >
Ke�ee�}�}}�#
U
 ,
@
J  b  @@��%)19AIMU]e$"&462&"&462&"&462"432'"5432%!!"5432"&462&"&462&"&4625!"&462"&462"&462      @
�����+
�  ]K��    ]�  I  I  WV
u+�
 >C��++  a  l55�� !'/TZbjrz�����62"52"&42#"4&2"52"&4$2"52"&47'"&4632'#"&5467'"&4632#"4"&462"&462"&462&"&462"542'"4323"432&&'5462#6"&4625B  j
�B  J�  �[P  <  <  �
i      �  ��
K

   �
@  >�
@  
@  ��Q  <  <  �  b  b  �  W
��
 `  55��%-3;CKS[ciou{�������2"&42"&42"&462"&42#"462"&462"5&2"&42"&42"&462"&4&2"&46"&462'"4322#"4&2"57"432"&462"542$2"&42"562"&42"&462"&4?  v
  �>        �)  
��
  ���  6B      KCM  ��J  W
�  I  �  b  �  >���
�J  W
j  T
  �  b  ++��6462"+}�}}���}}�}k+�� 2#"'664&'6�Y}}Y:019910�}�}ctc�+�� 2#"'664&'6�X}}X"BSSB�}�} q�q �� %264&#"7#'#5'753735KK5!))!�FFdGGdFFdGGd�KjK ?L? �GGdFFdGGdFF��6264&"#'#5'75373�jKKjK+dGGdFFdGGdF�KjKKjdFFdGGdFFdG��%264&##'#5'753735KK5�dGGdFFdGGdF�KjK�dFFdGGdFFdG��2"&4264&"%#'#5'75373�F22F2 jKKjK+FFdGGdFFdGGdU2F22F�KjKKj|GGdFFdGGdFF@@�� #!"&5577'''5463!2�@��@UV�@UVU@* @a�@VVތ@VVVAa+@�� '7622#"'2654��;���4&2#4!��;��&#2+++�� %7667#"'3&&7#&54''7#7'632�NN;L��O.C l��8f��O.C�N;L0�#�0��G��S(S=� �GO�0+U��#6264&"332#!"&54633462"�X??X?+�'D��D#(8((8�?X??X*��8((8(k�'+462552##5#535#"&5463"&4623#�IDI�@@jj@|""jj���+��@@+*+*�""��*k� $264&"72##5#535#"&54633#"}�@@jj@�jj�""���@@+*+*�U*++�� 35#5#'5#5#'5#5#3###"&5463354633232�++++***++++V��� U @++�++�++�++�++�++��@ @@��#+%53##52#5#5#546333#"&5562"&4�+UU+U�+UUUU�F22F2kUU+UUU++UU+�U+U�2F22F@@��!*36264&"62"&453##52#5#5#546333#"&55�""F22F2�+UU+U�+UUUU�""f2F22F�UU+UUU++UU+�U+U++�� 3!!"&57!'#!"&5463!2+*+���@V?�����*�UjO@@��4264&"&264&"264&"264&"72##"#"&46h-W-�Oq?,%PppCh�dG,>  p�p@@��77'%'#57'7762��)�OC)�e�)Ck�)��C)�e�)C@�� 2##5#5553#5#"&5463�jjjVjj++j�����+����@+�*+*++��6264&"2"&473##5#535��ee�eS�}}�}�VV*VVUe�ee�}�}}�V*VV*V@�'$264&"62"&4&&4673##5#535|WW|WE�pp�pU.'8HH8'�@@*@@kW|WW|�p�pp�$XI.dzd. @*@@*@@���%5!%2#!"&55463���*��������@U��%!2#!"&5463���*����+���7!##5#"&55#53535#532�VV*�VV*֫��*VV�*V�ի*�@k��%5!2#!"&55463���*�������@��k%5!%2#!"&55463���*��������@@��%!2#!"&5463���*��k*��U��*@@��#2#5#553##5'3#"&=4633##�+UU+U�UUUU+�UU+��UU+UU+U�+U@k��%5!2#!"&55463���*�������@@��%#7!2#!"&5463*K�:*���*���eL3C*��U��*k@��%#2##"&5463k���k*��U��*UU��%!2#!"&5463�����+�+��� !!!!!!+��V��V��V�+@+@*@U��7%!�xx�������+��@@�� '7627#�'P'2���P�Pj'P'2��P�++��"%3572#!"&5463#53533##��������+++**+UV��@**@��V��++++*U���
%#55733#�*@d������$$�*+��� 3#%23#5767654'&#"#476+��4V=�Y 
..*�K B$ a  1$U���%#55733##5#535�+@d�VV*VV��$$*V*VV*V+��� 03##5#5353#5767654'&#"#4767632�UU+UU��Y 
 .  kV*VV*V�$ a   $# ��Y�)4'&'&"327655432#"'&'&5+ 

   �XA((((98(9t>,;?��"%!2#!"&54635#53%!!"&5���+���+U��U���+��V��+�ի*����+U��(1%#546335#532##!2#!"&5463!!"&5k�+UU+���+��UU���+U+*+*V+��V��+V��+U��!%5%##535#535#532#2%!!"&5!2#!"&5463kUU++UU ��U�����+���+*++*  ���+U�+��V��+��!%!2#!"&5463!!"&5#7���+��UU��?L�;*�+��V��+V��+UqdK2��&%!2#!"&54635#53353%!!"&5���+���U*++��U���+��V��+��U�UU����+U��.%##535#53#32%!!"&5!2#!"&5463kUUU�V+��U�����+���+*�*+���+U�+��V��+��+435"&554633#32#!2#!"&5463!!"&5++VV+���+��UU��**U�*+*++��V��+V��+U��
#%#7#53!2#!"&5463!!"&5*UU�U��+��UU����**�+��V��+V��+U��%)9B35'35"&55463"&5546332#2#!2#!"&5463!!"&5++++ + ���+��UU��**V++�    ++��V��+V��+U��+45#72##535#"&55463!2#!"&5463!!"&5@++UU+���+��UU��@++U�+*+�+��V��+V��+U��#7@5!!5##5#535372#!"&546335###535#"&5546332'!!"&5���++*++*+��V@@@�U��@��Հ**+++���+�U+@��+U@@��%#72#!"&54633��������k*����*��@@��"+2"&453##52#5#5#546333#"&55�4&&4&�+UU+U�+UUUU@&4&&4�UU+UUU++UU+�U+UU�*%264&##54&#"#4&"3%#!"&54676632�&& D1:$)5+2F22#):?,��5KB0L-:X�&4& 1D/ E,#33F2�=*,?K51I'0I++�
!!#'#2#!"&546337��+`JKaV��VUUU�++KK��V��+UU���!77'+��*�`"<����Q��%!2#!"&5463!!"&5���+��UU���+��V��+V��+U ,,�� %+1777&7677673&"&462&'7#67&'7'&'5'67y%/?i/$3?r+)e&4&&4�)M+)N)M%/?i/%3?[+%)k&->3�4&&4&U/$3?~%/?3r/%3?�+%)1��@6264&"467'&&56&5467676'&'&&547�F22F2z-%"@@ ## @@""@@ ## @�2F22FT&E ;!%%#;;#%%!;;!%%#;;#% �� #'753'777&2"&43#7'7'#5'7#5�*�..�.�4&&4&���..U*'.����....�&4&&4*..c���.s**@��
3'7#'##7!335#g2E)D)E���UU�@]N*�++����++��'53''5#5'k!��V�OXM@j+9�.����Y��Ok�+k�335#��VV�@ժ�� @�� '+/%53'53'535332#!4633#3#"&5%5353�++�+*+�*�+��UUUUU+�+@+�**�++�++���*�+��+�++�++
@@��+/3?CG5!3335335355##5##5#2#!"&54633#73#'33#5##5335!#3���*++*++++*++��*++�++U*++*++�*�**��*++++*�++++++@��*�+++++*****+++UU��'/7?2"&42"&42"&42"&46"&4622"&462"&42"&4�""o""o"";""�""��""""o""�""<""<"";""�""�""�""<"" ��  $=%3'5'#'5'#5#33'!"&5'35!#'!2'5#'35#'5#'35#'U* J* JVVa��+��+UV�+J*+JV*+JV*UJ V�J V�VVa�6+J+VV*��+*VJ+*VJ+
++�� #35#5#5#5#5#5#5#5#5#2#!"&5463�VVVVV*VVVVV*VVVVVV��UVV�VV�VVVV�VV�VVVV�VV�VV���V��!0'#5'#5##53353'#'32'735#'532#'#5b6�H + +u� (  `++K  �c���I i55�++u�  ) `i -+@��@ +%5#72##553#5##535#3#'##532**  J@ + @+K  K �@@` @ �++�55�+

-++� ���6264&"62"&4$2"&4Z""F22F3!jKKjK�""f2F22F]KjKKj���$264&"62"&4&2"&4HF22F3!jKKjK�F22F3�2F22F�KjKKj 2F22F**�� 'L%7'6"264264&"&264&"'7'"264#"''"''&477'&47762762cNNM  I    $MMN�  eU\
TU]UU]UT\NNMNz  I    NMN#  4U]UU]UT\UU\@@��7!'#!"&5463!2�J*`J���*�`�`5*+U��#%!2#!"&5463#5##5#57#5���V���+*+�***��+��++++V**V++@@��"%#53733535#5#72#!"&5463kkk*��
+ ++ ���� J*��� ++ ++`��*���!77'+��*�`"<����Q@@�� $)%463"3463#463"#52653#5265##5+W>,?+&��aPp+W>,?��aPp�&@>W*?,&@a�+pP�>W*?,a�+pP&@@@�� -363"'63"'657'#47'#47'#527'#5277'65H9?/*B" �"�e=*++85BVE5)2"X " "+B" *?9*/��="2)5DVB58++*X" ++��2"&4��}}�}�}�}}�@@��(54&##3#3#326554&#2672#!"&5463@VV++VVV�� ++*++ ���*��� 2#4&"#462#4&"#4�Š+p�p+�zX*?X?*��aOqqOa5X>,??,>@@�� %5##5#32#!"&5463@+*+U�����VV�V+��*@@��!5#3#326554&##572#!"&5463@�UUU*���@+�++++���*@@��#'5#"3326554&##572#!"&546353@U**����*@+�++���*�++@@��%5#32#!"&5463+V+�����+�+��*@@��$54&##3#"35#532672#!"&5463@UU*�U*U��+++V++���*++��6264&"2##"&473##5#535��ee�eS�}�X}�VV*VVUe�ee�}X�}�V*VV*V+@��/%#2#5"&463264&#5"32#!"&5463373��->>-((((->>-���E&�&k=Z>&(:'�(:'&=Z>*�+++U��3#!"&546333'33'33�U��*@**+@+++@���VVVVV�@�� 3#"&4632�U3F22#�U�#22F3 k+��%3!535&&5462��ր6GX|WL�S**T S7>XX>9T++��%"&462%3!5#546332#35&&5462nYL8@�� @ �6GX|W9TS*jV V@T S7>XX��I�'7Ibb��bbb����U�'7'Հ�bb���bb@@��4264&"&264&"264&"264&"72##"#"&46h-W-�Oq?,%PppCh�dG,>  p�pU��7!'#!"&5463!2�J*`J����`�`5++��6264&"2"&4��ee�eS�}}�}Ue�ee�}�}}�+U��!2#"'&"#"5432276#"'632� `�` `�`N]XSRYXS���##:##7�U+�� 73&47##!"54764'&543!2�����##:#US�SRYXk `�` `�+U��2"/&4?"2764'��]]�]��VV�V�B�BB�B9r99r9@@��7!'#!"&5463!2�J*`J���*�`�`5*U+�� 7!'''7572#!"&5463�R@.@56��kmR7�� �*��V+U��#6264&"332#!"&54633462"�X??X?+�'D��D#(8((8�?X??X*��8((8(++�� 3!!"&57!'#!"&5463!2+*+���@V?�����*�UjO++�� $0@53'!!"&55375#3535#554&##326'54&##3532672#!"&5463+�+����@ 555k 5  �� @@u��*+K �* @@ �7 �*��@@��#%!2#!"&5463#5462&"&462���*����B<BL((k*��U��*��@&&`��2"&4264&"62"&'6�4&&4&X??X?�����@&4&&4�?X??X�XHHXXHH+��#"'732764'&#'727'5'�887Q1+ !>,++,>ZZQ��NNN���r8�88 ,+|,,EZ[E�NNN<���WW�� 5664&''77&'&'7#67?WW?.==.aa~09A+�`�`+G^GS_a��+�%._-&UW��  %673677#&'7'5&&4675h+r$0�+Wa.==.?WW?�.%�%G_SG^G+`�`B@@��%!2#!"&5463���*��jkkk*��U��*kUU���#%5##5##5##5##5#%2#!"&55463�+*++*++*+�����UUUUUUUU����0�� &75#"&6264&"#"'&5477632&&77}J"  C�  j�  ��4[���  �!A  A�� }�+U�� %7'#55372#!"&5463373@KK�KK�k��D'�'�KK66KK6��**+k�� %7'#55377'#!"&5463!2KK�JJ�kUU �� + �KK66KK6JV��VK  ++�� %$"&'3&"&462"&462264&"2"&4%J; � ����ee�eS�}}�}�)!!a�e�ee�}�}}�@@�� 777##73546335%&'����*U��*U�=�`��@�=�+U+U*�=���++��6264&"2"&4$"'75��ee�eS�}}�} LJj&ZUe�ee�}�}}�(LhL&Z�~�U\%54'&#"2766'432#"5%"3#"'&533254.'&'&547632#4'&%73#5

,{S)RS
, 9)&!# * !** �Ie+@�6$45   Gm9)nn5 
%'
   &:%��Y~��8^"23#"'&533254&&'&'&'&547632#4'&"&53324##5327654#"#47632v , 8(!* !** �*J/+ *. &
*0&*! 
%'
  &*%&"
R! & -$H@+��6264&"%"&4632753#5�|WW|W+*p�ppPA7�*+�UX|WW|�5BOqq�q+ ���++%��/%27''#"&547'537#5'654&#"'632'$�W�{628Pp ;�*+��* W>(" 0:C5U�")>XV��6 qO:0;YI�++L5B:0")>W *++�� !)%67#67#67#53&''3&''3&2"&4��p  >�� p>J?WW�}}�}�@>�@>��R`�`v}�}}�+��532#5#3'35#"&55#535#7#!Հ+�U+@@*�UU+@@**U+���+@@+�++@@�@@�� #533##53%3#5#53#533#3#3#@+UUU����++UU�**����Հ�@�+*+U*+�+*Հ+***�* @k�� #'+/3#53#53#53#53753'3##5353#53#53'53�UUU�V�U�U�U�VVjUV�U�UUU�U�UUUUUUUUjVV�UUUkVVVVVVkUU@k�� !!5!!53@��k��k��������U��!73'#373%3#'#'#"&4632373%7�(D+D)D',% &R1GddGR3 " �����*���� +4e�e@���NNU�#!"&54676632�):?,��5KB0L-:X*=*,?K51I'0I!��!%773#'"&546753#553'7p&@@k#KjK#��@�*�&&}&�+�:#5KK5#:g�++�??S'' !��#'77532"&43#7'7'#5#57'7L&&�*JjKKjK+@@;&&&�*�@{&t''5??jKjKKj +x&K&&5??�++y&++��5#772#!"&5463!!"&5�k56�V+���� ��U��*+@��7!''%2#!"&5463k*`J6 ����`@���*@��  $)-16:>73'''!!"&53#73#'#463#3#3#%2#3#'3##553#3#@�D5'`+�V**U++�+;****��++�+++�++�++++k[E.f�U+++++��+�+*+�*+�+��+�*++@��  ',049=A#53#5#57#46#5#5#5#5"&5532##5'#5#57#5#5�*�+�+++e***++�++��+++�+�++++�++++�**�+��++U++��++++��U��*++U++��+�**U++@��6264&"%2#!"&5463��dd�dk���KjKKj���*L!�� 7'77'7#53''3#5!j&D&B&y**�&�**�*V&$&��'z?_&[?ꀀ%17!##5#"&55#53535#5322#&&''267"#"&'3�++�+++���d� D5Q_Qd� D�+++�++ր+�+�c<`Q�6Q�c<`++��$,4234&#264&"73#!"&54633732'52#4&462"U*�X??X?�j��D'�5K;�(8((8�*��>X??X��+@gK5);��:((:'+�� $064632"264&"'535332#!"&=33##5#5�(((:X??X>+@�'D��+@@+@�:(((&>X??X�@@+�ր@@+@@++U��(7''7''3#!"&546333'33'33i,,,,e;;;;�U��*@**+@+++@,,,;;;+��@@@@@@@��"''77''773#!"&54633#!::::k,,,,*����+:::*,,,,�*+��k��73''72#!"&5463#3#3#��D6&� � j**V++�ZD.� �  ��*�� @+�� '6:'632'3'#&547#"7#7&'264&"%"&46327'#5:1$+
S<]�Feb=-!+�s+5m+5;|WW|W+*p�ppPA7t�gdL�m3�k/�iS�L�K4kX|WW|�5BOqq�q+ j++@@��!7!''73#!"&5463337#5#53533kV@*�@��@@*@@*@kjU@U�@@@*@@*@��77''%2'&5463���L*�����L���tt++�� %7'#"3537"''&47762+JJk *V�����JK5 U@���+�%-5=$264&"62"&4'#5'&54776323"''264&"62"&4$"&462v>,,>+Z>>Z=E/*E <) ,?-�>++>,Z==Z>\""K+>,,>�>Z==Z^1�j< < ) +-��+>,,>�>Z==Z�""U@�� 15!264&"264&"'5462##"&55###"&55&����+X�X  �  kk��3""3�&  &@@�� -!'#264&"264&"%##"&55!##"&5576332k* ���),  �  ,�`�€�  ��%����"575'&77546335332#"'"'#3#"''##532727�����(@�@(1%%`%%1V**-)UU)-**.('\'(�U**U��� c@@c �****++,,+U@�� )5#264&"'5#264&"2#!57"&554�k=Uk-�X, � ,kk�mkk�-"3�+ +�3U@�� 5!264&"'5462#!57"&��o""�X�X, � ,+jj�""�3##3�+ +U@�� )5#264&"'5#264&"2#!57"&554�k=Uk-�X, � ,kk�mkk�-"3�+ +�3���!3735'735"''&#"#3576"&462�<-',+- .G> o+&`""B�ӫ+��+@5*4"/dHI""++��''575575462���+KJ*���@�5u  u5*ku  ukU��2#5!#335"&462�#3+��++�<4&&4&k3#�@@@���&4&&4@?�� %&&'77'7 �&��&�
�#��#�q��p?{��+?��''77'&&'7''7'7F�Pj�#�K- �&EZ�;�>���pQR�{;"q6Z�.�0��++��%''575575462��+KJ*����5u  u5*ku  uk+U��3%!2#!"&54635#535#"&554633533#32##���V���+U@ *+U@ ��+���* @ * @ +U�� &%'7''763#!"&552654&#5463!2"LFZ!![GL���V�W:TT:W1F"UUUU@@��37!!3!535'5!��&��G�k�k��k*�j++j�++@��75!5#72####"&55+�+++2#�#3@++@@k@@#33#�@�� -8CN7!'#264&"264&"%##"&55!##"&5576332&"&54677"&54677"&54677k* ���),  �  ,�� Y X �`�À�  ��* 
%  
%  
% +U�� !5##5#3'5#3#35#573#5##35!U+U@**@+�@�V�@*k++@++@@@��VV@@+��7!2654&''!##"&'� �� m4& @��+�UVV�&:H+D�{@+��17="26447&546325462632#"'"&55#"&"&52463,,� ,   ,  �PpPppPp� ,,F!!
 
!!  �qOqOOqOqU@�� 5264&"5#%"&55##46332322655#"&547'7w  k�&, ��  "-+   jj;�k�U�` �$-+��#+$2"&43!2##33!"&5477'#2"&4Z""��F< L ���M+o""�""o* �#+
5���""@@�� %5#5##33572#!"&5463�UVUUVj���VUUVUU���*U��2#5!#335"&462�#3+��++�<4&&4&k3#�@@@���&4&&4U+��'-6264&""2646"26472#!"&54637"�jKKjK  3  ��Dx2FUKjKKj    7��V��yG2@��"&46263"&#524&&4&@PpoQQopU&4&&4qK�LL�@+�� '6265#"&5#6"342#!"&54633462�X?+&4&+�4&�U��*?X?�>,&&,�&�,??,U@�� +5#5#5#'5#5#5#3#5##5##33533�+++++�++++++++�++++�+@++U**V++�++U**V+++��++++�+++++��264&""''&5546332ht � $ � � ku $ � � � �@��264&##72###E@5KK5@U"V�KjK��@@�� %5#5##3357!57'5!7U@*@@*�++��++2�+@@+@@�*��++��*VC@@��7632#"&546332�0]/
$( �� K  ]0/
 K Ֆ ($ @+��6264&"&264&"&2�""@"""�M���""�""@U��U+U�� &%'7''763#!"&552654&#5463!2"LFZ!![GL���V�W:TT:W1F"UUUU+U��5'72#!"&5463�������U+kk+j��+@�� !5264&"5#72#!5#5463��   +��&U�U&�UU�  �jj�&�UU�&::��''7&6766'&47=���� L. @�Z�
����@ .MZF�+U��#6264&"332#!"&54633462"�X??X?+�'D��D#(8((8�?X??X*��8((8(U�� )$264&"7#3264&"%#"&5#"&5#5463!r@5_��K@+&4&�&4&++u�5��Uk&&&&�V@@�� 1!'#264&"264&"%##"&55!##"&5576335332k* ���),  �  ,5�5`�€�  ��++@+��627&&"6"264&2'&&54��.XNX�4&&4&��pQ>11>QzD&%�&4&&4PqOBf11fBO@@��%5'2'"54777@�� x�r x�rk�-�( ��)-, B)-,��'6264&"%3##5&&'#53667532"&4�|WW|WT,,`C*C`,,`C*C`�F22F2kW|WW|S*C`,,`C*C`,,`2F22F`@��''�����z@@k+�� 7!!3264&".5462k*��j"�@ +GKjKU*;""++u%%4|+5KKk+��264&"&2.54�,, |W,+4'  ,,�W>PF=EAR>++�� %5##376''&%2#!463�u+`5�&�+��U�++�&���U�::��''7&6766'&47=���� L. @�Z�
����@ .MZF�@@�� !7!'''265##526572#!"&5463k*`J6J>W+>,&�����`@ X>,?kA'*��*@U��%5#%##5##5#57!'!5�@+U�V���UUU����+kk�++���!77'+��*�`"<����QU@�� I2654&"264&#"264&#"73##"&55&&535&&535&&535463323�$$$$�$@$ � $@$@$@ � @$@�""�""�-, ,-, ,>��"7'77#5726323"'#5'6"&462ӕi"'*o ?G. -+-I""c+�Id/"3+5@*��*�""k+�� 5#5##335&2.54U@*@@*S|W,+4' +*@@*@@�W>PF=EAR>k+�� 6''&7'62.54>PGG|W,+4' _PGG�W>PF=EAR>@@��#''5��8�����8k+��"6274&"6"2654&2.54�n;4;f""i|W,+4' �.�DW>PF=EAR>@@�� %#7'7#57'53'73''7��1>=π1=>O�1>=π1=>��1=>O�1>=π1=>O�1>=@+��463#5#'53#5&&553353UA*56j*."5".+*+�7�V�k��"1��1"����U@�� 777#536264&"7"&55##46332322655#"&547'7�U+U+�  ;, ��  "-��k�K  /�k�U�` �$-@@�� &54633462"632##54�)� � ?X??XH4@!��9)� *NX??X?G' u++��"&.6%54&#"337335'26!467623#462"6462"�B>;E!$ < !+.�V.++����
 �  ��&&�! !.D-��-D�k3    U@�� 0$264&"'35#5#264&"2##'##57"&554>R+kk*k�SX, +*Q*0 ,55��UUUU�-"3�+ ++ +�$k+�� *%5#264&"7#3#'##57&&554677#53#k�]� +*Q*0" D;f�F?A�kk`&
**
"$�) *+��!(/3735'735"&''&#"3576"&46255#573#'7{;-%.+, -G1  p*&a""�55u5uu55B�ӫ+��,@7*".dGI""��%56& Z %56+��@#+2#5##5##54635#72#5##546;##5#�   �*5 * k�0 0@ k`KK`k @ @ k k ``@+�� 73#6462"#@���8P88PMu���.P88P8��k+��(%4654&"34625#2.548,>,&&&+|W,+4' �2++  =%%%W>PF=EAR>�� "I'5264&"264&"'3&5#264&"2##"&55###"&55&55463236`=MX??X>'��-�>XJ6  �  XS-�[$.k�>X??X�m+?�mX>8SB&  &�3#A+U�k256654&&"55&&54��}G9'/(RbR(</UUBSk?,!5 ,
  #:UVE 7$,+��k77''%2##"&463�ZL'&77&�&77&�ZK(i?X??X?����%#5373U�@�+�g��e�+���
$7!!%!4665!#!"&54'&''3533#@��@��B^_B��A �� l4<j*k$ �*U1BB� �?22WW�� ++��6264&"462"�jKKjKU}�}}��KjKKj#�}}�} UU�� #%53'53'5373#53#535335353UVVV�V*VV�V�VVV*V�VUVV�VV�VVVV�VVVV�VVVVVVUU��!'7���w��w*x��x��k+3��k+k++��
%7#&2"&4U��}}�}�V�}�}}���k@77�kk�kkUU��'7!5!'��w��w���x*x++�� %'7''72"&4kMMMMMMMM��}}�}�MMMMMMMM@}�}}�Ik��77'7���w���w��I�'7Ibb��bbb����U�'7'Հ�bb���bbkk�� ''7'77�wwwwwwwwwwwwwwwww���U''�bbU�bb���I'7b��bI��bkk�� 3#5#53#5'53#3#5+j*@@*j�j@@j�j@�@j*�j*@V@*jkk�� 3#5353#'53#553#5U@j**j@�*jj*U*j��j*@�@j*�*j@@��� !!5!5!@��������+j**k++U��+2"&462"&4&2"&4�""�""�""+""""""�U+�62"&462"&46"&462�""""<""�""�""D""VU��7#7&#"32673#"&4632y2�E&45KK5*B ,\;FddFGy2�E&KjK/&8Hd�d�Ub� '777'bbbDD�bbDD�bbDD��bbDD�@b� %7'77'7DbbDDbb|Dbb�DbbUU��7'#U��w*x��w��wk@��
353#'�M�+�M�@M��M�U@��
%'7#33'7��M�+�M��M�MUU��'737���w*x��w��w���� 3#%'7�++ ��b����bw��� 3#'7'7U++���b�����b��+k'+kk�k��@k75�k��k�+��'7���.�����-��}+��7'7}.��.��-��-�k��'264&"264&"7!547'76275!"&7  t  �=��=-1 D 1��*W|W@    W-KK--11��UU>XX@+��!%'73#5'7'753'64'7((<\\zbwwb�!V1
�)QQ)\\y�bwwb�d2z4*X*V1+U��6264&"72#"&463#53�""*GddGFdd***�""�e�ed�d@kU**++��%2654''7&#"62"&4Fe%�0r%�09FeS�}}�}UeF90�%�90�%e�}�}}�++��%654&#"27'2"&4�$eF<-i<-�$e�}}�}�-<Fe$��$�-<Fe�}�}}�@U�� -!'#264&"264&"%##"&55!##"&5576332k* ���),  �  ,�+`�À�  ��@@��!%5!2#!"&5463353353'77���*��+�+D-hk��U��*++++�D-h@@��'%5!2#!"&5463353353'7'77'���*��+�+�4444444k��U��*++++��4444444@@��#%#55!2#!"&5463353353#5+���*��+�+��**j��U��*++++�+++U�� %'7''772#!"&546337HH7?k���+�G0CC0G%��+++��7!''72#!463k*`J6���UՀ`@��U�@�&$264&"264&"264&"%2#!"''763�WY5��ss������+��*%54&"32##"&554635462'"!"&�U j ,5(8����  U U `8(@��@@��"0%2#"&54633276'7'7'7'753#5� �� K  //^/ $Z;;1
=..=
� K Ֆ ($ /\1/  �(p(y<<1Q=..=Q@@��#%2#"&54633276'5#535� �� K  //^/ $UUk� K Ֆ ($ /\1/  `@V@k@@��,4&#5234&#522#"&54633276@&,?*W>Pp �� K  //^/ $&+?,>W+pPK K Ֆ ($ /\1/  @@��:54&"32##"&5546354622#"&54633276�Z k , �� K  //^/ $�

U U
 � K Ֆ ($ /\1/  C�(%"'&'&55&""''&476 %#53#7�5 .h. 5i"�� �K`���5BB5d�K� `��@@�� $3#2#"&54633276#5�++ �� K  //^/ $+��v K Ֆ ($ /\1/   ��U+�� 5##5##5#72#!"&57�+++��UVVVVVV����U+��%5#5#2#!"&57***���jjV++@���++�� 5##5##5#%2#!463k++*++��U++++++��U�++��5#5#2#!463***���U+UUV++�U�U��%55"&5472'654&#'7UUFeK5FeK5UU�@UV@eF2)!5K+eF2)!5K@UV==�� #)'654'57'567'7#7&5477'67�33 &/�O2 �&/�33f
�33E0*4&/���2,�4&/�33E0* @U��%753756654'553'4677#7&�*�22H8&/%0U*�H8&/%0�22뀀�32F;\, B*5%/���++k;\, B*5%/�32k��
%'353#2##"&5463UUU@*V����VVjj�*�����+��!)2##&'3#&'54632#4&#2#52#4&#k-A�ja�*qO&@>W+>,���+*� ���bOq�&�X>,?@U�� -!'#264&"264&"%##"&55!##"&5576332k* ���),  �  ,�+`�À�  ��@�#%#2##"&54635373#53'53U����+++�k+k+k*��U��@���֫�+��+��++��%55#3572#!463�U�����UիDD�E��U���
/7M75"&55'73#"&54632####3232654754&"32##"&554635462�gV�+}XY}}Y!+ +� 
,/Y j ,A*fAa�Y}}YX}
6* * @/D�

U U
 *��k&&66!##5#%!532�&4&&4&��������#2&&4&&p*++j*�3 k��&&667'#5%%7�0303��a�0��-�"1030g(�(""`(_yB @��k
2!5335"&462�#3�*+�<4&&4&k3#�֖��&4&&4+@��%'#"&5533276%33#"&553�
OI�&�K H �t&��,>*� $�&��� e&+?,�@@��%2##5#"&55332%33#"&553�  `�&�k��&��,?+��&����&+?,�@@�� !33#"&553##57#"&5533232k&UU,?+?`�&�k* &+?,���@U&���+@��!*%'#"&''&67367'#"&''33&&66Z{ Q�##040>c�(<***$?#�` @~  %
."WU+3'��#
#U5��"*%'#"&55463323"'333#"&5536&462�Kl&9>8J�&��,?+/"TK&{!//O&+?,�""+U�� (5#5#5#7"3#!"&552654&#5463!2*****���VK**`**`**�"UUU+��!2#!"&54633'77���������FUUF+VU+�+�FUUF@��5!2###5#"&5463U����k�kU���+�++@��%!2###5#"&5463����k�k��+�++�@��2#5'5463353353VKjK*V*kuK@@KuUUUU+��)"&462"&462#5#76332#5#546332#r$$�$$�@@6  6@�� @ �$$$$�������uu�U�� 762&"62'6 &"k>�=*,~,+L@�ba+P�P�==+,,+@�aa+OOU+�� +%5#5##335'354&"2#!"&5546335462U@*@@*W�'6'��?X?�*@@*@@�++''F��+,??,+U�� (763&'77&'7!66&%2#"&54776k@\1%�  +'1 E3�*;�O=w- 4o�@=%
>*'<3;/9)-�
��
�@��#'663232'354&"'#!"&5547'7�';),?�t'6'�,�'(6?,+��+''��� +U+��
+5#535#264&"73#"&5#"&5535#'732k@@��UI  �*�&4&+�V@@��@@++�@@�  3*&&@@*@@+��73'#''#"&547'#'632'3�J+e�;6CX}&<VJ�6CX}&c�*��`<&}XC6;��&}XC6d++�� %5#62"&4k��}}�}�**�}�}}��@+� 3#462"�VV$$��g$$++�� %3#'&&46�lLLl�+Qoo�Ll�lL��Vz�z++��
%667#&73.2"&4:S��V@?i�S��}}�}WS:V�`R�:S3}�}}�UU��462"462"&4632#"�;V<<V$$�(((V<<V;p$$\8(':'+v��#&'''77&#"'6327�A%+VU� �U=;UI;HZfG=lI;H3.aV� �VFE4@OD+v��7'77'K �U��Uv �V��V@+�3?2"''"''"&55463353327#!"&553277277'"&5477�&" .. # -. "&k*M �� >K$$@&! .. .. !&++� b b � ??  +@��#'+/39%#57#55#3#3#5#5#5#5#5#5#5#5#3!3�+++V�+++++*******++++++++���V��++U**��+*++***V++U++U****V++U++U**���k��
$%2#54'6"2!5466"&462"&462UB8�*�8B7��8x4&&4%�4&&4&�$55,$55$:&4&&4&&4&&4��#/62!54%#54&"&462"'64'632'##5#5353�PX�%8@�4&&4&+

&&�@+@@+�#++++"H&4&&4&D&4&+@@+@@
@@�� #,%5#5#5#5#5#5#'5#5#5#73!357�***V*******V*****Հ���@@�++U****V++U++U**�++U++U**��+*@@++�� %$"&'3&"&462"&462264&"2"&4%J; � ����ee�eS�}}�}�)!!a�e�ee�}�}}�++�� %62#66"&462"&462264&"2"&4�J; � "���ee�eS�}}�}�)!!i�e�ee�}�}}�U+��%!5754675462"&53�+��+3--3�V�++j2J    J2�U+��!%54&"7!5754675462"&53U.N.�+��+3--3o"V��)77)�++j2J    J2�U+��'%'667372635462"&53'!57547'7��
-3n$V��6+��+<��   J2�:�9++k) ;++��%$"&537!5754675462&'7%#67$UV+��+3--3*FS��G+S+�j++j2J    J'V3@g�2Wg@U+�� $5#335#!5754675462"&535j;;j;�+��+3--3�V/&&I&&;++j2J    J2�@@��#2#75'3##5'7#"&=4633'#�kVVk�jV��Vk��Vk��V�k@Vk��kV+U�� /%2654'###7"3&54633&72#!"&5463373,?-&U!4,?-&U!w��D'�'�?,&+�?,&+@�**k��
$%2#54'6"2!5466"&462"&462UB8�*�8B7��8x4&&4%�4&&4&�$55,$55$:&4&&4&&4&&4k��)1>"264"&462&"264"&46254&#"#54&"%2!546326q"" >,,>,�"" >,,>,�G$& GHG++`�*`+/11u""\,>++>I""\,>++>�
 

`'::'UU��62!546"&462�lu���F22F2�/&++&Z2F33FU��$2!54'3##5#5353"&462
lu��@@+@@+�F22F2�/&++&�+@@+@k2F33FUU�� !62!54662"&4"!54&"264�@L?��?IF22F2�XVo&&�*@@*�3F22F�!  �&&U���7#53##5#5355`*6`VV*VV~��� U+UU+U@@�� %5##5##5#2#!"&5463k++*++���VV�֖�+��*++��"*%654&'####32325"&55'2"&4~-;0* *� �fW�}}�}�0C5V + + @T)fA`v}�}}�@�� #5'7'�+��V��������i�YRRVQQ@,��&%2"&547'#"&46327&5462#"'6�$%2%�&&�&4&&���%%%
X&4&W
&&4&X
XU+�� 72654'"&54732654&'�+; D<(C@Kd�dE,! )k;+,*) 5'�4�TFddFlR!.-"4++�� !)62#&"#6264&"2"&4462"6462"�J; #b# �ee�eS�}}�}j��)!**!We�ee�}�}}�0++��#6264&"2"&4462"6462"3#��ee�eS�}}�}j�~��Ue�ee�}�}}�0@ ++�� !)6273"&'3264&"2"&4462"6462"�b# ;J; #�ee�eS�}}�}j��*!))!�e�ee�}�}}�0++��%-62#67'7'77'7''7'7264&"2"&4�J; � ���ee�eS�}}�}�)!!TC�e�ee�}�}}�++�� !$"&'3''777'264&"2"&4%J; � �-.A.-r�ee�eS�}}�}�)!!x----�e�ee�}�}}�@@��77''%2#!"&5463���L*�����L���*@@��2#!"&5463!!���*��*���*+��++��6264&"2"&4��ee�eS�}}�}Ue�ee�}�}}�++��6264&"2"&462"&4��ee�eS�}}�}�X??X?Ue�ee�}�}}�?X??X+@�� %7'77�#t�<<�t#�P�e �� e�+@��%'7'''7'77PG^$�t#��#t�<<�0[>VCe�PP�e ��+@�� %'7''%'7'77PG^$$^G%t#��#t�<<�0[>VV>[�e�PP�e ��� DN2#&&''4##32765'2##5#"&53324##5324#"#476327"&'3d� E5Qo/$
/5#11 #HQd� D�c;`Q�9{"Y/ &�S 
  62  �Q�c<`@+�� ##5###5!&2"&4��+*+���""@�뀀+j""++�� !53#5!3#'3#���k*@@����@@�@@�k++U�j@@���@@�� %$264&"53#!"&5463!2#"3H5���*��G��+*�@@��7!54&"64&"2'463!2#!"&5�XPX�&4&&4�*���%%t4&&4&���++��627&&"6"264&2"&4��/XNX�4&&4&��}}�}fE&%�&4&&4f}�}}�+��%-9733!"&5477'#53367##2"&4&2"&475#53533#���M+F$
�K%R ��""�""�@@*@@�+
5�**+ M��#H""""�@+@@+@++��6264&"62"&47'5''7'7�|WW|WE�pp�p�UeCbbHbUX|WW|�q�qq�p2<�cR RR!S ++�� #3##5#535264&"62"&4%'7'7@@*@@)|WW|WE�pp�p�b�bb@@+@@+@�X|WW|�q�qq�L!S R R#+�� !1'7'32'#"&547''7''7"'632'654&���"W>4�L%/7GPp/�bs!**Pp! W����*5>XzL��%//qOF7.!S X qO,( >W++�� 77'7264&"62"&47'7'7�i�D|WW|WE�pp�phbbHb�j�D�X|WW|�q�qq�~R RR!S +�&2L5##5#7!47'&6632762"&554$2"&5545!##"&55#"&55#"&@V�5�4  A��U * �=&AB%  � ��  �� ��� KKKK ++��%5#75#72#!463***���U�++U����U�@��%!2#!"&5463#53#535������U*j�j@j,��V��*�@k+@k+@@@�� %5##5##5#2#!"&5463k++*++���VV�֖�+��*@@�� )5#5#5#"26472#!"&54633662k��֖�t  ���Y * @++U**V+++   ��*@@��-%54&""264&"26472#!"&54633662�XPX�4&&4&7  ���Y * k%%&4&&4{   ��*@@�� %264&"5#5#2#!"&54633662�  ****���Y * �  ̀�U++@��*@@��$%5#55"26472#!"&54633662UUkk   ���Y * �U@jk@   ��*@@��$%7#5##6"26472#!"&54633662k@V@t  ���Y * �kUU�   ��*@@�� #77''6"26472#!"&54633662ի�7�  ���Y * ���7�   ��*U��#'72654''"&54635�eFUU5Kq5KeFUU[)2Fe@VU@K5DK5!)2Fe@VUU�%3'337#!"&54676632+@kk@Vr):?,��5KB0L-:X�jjV�=*,?K51I'0IU+��7572#!"&5463�56���� �*��Vk@��
2'463k�����@@Uk@��%#72'463k�kk�����/��@@UU@��75#5#7#3#3#"&'#53&55#53547#5367'7627+VVV�-++-<;F;<-++-<#//#++U**�*++##++*#..# ��%''&'&&77'6�1�$Q ^@\&X k1� X&\@\ Q$U��3'34632&#"%##"'73265#�@UV@eF2)!5KV@eF2)!5K@UUFeK UFeK5+U��!!��VՈ����++�� 77''62"&4���L=�}}�}���L�}�}}�@��%#2#!"&54633#53#3#�����Ֆ�����k��@��� �  U+��7572#!"&5463�56���� �*��V+��� %7'7''77cc�����c�bb����b+U��5!5!2#!"&5463���V��V��U++Հ�+�@@�� 3#53!53'53������������Հ����k@��!5373!##"&���Jj���++���U+��
3'5#5##!"&5463vv@������@u�++U++U��V@@��/264&"%2#!"&55463264&"%2#!"&55463�""@ �� /""@ �� @""f � � ��""g � � Ik��77'7���w���w k�� 77'77'7 wZ�xY����w�wYĈ�@@��%5!332#!"&54633533#5����+��+�kk���+��*++�kk@@�� 2#!"&553!!#54637#53'7���+*��+l7��7kk���UU*UU��8*8kk++�� %72"&42"&4/Q�Q(�}}�}�  ѯQ�U}�}}�A  ++��/2####54&"#"&553264&##54633546232�  Q"0"Q !! V,V,V !! Q"0"Q   V++��&62654'#"'2"&42"&4&2"&4��en@!OS�}}�}
pUeFZP# F}�}}�S+9��%'.5463263250;C2:&&:2C4=E90.D71D--D1'T>>+9��-%>54&#"#&&#"2'.5463260.6+ +(+ +6.0`2C;05E=4C2:&&t+,<. ** .<,+ND17D.0>>T'1D--++��5#5#2#!463***���U+UUV++�U�U+��!6462"'654&"327#!"&54633�&4&&4�R?X??,^ ����4&&4&MR,>>X?_V�U6��!%'#"'5332673'"#66327#7&cgh(0>,,�6-'9+�':+T8=,,�6�hg,,�60%$�0%6J,,�6 @@��"&+/48<%5353!!"&553'5353"&53#532##5#46#57#5@+++��U++++�+U*�+�*+++++�++++*�+�+�++U**V++�+++�**V++ @@�� #(,075335375#2##"&554635353"&53'53'53�++*�����+��++++++@++++�������++++�*++V**kU��
7!!%'353k*��*��U��+땕��+@�� %7'77�#t�<<�t#�P�e �� e�++��$264&"&264&"264&"2"&4?, ,U,,U,, 3�}}�}�,,�,, �,,+}�}}�++��!654&"34623475#2"&4A2F2*" **C�}}�}#22#" ! !�**j}�}}�++��6264&"2"&4''7'7��ee�eS�}}�} 7777777Ue�ee�}�}}�7777777@��3'&2"'73264&"3''34 K[:�qq�8,=>XX|W@VS@UZ-7�p�p8,W|WW>VSP+U��
7#5#7##5#�j@��@jVU������+�� 75#'3!!57'U��UU��UU�UU UKK�UUK��UU��UU�+�� !!57'�UU�UUՀUU��UUU+��'54&"264&"72#!"&5546335462B'6'1""��?X?U+''+�""���+,??,+++��5#5#2"&4***C�}}�}@++���@}�}}�++�� 53264&"2"&453�*[�ee�eS�}}�}�*@++�e�ee�}�}}�À�@��75#53572#!"&553!!#5463���U���+���+�@*@U���VV,VUU4��%7"&477Z&L�2d�d2y^5Z&54L�2�dd�2y@k��##"&5546332x]] ������@k��%7'#%##"&5546332ULL� ]] ���kk��
++�� #+05=%364'#67#'64'#67#'67&''3&47#73&&'&2"&4]HH)= ?
d2 R 9
= =
PHH� R x =
��}}�}�,�8(R,,),,�($8�8$(*,�),,,8$(�}�}}�@@��3#5'7#53#!"&54633#+�+��Lj+������L���֕�*+��@��k !!5!%5!%5353'53�+��+��+��+++++k+�++V**U++�++V**U+��'54&"264&"72#!"&5546335462B'6'1""��?X?U+''+�""���+,??,+U+��!)%5!2#!"&55463354&"#462"&462����'6')?X?Z""U����+'',??,+�""U+�� #+%5!354&"2#!"&5546335462"&462��>�'6'��?X?Z""U��+++''F��+,??,+�""++��*%64&#"'&#"264&""''&5546332p[�t � $ � � �,[ u $ � � � ++�2#!"&5463353#35���+��*���U��U+��3'5#5##335#!"&5463vv@@*@@*��@u��*@@*@@*��V@U��##5#72##535!3#"&5463U@*@�UU��UU+V����+��+@@��3#5'7#53#!"&54633#+�+��Lj+������L���֕�*+���� %3'35%5#535#'775#7#+@kk@k@@�@kkU@kk@�@kk@@k@V@@V@kk@@kk@+U�� %%7'654&"32772#!"&54632"&4f>8P88(����, ,|>(88P8��k, ,+U��5!5!2#!"&5463���V��V��U++Հ�+�+@�� /%54&"2672##5665#"&5##"&5463373+""��->+2F2+>-�D'�'�UU��-G/#33#/G-++@@��'%54&""26472#!"&5463353353�XPX�4&&4&U��+�+�%%&4&&4f��*++++�CM$264&"7''##"5'&'''&774&465'&776677433276'"#&�o*
 *OB^��K%  %%  %�^B��k��%#2##"&5463#57#5k����***k*�����ր�V++UU�� !62!54662"&4"!54&"264�@L?��?IF22F2�XVo&&�*@@*�3F22F�!  �&&+�7!''72#!"&54633!!"&5�+K5K����+�����`@`k�*+��*+@@��!3#2#"&54633276��@� �� K  /0]/ $��@6 K Ֆ ($ /]0/  +� 35#5#26�****�x��vU+Հ�[��;Z@��%!2#!"&5463#5������U�j,��V��*U�� U�� #7'#'73�``U`8�U``U`8�����c�򫫫c@@��"&5472654''#5|Dp�pD7W|W7I*�:XPppPX:-G>WW>G,M��+@�� !5264&"5#72#!5#5463��   +��&U�U&�UU�  �jj�&�UU�&++�� '5264&"2"&4 `p1�ee�eS�}}�}kp9D���e�ee�}�}}�++�� ##463!22'#"&55!5k �U  U U�  V+ @ ��U +�@+��!%7777777''''''%5!5!5!@  ���+� �V �++U**V+++@��  A%5#&''7#5!"2646"2642#!"&554633&546327632�m-#@@#-mV��t  t  V��/&! !&Հ<W W<�j**@    ��&&@��
%5#5#***����VVU++@��k@��3'&2"'73264&"3''34 K[:�qq�8,=>XX|W@VS@UZ-7�p�p8,W|WW>VSPk+��264&"&2.54�,, |W,+4'  ,,�W>PF=EAR>++�� '5264&"2"&4 `p1�ee�eS�}}�}kp9D���e�ee�}�}}�@K��6264&"'5'#"&462�P88P8�j j&4:QQtP!�8P88P8j j!PtQQ:4&-+��?6264&"7''##"''&'''&77&47'&776677633276�>,,>,�-+ 5V5 +--+ 5V5 +-�,>,,>
# J8 8 J ## J8 8 J #@@��7GO$4'76''&&''&##"'&773327767776''72#!"&54632"&4p % < %  % < % &���""�4
'(34
'(3���*�""@��2#"'73264&"3'34"&462��ppPB3(/>WW|W@VU@�""�p�p(W|WW>UUP?""kz%'73#5'7'75353#53353=((=\\zbwwb@+�++*�(PP([\z�bxwb��++++++��%#2##"&546353#53#53U����+�*�+��U��U�++++++@��)264&5'75373#'!2#!"&5463&&o 5 5 5 ������@�&4&�5 5 5 5 A,��V��*u�� '7'537#553''7{tt!]]o*V+�+]]!tt���pp�********�pp��"�� (2#4&"#4''75&5462&2#4&"#4�Š+p�p+I@@I ,s|W*?X?*��aPppPa�FI@@IF $$�W>,??,>��
"-9E%53#5&3#5354623#53546253#5&&753#5&&3#535462k�+*V+�+  �+�*  �U�*+��*U*�+  �** ZZWU��U ^��U ��**-ZZ ** ZZ ?U��U ��
"-9E%53#5&3#5354623#53546253#5&&753#5&&3#535462k�+*V+�+  �+�*  �U�*+��*U*�+  �** ZZWU��U ^��U ��**-ZZ ** ZZ ?U��U k+�� 353353353#5'53546332�***+@�@��@****@@��@@��@��'3;$2"&462"&4264&"2"&42"&46##"&46332"&462>=��pp�p_Š�Š��@@��}�p�pp�;�Š�¡�}@��%!2#!"&5463'''%'#�������++U5555�+Vj,��V��*��66�V++++�6@@�� $(3#2#"&54633276'#5##5�++ �� K  /0]/ $++*@+` K Ֆ ($ /]0/  �++++U��#!53"&5472654''#553#53@+
Jd�dJ=KjK>-**�+++�4XFddFX4&H5KK5H%S���+++++Z�(2&"'662&"264&"72##"&5463cC8�8E ,|,Z;""k � E88E�,,�""f �  k��#'#5&&5326553#536"&5546253�K5*5K$C\C1+�*4&&4&�++6RFFR6/>>/��++++�&�&&���+++@��77'7353#!"&53546332���V*����V�kUk+++��++��%%7'5353#!"&553546332!#!"&55uuU+k��jU��U���U@k+++��+���@��
"6264&"'3'32#!"''&54633762�""�@of
( �� 6 f]�""�^^ (�� � +��#+$2"&43!2##33!"&5477'#2"&4Z""��F< L ���M+o""�""o* �#+
5���""++�� %5#5#5#'5#5#5#2#!463����kk*++++++��UU++@++@++�++@++@++�U�4 ��'7'3''##3��lN�X,Ux-m(m �mO�v�@@��++�� %'7''72"&4ZPi))iPZX�}}�}�gE `aEg6}�}}�@U��%5#%##5##5#57!'!5�@+U�V���UUU����+kk�++Uk�� !!5!5!5#5UV��V�����*�++�++�**+k��
"72#54662#54&"&462"&462�3�7B�JP�4&&4&v,,�.05$ 00`&4&&4;, ,@k�� 5#5353#'�U��֖�U@U@*@�@*@Uk@�� ##5#3'353�U@*@�@UU@*�U���UU�++�� %#5##'3353'&2"&4u5+5K�5+5K-�}}�}�UUK�UUKJ}�}}�5��2#!"&54633#!#5'3533�������@U@*@���+*��+*��U��@��%5#5#2#!"&5463������k�U��U��*@��  ',049=A%53#5375353535353532#5"&53'535346353'53k*�+�+++��***++�++��+++�+�++++@++++�**�+U++��++U++�+++U���*++U++U+�**U++U@�� +5#5#5#'5#5#5#3#5##5##33533�+++++�++++++++�++++�+@++U**V++�++U**V+++��++++�+++��3#2'&557#"&57#547763�VVU � �A
��� � b)�@��3##"&55477323�A
� � ��*V+)�� � b��/2'&5667#"&5547763'##"&5547732� j o 1 P1 � j o + � i
4 qUq � i
4 @��k %53'3#53!5!%5!%5!�+++++��+��+��+�**�+�++++V**U++@@��3#5!2#!"&5463353353�kk��*��+�++kU��U��*++++U�� &&467264&"62"&4@/&8HH8&�jKKjK:�ee�e*TB ,\v\, �KjKKj�e�ee�++��5"&4633"&54752654'7"&546752654'�>}�}}X"$2F2&KjK=.?We�e2�>YX}}�}�  -,#22#!&45KK5/G+`AFeeFG2+��
#%3'7#'##''7&'367#53533#SE#`+e+`MBkm(+.��*�?5�]9�@@l,Bjk,5(3?+**+P;+���
%7''777U1hU��U�1�1hU��U�1�@��U5!5!5�U��@U@*@+���
3'''77U�1�U��Uh��1�U��Uhk@��
2'463k�����@@Uk@��%#72'463k�kk�����/��@@U@��77''&&55ի�7��nRRn���7V�Y��Y�+@��2#!"&554632#!"&55463� �� k �� � � � � � � U��� 733#!3��@@��@�������+k�� 3#!533�UU��U�����*@��U��� 3#!333Ukk�kk�������+@��!!2#!"&554635!+��k� �� ��@+ � � ��@@Uk�� !!5!5!%5!UV��V��V��V�*V++�**U++Uk�� !!5!%5!%5353'53�����VVVVV�U�UUjVVkUU�UUjVVU��� 3##5353#53#53'53Ukk�kk�k�kkk��������������U��� 3#53!3353����k��kk������뀀U���!!5!Uk��k�����+k��/2##"&546332##"&5463#2##"&5463 @ � @ � @ � �  �  �  `��2"&4264&"62"&'6�4&&4&X??X?�����@&4&&4�?X??X�XHHXXHH+��%532'327'#"&547'7&&'#"&'67&&"'632'654&�&� ?,!&�z5+2O�7 +�.'.O1>?@&3,? !&���4XH>, ,7.XH;*>,?+@��  A%5#&''7#5!"2646"2642#!"&554633&546327632�m-#@@#-mV��t  t  V��/&! !&Հ<W W<�j**@    ��&&++��5!5!2##'5#"&55463���V��VVUUV+��k++�j**j�+@�� -%5##5##5#5!352#!"&554633546332�@+�+@V��k�k��@�Հ****�j**@+++��+++@��5#32#!"&554633546332+V���VV�++��+++K�� %'5'#"'73264&"3'34632kjk&4&! (88P8JXR5R9:Q"�j k!8P88(UU9RQ:3'kk��!!!���*����+*+@��#%''77264&"332#!"&54633::::GX??X?+�'D��D�;;;P?X>>X+�++��#'2#4>54&"#4264&"2"&453�F2@*"*�ee�eS�}}�}�*�2#9!#�e�ee�}�}}��++@k�� !!5!5!%5!@�����������*V++�**U++@K�� %##5#53533264&"'5'#"&462++++]P88P8�j j&4:QQtP!+++++k8P88P8j j!PtQQ:4&@K�� 3#264&"'5'#"&462�kkP88P8�j j&4:QQtP!@V8P88P8j j!PtQQ:4&��@+5#72###553##5#53##553#5##53�++  + u` �` U +  5  +� `` `` +�55�++@�� %#5463323#%3#5!#5#k����@@j@@��V@���j@@@���@@5@��%&''55'!!+R|"j);q  ����j�
n2� � C+'@��&'77'776!!� |Rq"1*jX)�r �x��j?!
T � ��+�U�� 732653"&733'3�+2F2+KjKk*K``K�#22#5KK�w``k��@ ##3##53#2#353##"&5546;#�@++ `� J* @ u   +� @ + V �@@��%5#%2#!"&5463k����**���*++�� 77''5#2"&4܏q)���}}�}Տq)�++U}�}}�ZR��$64&""&4653#5!#35DDaDDnXX|VVlUUUUU�DaDDaD
X|VV|X@U��UUUU++��/6264&"2"&4"32653#"&5547632#4'&'&��ee�eS�}}�}�((&(*&!&
Ue�ee�}�}}�:: 0*)

>+��6Je|�%#&'&54622654&#"'&476632"&54&"'3262#"'&5432"'&'&5462"54&""&76762'&'&&%"'&#"&47632>.!.&6'&[@.L W4Ig'6&&(* =7)  (3
9GdG:R: � 02x21
-.l.-,;<A6 :GA@+ !.A%%<V/'#(%
 -N-6cE$$8(  �%6 #: �(4/DD/
'77'0"
.-
 '(p  �� '7'7%!!Rx<y�x<yZ<.<�w�6y<x�y<xZ<��<+k+�� )%654&"35&2##"&55&5453##"&=.?X?.Vi|W@ � @U� V � 7,??,7 11�W>N,1 1,N>�� @��%!%#!"&5463!2#5�������V�j,��+���+� $(83'7'3772#5!!#3#535#"&54635#72##"&55463�A5455A�*��++�+��kk k @&>''>&@Ukk�++**+����� � � e��,%##"''76323546232'&546254&"� � j
Iq+8P8* ,� q  j��24(88(5Pk+��-5%3#"&5467326'4633"'32#5#"&54462",:',>0%&!6*$282@*k$$�%0>,':,!&� '*)Iuj�$$+k�� %'73#55#5@UU���UU��UU@*V@UU@*@+��#'%5!2#!"&5463353353#5##5##5���*��+�+++*++U��V��+****�******++��%66737&&'5'&&4670I@hP�I0Ph�2NN2QooQlH0Pi�0HAhPVlVAz�z++�� %6737&'5'&&467 �iO( Oi�QooQ� Ml� �lM("("�z�z @U�� #'+!!53!5353#53#53#53#53753#53#53@���ի����+�+�*�+�+�k�j�k�VU++++�++++++++++V******@U�� !!5!5!%5!@�����������Vj@@�@++k�/$264&"'#53&&#"3267"&547##"&4633'#53{4&&4&�<<!&&!�)8>Z=;#9'->>-�+L^�&4&&4+&4&�<+-==-;%0=Z>+*U2��7!4''7"&5477�&ZZ&�2d�d2y�7&^]&H2FGddGF2y+*��+3;CK%&##"'&'&667667676363226462"&462"&462"462"r     'SS' 
!
  ",,,,�,,,,� *
** (  (Q, ,u,, ,, 6, ,�+U� %##5#5462&462"U@@*&4&*�$$�Vjj�&&$$@��'64''64'2!546462"�>>#,,# $�lu��V2F22F�A�>"3�0%#X $-�/&++&�F22F2 @@�� #'+/3#54&##5325335335353#535353'53533#�+&jj,?��+*++*�+�+++++++*++++Ujj&+?��++++++U++++U++�++V**V++*+U��"'%'5'#56776332'532"&4#'�@@� 8L� Q""`6+K @@@ �.!{L1 �k""��6J ���3#"'"&547'"'"&46327&5462627&5462�L"7
a"a"6L"f"L7a"a6K@@��'5#7&&27653"'&4627 J[Ց;,{,+V|,++88�88p�8:UZ-7j-<,+,xX,+=O7887�p8<++�� %7'5#&2"&4Z` C�}}�}�:o��}�}}��,##"''636325462354623546235462�3#�$�
\���#2�4�  ��˶  �v @@��'%27#"&'#53&47#536632&#"3#3#@3'&6J>cKAAKc>J6&'3'B{��{Au"&1H8++8H1&")"++")��7K%4&##3533#'326'672654'#3#"&546327&#"2##'#"&54633� �a)$FB*� � �.9d? ''),>>W���K* Q2(FBB6 �2"(s:.% ((?X>��@@@��-62"&47'!23'#'#"&547'#"&5477''7�""�� L �l+2L= �/^�""�� �++#�= 
5c^U+��%%264&#"'3'632#"'##!"&5463,??,: U".,,'% 5L���?X>1U"(+>, #U��V�� 2'35#'35#'3'5#'#'��i���~)++++e�z�U+���++)~�+k++�FzUj+k@��3!537377'7''!##"&KJ��Jj�.-------S��++�.----...��@+��"&462#5##&'72""� 2N+*+N2 N��""+�뀀+++��6264&"2"&4%'7��ee�eS�}}�}7�jLUe�ee�}�}}��kLk@�� 3!537335!##"&KJ��Jj�����++�����+� '77'�Z���ZZ��Zx�Z���ZZ��Yx@���!!@����+�@�k7!!��k+++�� 77#53&2"&4�hHjJM�}}�}UІ��}�}}�++�� 7535#57#376"&462�UUK�UUKJ}�}}��5+5K�5+5K-�}}�}U+��&.%2#5#"&77#'76332"&463"2656462"k*k
'/) o
$?X??,&&4&@$$�uk)W! &(NK,>>X?+&4&&�$$+��%!2#!"&5463353353���V��*�*@�����U++++@k�� !!!!!!@����������+*k+*Kk�� 77'32#Kgg� ]] k����k@��%3'33'!##"&5!5373+*UU*V����Jj�VVU��@++*+��
%/%267&#"'47&#""264"264'2#"&465W4A((D:&**_""vX}}XY}}U=0WX#&8 **""�}�}}�}@[�� ###5'7'�@+*+kk*�//��@��
�P(e,j,e@[�� 7'33373'7#'##7�@+*+XP(e,j,e[@
��ek*�//�7@�� %#7'77'77'7''70Z��#8/*_K/�@���8h�/L ^I@�� ''7'7''''����8h�/L ^9Z��$80)^ L. �@[�� 7'33377575'5�@+*+kk*�//�[@
���P(e,j,ek@�� %5!5!5'3'7#'##7�@��
�P(e,j,e�@+*+kk*�//�++��+#'#'#5'75#'7#53'735'753737�YEc+dE*Ed+cEYYEc+dE*Ed+cE*Ed+cEYYEc+dE*Ed+cEYYEc+dEk�� /3'#264&"'5#264&"'35#%#"&5#"&5#5463@kV(@UN UU+�6&4&u&4&+V�wVV�wV*�j&&&&��s'2"''7264&""&462'&"27677]`CC`" <**<G<!`CC`"!<**<G<sD^D"*<*>5!D^D"*<*>5@@��&&6&&7&474367t2�>0s1z11 2=??FbQ8��D2 11z1s0>�2=?�?F8��+@��+5#32##5##"&554633573353#!"&553+V��V�U+U+�V����k**@++@*++*�UU@@��'7264&"264&"&264&"&264&"264&"2#!"&5463RNN��@�NN�.��*@��%CKS73"&26723264&#"#&&""&#"3263%"&'&&'&4766767632$462"6462"�� 4@4!fO  OfO  k _r^!!6I:]!��[�##M</"/<</"/K%/??/% %&0>0% ++��(-$264&"264&"%#"&'##"&547'#53!'2#^�+*-),'-/J7�Gd�UE!+%%+,^++9�dF++��%'''7''7'7'7777�--L�L--L�L�--L�L--L�LU@��7!!5#72####"&55UV��V+++2#�#3k+@@k@@#33#�U+��"&5473462"k�.<KjK@+��B� %��}++��"&*.BJ#76'&773#76''&7735##5##5##5#73#!"&55354632&462"9!)")W"("( *++*++*����@u$$� / ". !. ". ���������!d$$U+�� 3#3#5!5!2#!"&5463�****����k@kk������V+@��Q�462""'&'7'&#52#"'&""'&#"#"'&#"#"'&#"#5276323276323276323"'&#"#"'&#""'&#"#527632327623276323+,,�  E 5)4� 2                 0     0   u,, UE 5� `+�++k��!667&5462!!'?V��V?"���VZ aAAa
�*+��)-19%'3'"&463"332#54&#7#54&#526533#73#%7'#53k??6**!, <% 1$ ' 5 �vk�Օ�?[+:* '"R:$,,$3 �@@@����@+k��,0482#54&##"&463"37#54&#52654&#523#73#%!!V+ !**]% 1$*' 5 �v@��&&#+:* 5:#00$2  *�@@@@@++��&'672663&'&&J* *CC��Dp!!pD_LL_3""_CCgB33BT��+�N#'"/##"/##"57###"''##"5'75&5!7&76'&'"'&743� /
�#" 0/  $ )> p�Qb�BDf'<8R� " %Z ` ` | R� ` � *�Copyright 2015 Google, Inc. All Rights Reserved.Material IconsRegularFontForge 2.0 : Material Icons : 6-9-2016Version 1.015MaterialIcons-Regular��2�� '(
4latn��size�
,latn��ligao�:`j
jt�"V,�.d0\2�4~<�@�D"D�O O�T�c�h�iHm6o.o\  !! }T�� X���.\���0X~���6Z~��� @`�����0Lh�����"<Vn������(>Tj�������  " 4 F X h x � � � � � � � � � �� ! #" "!� !  "� !  � !  � !  %!� !  %!� ! ! �$  $ "!  $!� !# ! !"  ! !"6 ! !!� !#�  "! !  �  $�$ $  � ! ! ! !"   !� !& $�  ! !�$  $� �!! "! �! "!!�  !! ! ! �$ $$�$   "! �  " #� $  "�  ! ! � $ $  !&�    ! !� $ "$ !! &o  !g  ! "" "!�  1   ! !!  "! %�  !V  !� $ !�
"!�
$ �
 �
 Z
!!!
!�
$ !
 !+  !�  �  !!    k ! ! "!$� .# !  � %�#`&� "!� "!�" !
-"� {!��7p���8\����"Bb�����(B\v�����,F`z����� "8Nbv���������!!&  "�"!! !�"!! v $!�"!!  �! " '! "!�! "!�"  !# #!�! �"!! "�!!& "$ �! $  !!� " "� !!& !  � !
    � ! � ! � ! � ! � ! � ! � " !�  �   !  !&� !!& "  !  "!� "   !� !!& !"
 !
 
" !4
" ! � "!!�  7�" "  �" "�" "�Z��@j��� 2Vz����:Xv���� (D`|���� :Tn�����2Jbz�����.BVj~������&8J\l|����������    & 0�! ! "!� % "! �  "!)! �   "!�! " "!�! " !�! ""  g! $ �! " $� #$ &�! "�     !&� $ � &i ! !�  � w ! !^" $/  !� !&� !! �  !�  �  !!�  #� ! !� # !� !!  !�  !\ " � # !� !! !  a " "� !! &� !! "!�  �  � ! "` " ""�  "% ! /  !!�   �  !#� ! ]
" �
 �
 !�
 �
  �
 !� &!�  %_ " �  �  �  �   �'�
�  �  � |!&� j"!�!! ��!�!��� �["�# � $�h !�!��3h���$Hj����.Nn����"@^z�����&<Rh~������ .<JT^f� !  !" � !  !" !?! ! !>! $&=! "$&� !  !" � $  >! !<! &<! !@! $9! m# l ! $$ ~!" ;! �# "$�# :! " � !  !"n! "�! "!�! #� # !�  "!� ! $(  !� "! � "! M  k  ! 8
! �
 �
# "�
! �
! " �   "� # !&  + �# �! ��'�! �'!n*�#) @p����<\z����4Lbx������ $0� ! ! !� &!�% " " �% " " �#! #�% " " �! !!"! �% " " �% "  �% "  p ! !)  "!� % " '- %! ! � % � " &� %  �
#! !u
# !!�
#! !�
#! " &/ %! 0 "'1%!�% ".%�!,#!(��!\��*\��� 6`���&Lr���(Ln���� *Hf�����.Jf�����8Rj������*@Vl�������  & 8 J \ n � � � � � � � �

.
<
J
V
b
l
v8! !%!!  ! 7! !%!!  ! W!  ! " !.! !  -! !  1!  ! "!6! !!"2!  ! "%!  " !&0!  $!  !�! ! " l " +!   !m ! '!  !x!" &  !�! !! !,!  !%!&!  !9! "*!  9! "2#! "!2#! �"  %!�!   $�! !�! !y!" #�! #!�  !� � ! " b  $� ! $/ ! !f  � !  7  ! !N !  3 ! !6  ! ) ! � ! 4 ! "!5  4   2  ! $� ! � !  !� !5 ! 'e  � ! ( ! 3  ! $c  "b
$ a
$ �
! �
  "!�
" �
 ! �   c $ u  i  $: "! h  #�!
�! �! �! 3�! �! �! �  1#!� !�! �! �$d�!A!��"��0,H`x������ 0@LXdp|��  ! %�  " � ! !�
 :
" $� " �  %� �!� 8! � !"o� 9�#4 ��"!�2Tt�����(<N^n~���������<! #?" !&@" "< ! 6  "!&�  "!�  ! q  ! �
 !O !� $= !&�! !"p !5�� � A!! B!�!!>;^,\����4Tt�����0<HT^�!!  %�  ! != ! # �#!  �!! # ? ! #!!E#!  �! !! > ! !< ! !E #!  � ! %!C  "!A  ! !;  ! !@  ! D"!�%�B�  Fn���&Fd���u& $ !t& $ !s& $ $w&  v& $ "x&  �& !z& !"|& #y & { & !r&�!Q��(Nr���$Fh����$B`~����
&B^z�����0H`x�����4J`v������,@Rdv�������� $.8BLK # !R "& #O & !�! \  ! N  !!�!  �!" "!~! b!  !&G !!!] ! ^  !"!] ! � !!G !#!&` P  !�! $$ X &J  $ W  0  S  &> & " = &  � ! !&E  !G  "!M   !M  "!^  D & � $ !&U  # P  � ! Z  ''L  < & �  #Q  !V  Y  �  $!� ! T
 I
 
! a
 !%[
 &�
 !&H  F  !�  ! �  !$L  �  �  � # _  � � H"� � �# !#� N&!&� I"}!C& �"� F�J !K7� +X����4Vx����*D^v������$8L^p����������
�  O" %~  # � ! �  "!=& &  �"!! ">& & " S!'! �"! !�# !<& & � # ! %�  "!C  !2 # !d & !n "  #�
!&B
 !&�
 '�
"�
"  !L & �  #!D  !�  9 � �%'�'� : �&�" ;#���"�c8� :h���
.Pp����8Tn������",,!! !!�!! !#�!! " }!  ! !�!! �!! �!! #! �!$ @! ! !�  &!� !! � !$  #! %! $ $ !" ? $   � !$ $� !$  $ $! e
#!� %! $P! q � !"z!2Pl����Q  $ � #� "! �  !�  R   $S  $!�!&W��Br���&Nv���8^����8Z|��� @^|����0Nl�����0Lf�����2H^t�������  " 4 D T d t � � � � � � � � � � �
*! ' ! !"+! ' ! ,! ' ! � "!! Y # !�!"  !" !W !! C"   "!F&  "!B"     $  '!`$ !! $E&  � ! "!p& !  ^!"  !"X ! !!r    #!�! $    &E&  Y # W !!   &V  �  � $� !"�  #� � "!�  "!]  $\   � � ! ! !"  �! $� !& Z  !!&� &  $�  �  j & ! & ! &�   !�  " �   �  �   ! G & ! 3 ! ! ! "� $ "!D
& $[
 �
  b
  �
!& �  !� f !!�" � !T#$U&!E" !!_&�"�� a!A" 
!�$g�� ���! <d�����" !! �" !! q"" & %!c" !  $b "& "I "" " H"".^���8^����&Db~����0F\r�������&4BP^lz����� "!! "�#  "!!!   $�#  !� "!! � !  ! r#  ""� # #� "!! i !"! "� "!! �" #  &f! � # K ! ! �  !  !! !�  # !! !h ! #$�  #"t
 !"!�
! M
! � & e & d & � # "f& � �g !d!� �$L!�!�#�"!eN&�&Jh�{�P���P���>l���$R~��.Z���,T|���<`����8Z|����  > \ z � � � �
(
D
`
|
�  $ @ Z t � � � � �   2 H ^ t � � � � � �
 2 F Z n � � � � � � � �
*:HVdr~������������
+ " !  !!  �!! #&  ! !! & ! &t!! "!  !s!! "! !�!! #& ! �"!& $ !�"!& $ !m!! "  !�"#  "  �!& &  �!& "!  r!! "! ! $     "  �$ '! �!!  ! v!! "! #l!! ! �!& "! !!  "  �!& & !!     " "k!  !&  !!  !!�$ #!   " p!! ! u!! "! �!! ! n!! "!!�"#  "! $  �!  q!! !!�!! "!w!! # � ! s$ ! #�& ! "! !p!!  &�$ #! �& ! "! !#G!!"  !!~  ! $ z!! !�  !U"" "y!! $x!! {!! #� & ! "!�  � &  �  ! �  "_ ! & �    $! 5 "!!   !Q  #" o !! o " ! � &  ! "! $! #�  X !! ! ! �
$  �
 �
!�
$ '�
! 
 !v
!!#$
!!�
�
$ !Q
! !%!�
   $� $ #!P  %!F  T "!!  ! j !!� } !$i"k!! �# !�"!&� !�"!��O"jR'�w"$&��!�! Y!&�S!�!!�&�#|� 6n���(Nt����2Nj����� 8Pf|������,>Pbr���������� (z  $!  !!�%! !! $�%! !! "�%! !! #!�%! !! $�%! !! � ! !%!� "!�" " $�%! !! "�! � " !�  ! #�  $�  !� "  !�   �   &R %!  �  �  "U  !� %! !�
! �
" $       !  �  !� " � " �!  ��" " !& %!"�%!  lm�!�&T!x��& y""���#&>R`j�  �   � #�!� %Lx���.Lh����� 8Ph������2FZn������I!  !H!  !!J!  !V !#$ !�  !� !& � $ V  &� $ " �  " $ $ !X  � $ !� $ "|  � $ "� $ Y " $Z " "!�
 !&�
$ &{
 �
 !#
$ &�
$ "![
" � !� $ $� $  !� \ " "-!!�$ &W� � &0Tt����*>Rfx����������!  '  !�! ! !!.   !� ! !#� ! !t   ! K  !%!  &  "&�! !( "&! % "!�*�!��]��"!"  "4s  "! � "!� $ &'

22
Assets/UIWidgets/Resources/MaterialIcons-Regular.ttf.meta


fileFormatVersion: 2
guid: c81e9379793cd4a3cbbc59d8be1ed447
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontName: Material Icons
fontNames:
- Material Icons
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

79
Assets/UIWidgets/Tests/ScrollViews.cs


using System;
using System.Linq;
using UIWidgets.editor;
using UIWidgets.painting;
using UIWidgets.widgets;
using UnityEditor;
using UnityEngine;
using Color = UIWidgets.ui.Color;
namespace UIWidgets.Tests {
public class ScrollViews : EditorWindow {
private readonly Func<Widget>[] _options;
private readonly string[] _optionStrings;
private int _selected;
ScrollViews() {
this._options = new Func<Widget>[] {
this.none,
this.listView,
};
this._optionStrings = this._options.Select(x => x.Method.Name).ToArray();
this._selected = 0;
this.titleContent = new GUIContent("ScrollViews");
}
private WindowAdapter windowAdapter;
[NonSerialized] private bool hasInvoked = false;
void OnGUI() {
var selected = EditorGUILayout.Popup("test case", this._selected, this._optionStrings);
if (selected != this._selected || !this.hasInvoked) {
this._selected = selected;
this.hasInvoked = true;
var widget = this._options[this._selected]();
if (this.windowAdapter != null) {
this.windowAdapter.attachRootWidget(widget);
}
}
if (this.windowAdapter != null) {
this.windowAdapter.OnGUI();
}
}
void Update() {
if (this.windowAdapter != null) {
this.windowAdapter.Update();
}
}
private void OnEnable() {
this.windowAdapter = new WindowAdapter(this);
}
void OnDestroy() {
this.windowAdapter = null;
}
Widget none() {
return null;
}
Widget listView() {
return ListView.builder(
itemExtent: 20.0,
itemBuilder: (context, index) => {
return new Container(
color: Color.fromARGB(255, (index * 10) % 256, (index * 10) % 256, (index * 10) % 256)
);
}
);
}
}
}

3
Assets/UIWidgets/Tests/ScrollViews.cs.meta


fileFormatVersion: 2
guid: b14d32b9a23040969ca3316c86d899c3
timeCreated: 1537352615

48
Assets/UIWidgets/painting/clip.cs


using System;
using UIWidgets.foundation;
using UIWidgets.ui;
namespace UIWidgets.painting {
public abstract class ClipContext {
public abstract Canvas canvas { get; }
void _clipAndPaint(Action<bool> canvasClipCall, Clip clipBehavior, Rect bounds, Action painter) {
D.assert(canvasClipCall != null);
this.canvas.save();
switch (clipBehavior) {
case Clip.none:
break;
case Clip.hardEdge:
canvasClipCall(false);
break;
case Clip.antiAlias:
canvasClipCall(true);
break;
case Clip.antiAliasWithSaveLayer:
canvasClipCall(true);
this.canvas.saveLayer(bounds, new Paint());
break;
}
painter();
if (clipBehavior == Clip.antiAliasWithSaveLayer) {
this.canvas.restore();
}
this.canvas.restore();
}
public void clipRRectAndPaint(RRect rrect, Clip clipBehavior, Rect bounds, Action painter) {
this._clipAndPaint(doAntiAias => this.canvas.clipRRect(rrect, doAntiAlias: doAntiAias),
clipBehavior, bounds, painter);
}
public void clipRectAndPaint(Rect rect, Clip clipBehavior, Rect bounds, Action painter) {
this._clipAndPaint(doAntiAias => this.canvas.clipRect(rect, doAntiAlias: doAntiAias),
clipBehavior, bounds, painter);
}
}
}

3
Assets/UIWidgets/painting/clip.cs.meta


fileFormatVersion: 2
guid: cff14a26e8ec47a594a157246716b378
timeCreated: 1537611888

1001
Assets/UIWidgets/rendering/viewport.cs
文件差异内容过多而无法显示
查看文件

59
Assets/UIWidgets/widgets/icon.cs


using UIWidgets.foundation;
using UIWidgets.painting;
using UIWidgets.ui;
using TextStyle = UIWidgets.painting.TextStyle;
namespace UIWidgets.widgets {
public class Icon : StatelessWidget {
public Icon(IconData icon,
Key key = null,
double? size = null,
Color color = null
) : base(key: key) {
this.icon = icon;
this.size = size;
this.color = color;
}
public readonly IconData icon;
public readonly double? size;
public readonly Color color;
public override Widget build(BuildContext context) {
IconThemeData iconTheme = IconTheme.of(context);
double iconSize = this.size ?? iconTheme.size.Value;
if (this.icon == null) {
return new SizedBox(width: iconSize, height: iconSize);
}
double iconOpacity = iconTheme.opacity.Value;
Color iconColor = this.color ?? iconTheme.color;
if (iconOpacity != 1.0) {
iconColor = iconColor.withOpacity(iconColor.opacity * iconOpacity);
}
Widget iconWidget = new RichText(
text: new TextSpan(
text: new string(new[] {(char) this.icon.codePoint}),
style: new TextStyle(
inherit: false,
color: iconColor,
fontSize: iconSize,
fontFamily: this.icon.fontFamily
)
)
);
return new SizedBox(
width: iconSize,
height: iconSize,
child: new Center(
child: iconWidget
)
);
}
}
}

3
Assets/UIWidgets/widgets/icon.cs.meta


fileFormatVersion: 2
guid: f6c61ada56e449c88094d64bf02d7db1
timeCreated: 1537798292

49
Assets/UIWidgets/widgets/icon_data.cs


using System;
namespace UIWidgets.widgets {
public class IconData : IEquatable<IconData> {
public IconData(
int codePoint,
string fontFamily = null
) {
this.codePoint = codePoint;
this.fontFamily = fontFamily;
}
public readonly int codePoint;
public readonly string fontFamily;
public bool Equals(IconData other) {
if (object.ReferenceEquals(null, other)) return false;
if (object.ReferenceEquals(this, other)) return true;
return this.codePoint == other.codePoint &&
string.Equals(this.fontFamily, other.fontFamily);
}
public override bool Equals(object obj) {
if (object.ReferenceEquals(null, obj)) return false;
if (object.ReferenceEquals(this, obj)) return true;
if (obj.GetType() != this.GetType()) return false;
return this.Equals((IconData) obj);
}
public override int GetHashCode() {
unchecked {
return (this.codePoint * 397) ^ (this.fontFamily != null ? this.fontFamily.GetHashCode() : 0);
}
}
public static bool operator ==(IconData left, IconData right) {
return object.Equals(left, right);
}
public static bool operator !=(IconData left, IconData right) {
return !object.Equals(left, right);
}
public override string ToString() {
return "IconData(U+" + this.codePoint.ToString("X5") + ")";
}
}
}

3
Assets/UIWidgets/widgets/icon_data.cs.meta


fileFormatVersion: 2
guid: 5e6f43485f6c41fe85cec0203b05256d
timeCreated: 1537798330

55
Assets/UIWidgets/widgets/icon_theme.cs


using UIWidgets.foundation;
namespace UIWidgets.widgets {
public class IconTheme : InheritedWidget {
public IconTheme(
Key key = null,
IconThemeData data = null,
Widget child = null
) : base(key: key, child: child) {
D.assert(data != null);
D.assert(child != null);
this.data = data;
}
public static Widget merge(
Key key = null,
IconThemeData data = null,
Widget child = null
) {
return new Builder(
builder: context => new IconTheme(
key: key,
data: _getInheritedIconThemeData(context).merge(data),
child: child
)
);
}
public readonly IconThemeData data;
public static IconThemeData of(BuildContext context) {
IconThemeData iconThemeData = _getInheritedIconThemeData(context);
return iconThemeData.isConcrete ? iconThemeData : IconThemeData.fallback().merge(iconThemeData);
}
static IconThemeData _getInheritedIconThemeData(BuildContext context) {
IconTheme iconTheme = (IconTheme) context.inheritFromWidgetOfExactType(typeof(IconTheme));
if (iconTheme != null) {
return iconTheme.data;
}
return IconThemeData.fallback();
}
public override bool updateShouldNotify(InheritedWidget oldWidget) {
return this.data != ((IconTheme) oldWidget).data;
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DiagnosticsProperty<IconThemeData>("data", this.data, showName: false));
}
}
}

3
Assets/UIWidgets/widgets/icon_theme.cs.meta


fileFormatVersion: 2
guid: 5edaf3b47c3d456e8925cd693970efa7
timeCreated: 1537798321

103
Assets/UIWidgets/widgets/icon_theme_data.cs


using System;
using UIWidgets.foundation;
using UIWidgets.ui;
namespace UIWidgets.widgets {
public class IconThemeData : Diagnosticable, IEquatable<IconThemeData> {
public IconThemeData(
Color color = null,
double? opacity = null,
double? size = null) {
this.color = color;
this._opacity = opacity;
this.size = size;
}
public static IconThemeData fallback() {
return new IconThemeData(
color: new Color(0xFF000000),
opacity: 1.0,
size: 24.0);
}
public IconThemeData copyWith(
Color color = null,
double? opacity = null,
double? size = null) {
return new IconThemeData(
color: color ?? this.color,
opacity: opacity ?? this.opacity,
size: size ?? this.size
);
}
public IconThemeData merge(IconThemeData other) {
if (other == null) {
return this;
}
return this.copyWith(
color: other.color,
opacity: other.opacity,
size: other.size
);
}
public bool isConcrete {
get { return this.color != null && this.opacity != null && this.size != null; }
}
public readonly Color color;
public double? opacity {
get { return this._opacity == null ? (double?) null : this._opacity.Value.clamp(0.0, 1.0); }
}
readonly double? _opacity;
public readonly double? size;
public bool Equals(IconThemeData other) {
if (object.ReferenceEquals(null, other)) return false;
if (object.ReferenceEquals(this, other)) return true;
return object.Equals(this.color, other.color) &&
this._opacity.Equals(other._opacity) &&
this.size.Equals(other.size);
}
public override bool Equals(object obj) {
if (object.ReferenceEquals(null, obj)) return false;
if (object.ReferenceEquals(this, obj)) return true;
if (obj.GetType() != this.GetType()) return false;
return this.Equals((IconThemeData) obj);
}
public override int GetHashCode() {
unchecked {
var hashCode = (this.color != null ? this.color.GetHashCode() : 0);
hashCode = (hashCode * 397) ^ this._opacity.GetHashCode();
hashCode = (hashCode * 397) ^ this.size.GetHashCode();
return hashCode;
}
}
public static bool operator ==(IconThemeData left, IconThemeData right) {
return object.Equals(left, right);
}
public static bool operator !=(IconThemeData left, IconThemeData right) {
return !object.Equals(left, right);
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DiagnosticsProperty<Color>("color", this.color,
defaultValue: Diagnostics.kNullDefaultValue));
properties.add(new DoubleProperty("opacity", this.opacity,
defaultValue: Diagnostics.kNullDefaultValue));
properties.add(new DoubleProperty("size", this.size,
defaultValue: Diagnostics.kNullDefaultValue));
}
}
}

3
Assets/UIWidgets/widgets/icon_theme_data.cs.meta


fileFormatVersion: 2
guid: e6aa2a13598f4143ac2645109a284811
timeCreated: 1537798313

853
Assets/UIWidgets/rendering/viewpoint.cs


using System;
using System.Collections.Generic;
using UIWidgets.painting;
using UIWidgets.ui;
using UnityEngine;
using Rect = UIWidgets.ui.Rect;
namespace UIWidgets.rendering {
public interface RenderAbstractViewport {
RevealedOffset getOffsetToReveal(RenderObject target, double alignment, Rect rect = null);
}
public static class RenderAbstractViewportUtils {
public static RenderAbstractViewport of(RenderObject obj) {
while (obj != null) {
if (obj is RenderAbstractViewport) {
return (RenderAbstractViewport) obj;
}
obj = (RenderObject) obj.parent;
}
return null;
}
public const double defaultCacheExtent = 250.0;
}
public class RevealedOffset {
public RevealedOffset(double offset, Rect rect) {
this.offset = offset;
this.rect = rect;
}
public readonly double offset;
public readonly Rect rect;
}
public abstract class RenderViewportBase<ParentDataClass> :
ContainerRenderObjectMixinRenderBox<RenderSliver, ParentDataClass>,
RenderAbstractViewport
where ParentDataClass : ParentData, ContainerParentDataMixin<RenderSliver> {
protected RenderViewportBase(
AxisDirection axisDirection = AxisDirection.down,
AxisDirection crossAxisDirection = AxisDirection.right,
ViewportOffset offset = null,
double? cacheExtent = null
) {
this._axisDirection = axisDirection;
this._crossAxisDirection = crossAxisDirection;
this._offset = offset;
this._cacheExtent = cacheExtent ?? RenderAbstractViewportUtils.defaultCacheExtent;
}
public AxisDirection axisDirection {
get { return this._axisDirection; }
set {
if (value == this._axisDirection) {
return;
}
this._axisDirection = value;
this.markNeedsLayout();
}
}
public AxisDirection _axisDirection;
public AxisDirection crossAxisDirection {
get { return this._crossAxisDirection; }
set {
if (value == this._crossAxisDirection) {
return;
}
this._crossAxisDirection = value;
this.markNeedsLayout();
}
}
public AxisDirection _crossAxisDirection;
public Axis axis {
get { return AxisUtils.axisDirectionToAxis(this.axisDirection); }
}
public ViewportOffset offset {
get { return this._offset; }
set {
if (object.Equals(value, this._offset)) {
return;
}
if (this.attached) {
this._offset.removeListener(this.markNeedsLayout);
}
this._offset = value;
if (this.attached) {
this._offset.addListener(this.markNeedsLayout);
}
this.markNeedsLayout();
}
}
public ViewportOffset _offset;
public double cacheExtent {
get { return this._cacheExtent; }
set {
if (value == this._cacheExtent) {
return;
}
this._cacheExtent = value;
this.markNeedsLayout();
}
}
public double _cacheExtent;
public override void attach(object owner) {
base.attach(owner);
this._offset.addListener(this.markNeedsLayout);
}
public override void detach() {
this._offset.removeListener(this.markNeedsLayout);
base.detach();
}
public override double computeMinIntrinsicWidth(double height) {
return 0.0;
}
public override double computeMaxIntrinsicWidth(double height) {
return 0.0;
}
public override double computeMinIntrinsicHeight(double width) {
return 0.0;
}
public override double computeMaxIntrinsicHeight(double width) {
return 0.0;
}
public override bool isRepaintBoundary {
get { return true; }
}
public double layoutChildSequence(
RenderSliver child,
double scrollOffset,
double overlap,
double layoutOffset,
double remainingPaintExtent,
double mainAxisExtent,
double crossAxisExtent,
GrowthDirection growthDirection,
Func<RenderSliver, RenderSliver> advance,
double remainingCacheExtent,
double cacheOrigin
) {
double initialLayoutOffset = layoutOffset;
ScrollDirection adjustedUserScrollDirection =
GrowthDirectionUtils.applyGrowthDirectionToScrollDirection(
this.offset.userScrollDirection, growthDirection);
double maxPaintOffset = layoutOffset + overlap;
while (child != null) {
double sliverScrollOffset = scrollOffset <= 0.0 ? 0.0 : scrollOffset;
double correctedCacheOrigin = Math.Max(cacheOrigin, -sliverScrollOffset);
double cacheExtentCorrection = cacheOrigin - correctedCacheOrigin;
child.layout(new SliverConstraints(
axisDirection: this.axisDirection,
growthDirection: growthDirection,
userScrollDirection: adjustedUserScrollDirection,
scrollOffset: sliverScrollOffset,
overlap: maxPaintOffset - layoutOffset,
remainingPaintExtent: Math.Max(0.0, remainingPaintExtent - layoutOffset + initialLayoutOffset),
crossAxisExtent: crossAxisExtent,
crossAxisDirection: this.crossAxisDirection,
viewportMainAxisExtent: mainAxisExtent,
remainingCacheExtent: Math.Max(0.0, remainingCacheExtent + cacheExtentCorrection),
cacheOrigin: correctedCacheOrigin
), parentUsesSize: true);
var childLayoutGeometry = child.geometry;
if (childLayoutGeometry.scrollOffsetCorrection != 0.0) {
return childLayoutGeometry.scrollOffsetCorrection;
}
double effectiveLayoutOffset = layoutOffset + childLayoutGeometry.paintOrigin;
if (childLayoutGeometry.visible || scrollOffset > 0) {
this.updateChildLayoutOffset(child, effectiveLayoutOffset, growthDirection);
} else {
this.updateChildLayoutOffset(child, -scrollOffset + initialLayoutOffset, growthDirection);
}
maxPaintOffset = Math.Max(effectiveLayoutOffset + childLayoutGeometry.paintExtent, maxPaintOffset);
scrollOffset -= childLayoutGeometry.scrollExtent;
layoutOffset += childLayoutGeometry.layoutExtent;
if (childLayoutGeometry.cacheExtent != 0.0) {
remainingCacheExtent -= childLayoutGeometry.cacheExtent - cacheExtentCorrection;
cacheOrigin = Math.Min(correctedCacheOrigin + childLayoutGeometry.cacheExtent, 0.0);
}
this.updateOutOfBandData(growthDirection, childLayoutGeometry);
child = advance(child);
}
return 0.0;
}
public override void paint(PaintingContext context, Offset offset) {
if (this.firstChild == null) {
return;
}
if (this.hasVisualOverflow) {
context.pushClipRect(this.needsCompositing, offset, Offset.zero & this.size, this._paintContents);
} else {
this._paintContents(context, offset);
}
}
public void _paintContents(PaintingContext context, Offset offset) {
foreach (RenderSliver child in this.childrenInPaintOrder) {
if (child.geometry.visible) {
context.paintChild(child, offset + this.paintOffsetOf(child));
}
}
}
public RevealedOffset getOffsetToReveal(RenderObject target, double alignment, Rect rect = null) {
double leadingScrollOffset = 0.0;
double targetMainAxisExtent = 0.0;
RenderObject descendant;
rect = rect ?? target.paintBounds;
Matrix4x4 transform;
if (target is RenderBox) {
RenderBox targetBox = (RenderBox) target;
RenderBox pivot = targetBox;
while (pivot.parent is RenderBox) {
pivot = (RenderBox) pivot.parent;
}
RenderSliver pivotParent = (RenderSliver) pivot.parent;
transform = targetBox.getTransformTo(pivot);
Rect bounds = MatrixUtils.transformRect(transform, rect);
double offset = 0.0;
GrowthDirection growthDirection = pivotParent.constraints.growthDirection;
switch (GrowthDirectionUtils.applyGrowthDirectionToAxisDirection(this.axisDirection, growthDirection)) {
case AxisDirection.up:
switch (growthDirection) {
case GrowthDirection.forward:
offset = bounds.bottom;
break;
case GrowthDirection.reverse:
offset = bounds.top;
break;
}
leadingScrollOffset = pivot.size.height - offset;
targetMainAxisExtent = bounds.height;
break;
case AxisDirection.right:
leadingScrollOffset = bounds.left;
targetMainAxisExtent = bounds.width;
break;
case AxisDirection.down:
leadingScrollOffset = bounds.top;
targetMainAxisExtent = bounds.height;
break;
case AxisDirection.left:
switch (growthDirection) {
case GrowthDirection.forward:
offset = bounds.right;
break;
case GrowthDirection.reverse:
offset = bounds.left;
break;
}
leadingScrollOffset = pivot.size.width - offset;
targetMainAxisExtent = bounds.width;
break;
}
descendant = pivot;
} else if (target is RenderSliver) {
RenderSliver targetSliver = (RenderSliver) target;
leadingScrollOffset = 0.0;
targetMainAxisExtent = targetSliver.geometry.scrollExtent;
descendant = targetSliver;
} else {
return new RevealedOffset(offset: this.offset.pixels, rect: rect);
}
RenderObject child = descendant;
while (child.parent is RenderSliver) {
var parent = (RenderSliver) child.parent;
leadingScrollOffset += parent.childScrollOffset(child);
child = parent;
}
RenderSliver sliver = (RenderSliver) child;
double extentOfPinnedSlivers = this.maxScrollObstructionExtentBefore(sliver);
leadingScrollOffset = this.scrollOffsetOf(sliver, leadingScrollOffset);
switch (sliver.constraints.growthDirection) {
case GrowthDirection.forward:
leadingScrollOffset -= extentOfPinnedSlivers;
break;
case GrowthDirection.reverse:
break;
}
double mainAxisExtent = 0.0;
switch (this.axis) {
case Axis.horizontal:
mainAxisExtent = this.size.width - extentOfPinnedSlivers;
break;
case Axis.vertical:
mainAxisExtent = this.size.height - extentOfPinnedSlivers;
break;
}
double targetOffset = leadingScrollOffset - (mainAxisExtent - targetMainAxisExtent) * alignment;
double offsetDifference = this.offset.pixels - targetOffset;
transform = target.getTransformTo(this);
this.applyPaintTransform(child, ref transform);
Rect targetRect = MatrixUtils.transformRect(transform, rect);
switch (this.axisDirection) {
case AxisDirection.down:
targetRect = targetRect.translate(0.0, offsetDifference);
break;
case AxisDirection.right:
targetRect = targetRect.translate(offsetDifference, 0.0);
break;
case AxisDirection.up:
targetRect = targetRect.translate(0.0, -offsetDifference);
break;
case AxisDirection.left:
targetRect = targetRect.translate(-offsetDifference, 0.0);
break;
}
return new RevealedOffset(offset: targetOffset, rect: targetRect);
}
public Offset computeAbsolutePaintOffset(RenderSliver child, double layoutOffset,
GrowthDirection growthDirection) {
switch (GrowthDirectionUtils.applyGrowthDirectionToAxisDirection(this.axisDirection, growthDirection)) {
case AxisDirection.up:
return new Offset(0.0, this.size.height - (layoutOffset + child.geometry.paintExtent));
case AxisDirection.right:
return new Offset(layoutOffset, 0.0);
case AxisDirection.down:
return new Offset(0.0, layoutOffset);
case AxisDirection.left:
return new Offset(this.size.width - (layoutOffset + child.geometry.paintExtent), 0.0);
}
return null;
}
public abstract bool hasVisualOverflow { get; }
public abstract void updateOutOfBandData(GrowthDirection growthDirection, SliverGeometry childLayoutGeometry);
public abstract void updateChildLayoutOffset(RenderSliver child, double layoutOffset,
GrowthDirection growthDirection);
public abstract Offset paintOffsetOf(RenderSliver child);
public abstract double scrollOffsetOf(RenderSliver child, double scrollOffsetWithinChild);
public abstract double maxScrollObstructionExtentBefore(RenderSliver child);
public abstract IEnumerable<RenderSliver> childrenInPaintOrder { get; }
}
public class RenderViewport : RenderViewportBase<SliverPhysicalContainerParentData> {
public RenderViewport(
AxisDirection axisDirection = AxisDirection.down,
AxisDirection crossAxisDirection = AxisDirection.right,
ViewportOffset offset = null,
double anchor = 0.0,
List<RenderSliver> children = null,
RenderSliver center = null,
double? cacheExtent = null
) : base(axisDirection, crossAxisDirection, offset, cacheExtent) {
this.addAll(children);
if (center == null && this.firstChild != null) {
this._center = this.firstChild;
}
}
public override void setupParentData(RenderObject child) {
if (!(child.parentData is SliverPhysicalContainerParentData)) {
child.parentData = new SliverPhysicalContainerParentData();
}
}
public double anchor {
get { return this._anchor; }
set {
if (value != this._anchor) {
return;
}
this._anchor = value;
this.markNeedsLayout();
}
}
public double _anchor;
public RenderSliver center {
get { return this._center; }
set {
if (value == this._center) {
return;
}
this._center = value;
this.markNeedsLayout();
}
}
public RenderSliver _center;
public override bool sizedByParent {
get { return true; }
}
public override void performResize() {
this.size = this.constraints.biggest;
switch (this.axis) {
case Axis.vertical:
this.offset.applyViewportDimension(this.size.height);
break;
case Axis.horizontal:
this.offset.applyViewportDimension(this.size.width);
break;
}
}
public const int _maxLayoutCycles = 10;
public double _minScrollExtent;
public double _maxScrollExtent;
public bool _hasVisualOverflow = false;
public override void performLayout() {
if (this.center == null) {
this._minScrollExtent = 0.0;
this._maxScrollExtent = 0.0;
this._hasVisualOverflow = false;
this.offset.applyContentDimensions(0.0, 0.0);
return;
}
double mainAxisExtent = 0.0;
double crossAxisExtent = 0.0;
switch (this.axis) {
case Axis.vertical:
mainAxisExtent = this.size.height;
crossAxisExtent = this.size.width;
break;
case Axis.horizontal:
mainAxisExtent = this.size.width;
crossAxisExtent = this.size.height;
break;
}
double centerOffsetAdjustment = this.center.centerOffsetAdjustment;
int count = 0;
do {
var correction = this._attemptLayout(mainAxisExtent, crossAxisExtent,
this.offset.pixels + centerOffsetAdjustment);
if (correction != 0.0) {
this.offset.correctBy(correction);
} else {
if (this.offset.applyContentDimensions(
Math.Min(0.0, this._minScrollExtent + mainAxisExtent * this.anchor),
Math.Max(0.0, this._maxScrollExtent - mainAxisExtent * (1.0 - this.anchor))
))
break;
}
count += 1;
} while (count < RenderViewport._maxLayoutCycles);
}
public double _attemptLayout(double mainAxisExtent, double crossAxisExtent, double correctedOffset) {
this._minScrollExtent = 0.0;
this._maxScrollExtent = 0.0;
this._hasVisualOverflow = false;
double centerOffset = mainAxisExtent * this.anchor - correctedOffset;
double reverseDirectionRemainingPaintExtent = centerOffset.clamp(0.0, mainAxisExtent);
double forwardDirectionRemainingPaintExtent = (mainAxisExtent - centerOffset).clamp(0.0, mainAxisExtent);
double fullCacheExtent = mainAxisExtent + 2 * this.cacheExtent;
double centerCacheOffset = centerOffset + this.cacheExtent;
double reverseDirectionRemainingCacheExtent = centerCacheOffset.clamp(0.0, fullCacheExtent);
double forwardDirectionRemainingCacheExtent =
(fullCacheExtent - centerCacheOffset).clamp(0.0, fullCacheExtent);
RenderSliver leadingNegativeChild = this.childBefore(this.center);
if (leadingNegativeChild != null) {
double result = this.layoutChildSequence(
child: leadingNegativeChild,
scrollOffset: Math.Max(mainAxisExtent, centerOffset) - mainAxisExtent,
overlap: 0.0,
layoutOffset: forwardDirectionRemainingPaintExtent,
remainingPaintExtent: reverseDirectionRemainingPaintExtent,
mainAxisExtent: mainAxisExtent,
crossAxisExtent: crossAxisExtent,
growthDirection: GrowthDirection.reverse,
advance: this.childBefore,
remainingCacheExtent: reverseDirectionRemainingCacheExtent,
cacheOrigin: (mainAxisExtent - centerOffset).clamp(-this.cacheExtent, 0.0)
);
if (result != 0.0) {
return -result;
}
}
return this.layoutChildSequence(
child: this.center,
scrollOffset: Math.Max(0.0, -centerOffset),
overlap: leadingNegativeChild == null ? Math.Min(0.0, -centerOffset) : 0.0,
layoutOffset: centerOffset >= mainAxisExtent ? centerOffset : reverseDirectionRemainingPaintExtent,
remainingPaintExtent: forwardDirectionRemainingPaintExtent,
mainAxisExtent: mainAxisExtent,
crossAxisExtent: crossAxisExtent,
growthDirection: GrowthDirection.forward,
advance: this.childAfter,
remainingCacheExtent: forwardDirectionRemainingCacheExtent,
cacheOrigin: centerOffset.clamp(-this.cacheExtent, 0.0)
);
}
public override bool hasVisualOverflow {
get { return this._hasVisualOverflow; }
}
public override void updateOutOfBandData(GrowthDirection growthDirection, SliverGeometry childLayoutGeometry) {
switch (growthDirection) {
case GrowthDirection.forward:
this._maxScrollExtent += childLayoutGeometry.scrollExtent;
break;
case GrowthDirection.reverse:
this._minScrollExtent -= childLayoutGeometry.scrollExtent;
break;
}
if (childLayoutGeometry.hasVisualOverflow) {
this._hasVisualOverflow = true;
}
}
public override void updateChildLayoutOffset(RenderSliver child, double layoutOffset,
GrowthDirection growthDirection) {
var childParentData = (SliverPhysicalParentData) child.parentData;
childParentData.paintOffset = this.computeAbsolutePaintOffset(child, layoutOffset, growthDirection);
}
public override Offset paintOffsetOf(RenderSliver child) {
var childParentData = (SliverPhysicalParentData) child.parentData;
return childParentData.paintOffset;
}
public override double scrollOffsetOf(RenderSliver child, double scrollOffsetWithinChild) {
GrowthDirection growthDirection = child.constraints.growthDirection;
switch (growthDirection) {
case GrowthDirection.forward: {
double scrollOffsetToChild = 0.0;
RenderSliver current = this.center;
while (current != child) {
scrollOffsetToChild += current.geometry.scrollExtent;
current = this.childAfter(current);
}
return scrollOffsetToChild + scrollOffsetWithinChild;
}
case GrowthDirection.reverse: {
double scrollOffsetToChild = 0.0;
RenderSliver current = this.childBefore(this.center);
while (current != child) {
scrollOffsetToChild -= current.geometry.scrollExtent;
current = this.childBefore(current);
}
return scrollOffsetToChild - scrollOffsetWithinChild;
}
}
return 0.0;
}
public override double maxScrollObstructionExtentBefore(RenderSliver child) {
GrowthDirection growthDirection = child.constraints.growthDirection;
switch (growthDirection) {
case GrowthDirection.forward: {
double pinnedExtent = 0.0;
RenderSliver current = this.center;
while (current != child) {
pinnedExtent += current.geometry.maxScrollObstructionExtent;
current = this.childAfter(current);
}
return pinnedExtent;
}
case GrowthDirection.reverse: {
double pinnedExtent = 0.0;
RenderSliver current = this.childBefore(this.center);
while (current != child) {
pinnedExtent += current.geometry.maxScrollObstructionExtent;
current = this.childBefore(current);
}
return pinnedExtent;
}
}
return 0.0;
}
public override void applyPaintTransform(RenderObject child, ref Matrix4x4 transform) {
var childParentData = (SliverPhysicalParentData) child.parentData;
childParentData.applyPaintTransform(ref transform);
}
public override IEnumerable<RenderSliver> childrenInPaintOrder {
get {
if (this.firstChild == null) {
yield break;
}
var child = this.firstChild;
while (child != this.center) {
yield return child;
child = this.childAfter(child);
}
child = this.lastChild;
while (true) {
yield return child;
if (child == this.center) {
yield break;
}
child = this.childBefore(child);
}
}
}
}
public class RenderShrinkWrappingViewport : RenderViewportBase<SliverLogicalContainerParentData> {
public RenderShrinkWrappingViewport(
AxisDirection axisDirection = AxisDirection.down,
AxisDirection crossAxisDirection = AxisDirection.right,
ViewportOffset offset = null,
List<RenderSliver> children = null
) : base(
axisDirection: axisDirection,
crossAxisDirection: crossAxisDirection,
offset: offset) {
this.addAll(children);
}
public override void setupParentData(RenderObject child) {
if (!(child.parentData is SliverLogicalContainerParentData)) {
child.parentData = new SliverLogicalContainerParentData();
}
}
public double _maxScrollExtent = 0.0;
public double _shrinkWrapExtent = 0.0;
public bool _hasVisualOverflow = false;
public override void performLayout() {
if (this.firstChild == null) {
switch (this.axis) {
case Axis.vertical:
this.size = new Size(this.constraints.maxWidth, this.constraints.minHeight);
break;
case Axis.horizontal:
this.size = new Size(this.constraints.minWidth, this.constraints.maxHeight);
break;
}
this.offset.applyViewportDimension(0.0);
this._maxScrollExtent = 0.0;
this._shrinkWrapExtent = 0.0;
this._hasVisualOverflow = false;
this.offset.applyContentDimensions(0.0, 0.0);
return;
}
double mainAxisExtent = 0.0;
double crossAxisExtent = 0.0;
switch (this.axis) {
case Axis.vertical:
mainAxisExtent = this.constraints.maxHeight;
crossAxisExtent = this.constraints.maxWidth;
break;
case Axis.horizontal:
mainAxisExtent = this.constraints.maxWidth;
crossAxisExtent = this.constraints.maxHeight;
break;
}
double effectiveExtent = 0.0;
do {
var correction = this._attemptLayout(mainAxisExtent, crossAxisExtent, this.offset.pixels);
if (correction != 0.0) {
this.offset.correctBy(correction);
} else {
switch (this.axis) {
case Axis.vertical:
effectiveExtent = this.constraints.constrainHeight(this._shrinkWrapExtent);
break;
case Axis.horizontal:
effectiveExtent = this.constraints.constrainWidth(this._shrinkWrapExtent);
break;
}
bool didAcceptViewportDimension = this.offset.applyViewportDimension(effectiveExtent);
bool didAcceptContentDimension =
this.offset.applyContentDimensions(0.0, Math.Max(0.0, this._maxScrollExtent - effectiveExtent));
if (didAcceptViewportDimension && didAcceptContentDimension) {
break;
}
}
} while (true);
switch (this.axis) {
case Axis.vertical:
this.size = this.constraints.constrainDimensions(crossAxisExtent, effectiveExtent);
break;
case Axis.horizontal:
this.size = this.constraints.constrainDimensions(effectiveExtent, crossAxisExtent);
break;
}
}
public double _attemptLayout(double mainAxisExtent, double crossAxisExtent, double correctedOffset) {
this._maxScrollExtent = 0.0;
this._shrinkWrapExtent = 0.0;
this._hasVisualOverflow = false;
return this.layoutChildSequence(
child: this.firstChild,
scrollOffset: Math.Max(0.0, correctedOffset),
overlap: Math.Min(0.0, correctedOffset),
layoutOffset: 0.0,
remainingPaintExtent: mainAxisExtent,
mainAxisExtent: mainAxisExtent,
crossAxisExtent: crossAxisExtent,
growthDirection: GrowthDirection.forward,
advance: this.childAfter,
remainingCacheExtent: mainAxisExtent + 2 * this.cacheExtent,
cacheOrigin: -this.cacheExtent
);
}
public override bool hasVisualOverflow {
get { return this._hasVisualOverflow; }
}
public override void updateOutOfBandData(GrowthDirection growthDirection, SliverGeometry childLayoutGeometry) {
this._maxScrollExtent += childLayoutGeometry.scrollExtent;
if (childLayoutGeometry.hasVisualOverflow) {
this._hasVisualOverflow = true;
}
this._shrinkWrapExtent += childLayoutGeometry.maxPaintExtent;
}
public override void updateChildLayoutOffset(RenderSliver child, double layoutOffset,
GrowthDirection growthDirection) {
var childParentData = (SliverLogicalParentData) child.parentData;
childParentData.layoutOffset = layoutOffset;
}
public override Offset paintOffsetOf(RenderSliver child) {
var childParentData = (SliverLogicalParentData) child.parentData;
return this.computeAbsolutePaintOffset(child, childParentData.layoutOffset, GrowthDirection.forward);
}
public override double scrollOffsetOf(RenderSliver child, double scrollOffsetWithinChild) {
double scrollOffsetToChild = 0.0;
RenderSliver current = this.firstChild;
while (current != child) {
scrollOffsetToChild += current.geometry.scrollExtent;
current = this.childAfter(current);
}
return scrollOffsetToChild + scrollOffsetWithinChild;
}
public override double maxScrollObstructionExtentBefore(RenderSliver child) {
double pinnedExtent = 0.0;
RenderSliver current = this.firstChild;
while (current != child) {
pinnedExtent += current.geometry.maxScrollObstructionExtent;
current = this.childAfter(current);
}
return pinnedExtent;
}
public override void applyPaintTransform(RenderObject child, ref Matrix4x4 transform) {
Offset offset = this.paintOffsetOf((RenderSliver) child);
transform = Matrix4x4.Translate(offset.toVector()) * transform;
}
public override IEnumerable<RenderSliver> childrenInPaintOrder {
get {
RenderSliver child = this.firstChild;
while (child != null) {
yield return child;
child = this.childAfter(child);
}
}
}
}
}

/Assets/UIWidgets/rendering/viewpoint.cs.meta → /Assets/UIWidgets/rendering/viewport.cs.meta

正在加载...
取消
保存