浏览代码

remove this

/siyaoH-1.17-PlatformMessage
siyao 4 年前
当前提交
0b27aed2
共有 50 个文件被更改,包括 1196 次插入1196 次删除
  1. 8
      com.unity.uiwidgets/Runtime/cupertino/action_sheet.cs
  2. 8
      com.unity.uiwidgets/Runtime/cupertino/dialog.cs
  3. 458
      com.unity.uiwidgets/Runtime/gestures/events.cs
  4. 26
      com.unity.uiwidgets/Runtime/gestures/hit_test.cs
  5. 22
      com.unity.uiwidgets/Runtime/gestures/long_press.cs
  6. 128
      com.unity.uiwidgets/Runtime/gestures/monodrag.cs
  7. 66
      com.unity.uiwidgets/Runtime/gestures/multitap.cs
  8. 20
      com.unity.uiwidgets/Runtime/gestures/pointer_router.cs
  9. 4
      com.unity.uiwidgets/Runtime/gestures/pointer_signal_resolver.cs
  10. 62
      com.unity.uiwidgets/Runtime/gestures/recognizer.cs
  11. 2
      com.unity.uiwidgets/Runtime/gestures/tap.cs
  12. 4
      com.unity.uiwidgets/Runtime/material/chip.cs
  13. 2
      com.unity.uiwidgets/Runtime/material/flexible_space_bar.cs
  14. 4
      com.unity.uiwidgets/Runtime/material/ink_decoration.cs
  15. 4
      com.unity.uiwidgets/Runtime/material/ink_highlight.cs
  16. 4
      com.unity.uiwidgets/Runtime/material/ink_ripple.cs
  17. 8
      com.unity.uiwidgets/Runtime/material/ink_splash.cs
  18. 64
      com.unity.uiwidgets/Runtime/material/input_decorator.cs
  19. 4
      com.unity.uiwidgets/Runtime/material/list_tile.cs
  20. 20
      com.unity.uiwidgets/Runtime/rendering/box.cs
  21. 2
      com.unity.uiwidgets/Runtime/rendering/box.mixin.gen.cs
  22. 2
      com.unity.uiwidgets/Runtime/rendering/custom_layout.cs
  23. 2
      com.unity.uiwidgets/Runtime/rendering/custom_paint.cs
  24. 2
      com.unity.uiwidgets/Runtime/rendering/flex.cs
  25. 96
      com.unity.uiwidgets/Runtime/rendering/layer.cs
  26. 2
      com.unity.uiwidgets/Runtime/rendering/list_body.cs
  27. 8
      com.unity.uiwidgets/Runtime/rendering/object.cs
  28. 138
      com.unity.uiwidgets/Runtime/rendering/proxy_box.cs
  29. 4
      com.unity.uiwidgets/Runtime/rendering/proxy_box.mixin.gen.cs
  30. 28
      com.unity.uiwidgets/Runtime/rendering/rotated_box.cs
  31. 12
      com.unity.uiwidgets/Runtime/rendering/shifted_box.cs
  32. 30
      com.unity.uiwidgets/Runtime/rendering/sliver.cs
  33. 2
      com.unity.uiwidgets/Runtime/rendering/sliver_multi_box_adaptor.cs
  34. 10
      com.unity.uiwidgets/Runtime/rendering/sliver_padding.cs
  35. 6
      com.unity.uiwidgets/Runtime/rendering/sliver_persistent_header.cs
  36. 4
      com.unity.uiwidgets/Runtime/rendering/stack.cs
  37. 24
      com.unity.uiwidgets/Runtime/rendering/table.cs
  38. 10
      com.unity.uiwidgets/Runtime/rendering/view.cs
  39. 10
      com.unity.uiwidgets/Runtime/rendering/viewport.cs
  40. 2
      com.unity.uiwidgets/Runtime/rendering/wrap.cs
  41. 890
      com.unity.uiwidgets/Runtime/ui/Matrix4.cs
  42. 4
      com.unity.uiwidgets/Runtime/ui2/painting.cs
  43. 8
      com.unity.uiwidgets/Runtime/ui2/text.cs
  44. 10
      com.unity.uiwidgets/Runtime/widgets/basic.cs
  45. 8
      com.unity.uiwidgets/Runtime/widgets/container.cs
  46. 18
      com.unity.uiwidgets/Runtime/widgets/implicit_animations.cs
  47. 2
      com.unity.uiwidgets/Runtime/widgets/layout_builder.cs
  48. 120
      com.unity.uiwidgets/Runtime/widgets/overlay.cs
  49. 16
      com.unity.uiwidgets/Runtime/widgets/single_child_scroll_view.cs
  50. 4
      com.unity.uiwidgets/Runtime/widgets/transitions.cs

8
com.unity.uiwidgets/Runtime/cupertino/action_sheet.cs


MultiChildLayoutParentData contentSectionParentData =
contentSection.parentData as MultiChildLayoutParentData;
MultiChildLayoutParentData actionsSectionParentData =
this.actionsSection.parentData as MultiChildLayoutParentData;
actionsSection.parentData as MultiChildLayoutParentData;
return this.contentSection.hitTest(resultIn, position: transformed);
return contentSection.hitTest(resultIn, position: transformed);
}
) || result.addWithPaintOffset(
offset: actionsSectionParentData.offset,

return this.actionsSection.hitTest(resultIn, position: transformed);
return actionsSection.hitTest(resultIn, position: transformed);
}
);
}

}
protected override bool hitTestChildren(BoxHitTestResult result, Offset position = null) {
return this.defaultHitTestChildren(result, position: position);
return defaultHitTestChildren(result, position: position);
}
}
}

8
com.unity.uiwidgets/Runtime/cupertino/dialog.cs


protected override bool hitTestChildren(BoxHitTestResult result, Offset position = null
) {
BoxParentData contentSectionParentData = this.contentSection.parentData as BoxParentData;
BoxParentData actionsSectionParentData = this.actionsSection.parentData as BoxParentData;
BoxParentData contentSectionParentData = contentSection.parentData as BoxParentData;
BoxParentData actionsSectionParentData = actionsSection.parentData as BoxParentData;
return this.contentSection.hitTest(resultIn, position: transformed);
return contentSection.hitTest(resultIn, position: transformed);
}
) || result.addWithPaintOffset(
offset: actionsSectionParentData.offset,

return this.actionsSection.hitTest(resultIn, position: transformed);
return actionsSection.hitTest(resultIn, position: transformed);
}
);
}

458
com.unity.uiwidgets/Runtime/gestures/events.cs


public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DiagnosticsProperty<Offset>("position", this.position));
properties.add(new DiagnosticsProperty<Offset>("localPosition", this.localPosition));
properties.add(new DiagnosticsProperty<Offset>("delta", this.delta, defaultValue: Offset.zero,
properties.add(new DiagnosticsProperty<Offset>("position", position));
properties.add(new DiagnosticsProperty<Offset>("localPosition", localPosition));
properties.add(new DiagnosticsProperty<Offset>("delta", delta, defaultValue: Offset.zero,
properties.add(new DiagnosticsProperty<Offset>("localDelta", this.localDelta, defaultValue: Offset.zero,
properties.add(new DiagnosticsProperty<Offset>("localDelta", localDelta, defaultValue: Offset.zero,
properties.add(new DiagnosticsProperty<TimeSpan>("timeStamp", this.timeStamp, defaultValue: TimeSpan.Zero,
properties.add(new DiagnosticsProperty<TimeSpan>("timeStamp", timeStamp, defaultValue: TimeSpan.Zero,
level: DiagnosticLevel.debug));
properties.add(new IntProperty("pointer", pointer, level: DiagnosticLevel.debug));
properties.add(new EnumProperty<PointerDeviceKind>("kind", kind, level: DiagnosticLevel.debug));

}
return new PointerAddedEvent(
timeStamp: this.timeStamp,
kind: this.kind,
device: this.device,
position: this.position,
localPosition: PointerEvent.transformPosition(transform, this.position),
obscured: this.obscured,
pressureMin: this.pressureMin,
pressureMax: this.pressureMax,
distance: this.distance,
distanceMax: this.distanceMax,
radiusMin: this.radiusMin,
radiusMax: this.radiusMax,
orientation: this.orientation,
tilt: this.tilt,
timeStamp: timeStamp,
kind: kind,
device: device,
position: position,
localPosition: transformPosition(transform, position),
obscured: obscured,
pressureMin: pressureMin,
pressureMax: pressureMax,
distance: distance,
distanceMax: distanceMax,
radiusMin: radiusMin,
radiusMax: radiusMax,
orientation: orientation,
tilt: tilt,
original: this.original as PointerAddedEvent ?? this
original: original as PointerAddedEvent ?? this
);
}
}

}
return new PointerRemovedEvent(
timeStamp: this.timeStamp,
kind: this.kind,
device: this.device,
position: this.position,
localPosition: PointerEvent.transformPosition(transform, this.position),
obscured: this.obscured,
pressureMin: this.pressureMin,
pressureMax: this.pressureMax,
distanceMax: this.distanceMax,
radiusMin: this.radiusMin,
radiusMax: this.radiusMax,
timeStamp: timeStamp,
kind: kind,
device: device,
position: position,
localPosition: transformPosition(transform, position),
obscured: obscured,
pressureMin: pressureMin,
pressureMax: pressureMax,
distanceMax: distanceMax,
radiusMin: radiusMin,
radiusMax: radiusMax,
original: this.original as PointerRemovedEvent ?? this
original: original as PointerRemovedEvent ?? this
);
}
}

return this;
}
Offset transformedPosition = PointerEvent.transformPosition(transform, this.position);
Offset transformedPosition = transformPosition(transform, position);
timeStamp: this.timeStamp,
kind: this.kind,
device: this.device,
position: this.position,
timeStamp: timeStamp,
kind: kind,
device: device,
position: position,
delta: this.delta,
localDelta: PointerEvent.transformDeltaViaPositions(
delta: delta,
localDelta: transformDeltaViaPositions(
untransformedDelta: this.delta,
untransformedEndPosition: this.position,
untransformedDelta: delta,
untransformedEndPosition: position,
buttons: this.buttons,
obscured: this.obscured,
pressureMin: this.pressureMin,
pressureMax: this.pressureMax,
distance: this.distance,
distanceMax: this.distanceMax,
size: this.size,
radiusMajor: this.radiusMajor,
radiusMinor: this.radiusMinor,
radiusMin: this.radiusMin,
radiusMax: this.radiusMax,
orientation: this.orientation,
tilt: this.tilt,
synthesized: this.synthesized,
buttons: buttons,
obscured: obscured,
pressureMin: pressureMin,
pressureMax: pressureMax,
distance: distance,
distanceMax: distanceMax,
size: size,
radiusMajor: radiusMajor,
radiusMinor: radiusMinor,
radiusMin: radiusMin,
radiusMax: radiusMax,
orientation: orientation,
tilt: tilt,
synthesized: synthesized,
original: this.original as PointerHoverEvent ?? this);
original: original as PointerHoverEvent ?? this);
}
}

return this;
}
Offset transformedPosition = PointerEvent.transformPosition(transform, this.position);
Offset transformedPosition = transformPosition(transform, position);
timeStamp: this.timeStamp,
kind: this.kind,
device: this.device,
position: this.position,
timeStamp: timeStamp,
kind: kind,
device: device,
position: position,
delta: this.delta,
localDelta: PointerEvent.transformDeltaViaPositions(
delta: delta,
localDelta: transformDeltaViaPositions(
untransformedDelta: this.delta,
untransformedEndPosition: this.position,
untransformedDelta: delta,
untransformedEndPosition: position,
buttons: this.buttons,
obscured: this.obscured,
pressureMin: this.pressureMin,
pressureMax: this.pressureMax,
distance: this.distance,
distanceMax: this.distanceMax,
size: this.size,
radiusMajor: this.radiusMajor,
radiusMinor: this.radiusMinor,
radiusMin: this.radiusMin,
radiusMax: this.radiusMax,
orientation: this.orientation,
tilt: this.tilt,
down: this.down,
synthesized: this.synthesized,
buttons: buttons,
obscured: obscured,
pressureMin: pressureMin,
pressureMax: pressureMax,
distance: distance,
distanceMax: distanceMax,
size: size,
radiusMajor: radiusMajor,
radiusMinor: radiusMinor,
radiusMin: radiusMin,
radiusMax: radiusMax,
orientation: orientation,
tilt: tilt,
down: down,
synthesized: synthesized,
original: this.original as PointerEnterEvent ?? this
original: original as PointerEnterEvent ?? this
);
}
}

return this;
}
Offset transformedPosition = PointerEvent.transformPosition(transform, this.position);
Offset transformedPosition = transformPosition(transform, position);
timeStamp: this.timeStamp,
kind: this.kind,
device: this.device,
position: this.position,
timeStamp: timeStamp,
kind: kind,
device: device,
position: position,
delta: this.delta,
localDelta: PointerEvent.transformDeltaViaPositions(
delta: delta,
localDelta: transformDeltaViaPositions(
untransformedDelta: this.delta,
untransformedEndPosition: this.position,
untransformedDelta: delta,
untransformedEndPosition: position,
buttons: this.buttons,
obscured: this.obscured,
pressureMin: this.pressureMin,
pressureMax: this.pressureMax,
distance: this.distance,
distanceMax: this.distanceMax,
size: this.size,
radiusMajor: this.radiusMajor,
radiusMinor: this.radiusMinor,
radiusMin: this.radiusMin,
radiusMax: this.radiusMax,
orientation: this.orientation,
tilt: this.tilt,
down: this.down,
synthesized: this.synthesized,
buttons: buttons,
obscured: obscured,
pressureMin: pressureMin,
pressureMax: pressureMax,
distance: distance,
distanceMax: distanceMax,
size: size,
radiusMajor: radiusMajor,
radiusMinor: radiusMinor,
radiusMin: radiusMin,
radiusMax: radiusMax,
orientation: orientation,
tilt: tilt,
down: down,
synthesized: synthesized,
original: this.original as PointerExitEvent ?? this
original: original as PointerExitEvent ?? this
);
}
}

}
return new PointerDownEvent(
timeStamp: this.timeStamp,
pointer: this.pointer,
kind: this.kind,
device: this.device,
position: this.position,
localPosition: PointerEvent.transformPosition(transform, this.position),
buttons: this.buttons,
obscured: this.obscured,
pressure: this.pressure,
pressureMin: this.pressureMin,
pressureMax: this.pressureMax,
distanceMax: this.distanceMax,
size: this.size,
radiusMajor: this.radiusMajor,
radiusMinor: this.radiusMinor,
radiusMin: this.radiusMin,
radiusMax: this.radiusMax,
orientation: this.orientation,
tilt: this.tilt,
timeStamp: timeStamp,
pointer: pointer,
kind: kind,
device: device,
position: position,
localPosition: transformPosition(transform, position),
buttons: buttons,
obscured: obscured,
pressure: pressure,
pressureMin: pressureMin,
pressureMax: pressureMax,
distanceMax: distanceMax,
size: size,
radiusMajor: radiusMajor,
radiusMinor: radiusMinor,
radiusMin: radiusMin,
radiusMax: radiusMax,
orientation: orientation,
tilt: tilt,
original: this.original as PointerDownEvent ?? this
original: original as PointerDownEvent ?? this
);
}
}

if (transform == null || transform == this.transform) {
return this;
}
Offset transformedPosition = PointerEvent.transformPosition(transform, this.position);
Offset transformedPosition = transformPosition(transform, position);
timeStamp: this.timeStamp,
pointer: this.pointer,
kind: this.kind,
device: this.device,
position: this.position,
timeStamp: timeStamp,
pointer: pointer,
kind: kind,
device: device,
position: position,
delta: this.delta,
localDelta: PointerEvent.transformDeltaViaPositions(
delta: delta,
localDelta: transformDeltaViaPositions(
untransformedDelta: this.delta,
untransformedEndPosition: this.position,
untransformedDelta: delta,
untransformedEndPosition: position,
buttons: this.buttons,
obscured: this.obscured,
pressure: this.pressure,
pressureMin: this.pressureMin,
pressureMax: this.pressureMax,
distanceMax: this.distanceMax,
size: this.size,
radiusMajor: this.radiusMajor,
radiusMinor: this.radiusMinor,
radiusMin: this.radiusMin,
radiusMax: this.radiusMax,
orientation: this.orientation,
tilt: this.tilt,
buttons: buttons,
obscured: obscured,
pressure: pressure,
pressureMin: pressureMin,
pressureMax: pressureMax,
distanceMax: distanceMax,
size: size,
radiusMajor: radiusMajor,
radiusMinor: radiusMinor,
radiusMin: radiusMin,
radiusMax: radiusMax,
orientation: orientation,
tilt: tilt,
synthesized: this.synthesized,
synthesized: synthesized,
original: this.original as PointerMoveEvent ?? this
original: original as PointerMoveEvent ?? this
);
}
}

return this;
}
return new PointerUpEvent(
timeStamp: this.timeStamp,
pointer: this.pointer,
kind: this.kind,
device: this.device,
position: this.position,
localPosition: PointerEvent.transformPosition(transform, this.position),
buttons: this.buttons,
obscured: this.obscured,
pressure: this.pressure,
pressureMin: this.pressureMin,
pressureMax: this.pressureMax,
distance: this.distance,
distanceMax: this.distanceMax,
size: this.size,
radiusMajor: this.radiusMajor,
radiusMinor: this.radiusMinor,
radiusMin: this.radiusMin,
radiusMax: this.radiusMax,
orientation: this.orientation,
tilt: this.tilt,
timeStamp: timeStamp,
pointer: pointer,
kind: kind,
device: device,
position: position,
localPosition: transformPosition(transform, position),
buttons: buttons,
obscured: obscured,
pressure: pressure,
pressureMin: pressureMin,
pressureMax: pressureMax,
distance: distance,
distanceMax: distanceMax,
size: size,
radiusMajor: radiusMajor,
radiusMinor: radiusMinor,
radiusMin: radiusMin,
radiusMax: radiusMax,
orientation: orientation,
tilt: tilt,
original: this.original as PointerUpEvent ?? this
original: original as PointerUpEvent ?? this
);
}
}

return this;
}
return new PointerScrollEvent(
timeStamp: this.timeStamp,
pointer: this.pointer,
kind: this.kind,
device: this.device,
position: this.position,
localPosition: PointerEvent.transformPosition(transform, this.position),
scrollDelta: this.scrollDelta,
timeStamp: timeStamp,
pointer: pointer,
kind: kind,
device: device,
position: position,
localPosition: transformPosition(transform, position),
scrollDelta: scrollDelta,
original: this.original as PointerScrollEvent ?? this
original: original as PointerScrollEvent ?? this
);
}

return this;
}
return new PointerCancelEvent(
timeStamp: this.timeStamp,
pointer: this.pointer,
kind: this.kind,
device: this.device,
position: this.position,
localPosition: PointerEvent.transformPosition(transform, this.position),
buttons: this.buttons,
obscured: this.obscured,
pressureMin: this.pressureMin,
pressureMax: this.pressureMax,
distance: this.distance,
distanceMax: this.distanceMax,
size: this.size,
radiusMajor: this.radiusMajor,
radiusMinor: this.radiusMinor,
radiusMin: this.radiusMin,
radiusMax: this.radiusMax,
orientation: this.orientation,
tilt: this.tilt,
timeStamp: timeStamp,
pointer: pointer,
kind: kind,
device: device,
position: position,
localPosition: transformPosition(transform, position),
buttons: buttons,
obscured: obscured,
pressureMin: pressureMin,
pressureMax: pressureMax,
distance: distance,
distanceMax: distanceMax,
size: size,
radiusMajor: radiusMajor,
radiusMinor: radiusMinor,
radiusMin: radiusMin,
radiusMax: radiusMax,
orientation: orientation,
tilt: tilt,
original: this.original as PointerCancelEvent ?? this
original: original as PointerCancelEvent ?? this
);
}
}

return this;
}
return new PointerDragFromEditorEnterEvent(
timeStamp: this.timeStamp,
pointer: this.pointer,
kind: this.kind,
device: this.device,
position: this.position,
localPosition: PointerEvent.transformPosition(transform, this.position),
timeStamp: timeStamp,
pointer: pointer,
kind: kind,
device: device,
position: position,
localPosition: transformPosition(transform, position),
original: this.original as PointerDragFromEditorEnterEvent ?? this
original: original as PointerDragFromEditorEnterEvent ?? this
);
}
}

return this;
}
return new PointerDragFromEditorExitEvent(
timeStamp: this.timeStamp,
pointer: this.pointer,
kind: this.kind,
device: this.device,
position: this.position,
localPosition: PointerEvent.transformPosition(transform, this.position),
timeStamp: timeStamp,
pointer: pointer,
kind: kind,
device: device,
position: position,
localPosition: transformPosition(transform, position),
original: this.original as PointerDragFromEditorExitEvent ?? this
original: original as PointerDragFromEditorExitEvent ?? this
);
}
}

return this;
}
return new PointerDragFromEditorHoverEvent(
timeStamp: this.timeStamp,
pointer: this.pointer,
kind: this.kind,
device: this.device,
position: this.position,
localPosition: PointerEvent.transformPosition(transform, this.position),
timeStamp: timeStamp,
pointer: pointer,
kind: kind,
device: device,
position: position,
localPosition: transformPosition(transform, position),
original: this.original as PointerDragFromEditorHoverEvent ?? this
original: original as PointerDragFromEditorHoverEvent ?? this
);
}
}

return this;
}
return new PointerDragFromEditorReleaseEvent(
timeStamp: this.timeStamp,
pointer: this.pointer,
kind: this.kind,
device: this.device,
position: this.position,
localPosition: PointerEvent.transformPosition(transform, this.position),
objectReferences: this.objectReferences,
timeStamp: timeStamp,
pointer: pointer,
kind: kind,
device: device,
position: position,
localPosition: transformPosition(transform, position),
objectReferences: objectReferences,
original: this.original as PointerDragFromEditorReleaseEvent ?? this
original: original as PointerDragFromEditorReleaseEvent ?? this
);
}
}

26
com.unity.uiwidgets/Runtime/gestures/hit_test.cs


}
public Matrix4 transform {
get { return this._transform; }
get { return _transform; }
}
internal Matrix4 _transform;

public HitTestResult() {
this._path = new List<HitTestEntry>();
this._transforms = new LinkedList<Matrix4>();
_path = new List<HitTestEntry>();
_transforms = new LinkedList<Matrix4>();
this._path = result._path;
this._transforms = result._transforms;
_path = result._path;
_transforms = result._transforms;
}
public IList<HitTestEntry> path {

public void add(HitTestEntry entry) {
D.assert(entry.transform == null);
entry._transform = this._transforms.isEmpty() ? null : this._transforms.Last();
this._path.Add(entry);
entry._transform = _transforms.isEmpty() ? null : _transforms.Last();
_path.Add(entry);
this._debugVectorMoreOrLessEquals(transform.getRow(2), new Vector4(0, 0, 1, 0)) &&
this._debugVectorMoreOrLessEquals(transform.getColumn(2), new Vector4(0, 0, 1, 0))
_debugVectorMoreOrLessEquals(transform.getRow(2), new Vector4(0, 0, 1, 0)) &&
_debugVectorMoreOrLessEquals(transform.getColumn(2), new Vector4(0, 0, 1, 0))
this._transforms.AddLast(this._transforms.isEmpty()
_transforms.AddLast(_transforms.isEmpty()
: (transform * this._transforms.Last() as Matrix4));
: (transform * _transforms.Last() as Matrix4));
D.assert(this._transforms.isNotEmpty);
this._transforms.RemoveLast();
D.assert(_transforms.isNotEmpty);
_transforms.RemoveLast();
}
bool _debugVectorMoreOrLessEquals(Vector4 a, Vector4 b,

22
com.unity.uiwidgets/Runtime/gestures/long_press.cs


) {
this.globalPosition = globalPosition ?? Offset.zero;
this.localPosition = localPosition ?? this.globalPosition;
this.velocity = Velocity.zero;
velocity = Velocity.zero;
}
public readonly Offset globalPosition;

if (onLongPressStart != null) {
invokeCallback<object>("onLongPressStart",
() => {
this.onLongPressStart(new LongPressStartDetails(
globalPosition: this._longPressOrigin.global,
localPosition:this._longPressOrigin.local
onLongPressStart(new LongPressStartDetails(
globalPosition: _longPressOrigin.global,
localPosition:_longPressOrigin.local
));
return null;
});

});
}
if (this.onLongPressEnd != null) {
this.invokeCallback<object>("onLongPressEnd", () => {
this.onLongPressEnd(new LongPressEndDetails(
if (onLongPressEnd != null) {
invokeCallback<object>("onLongPressEnd", () => {
onLongPressEnd(new LongPressEndDetails(
globalPosition: evt.position,
localPosition: evt.localPosition));
return null;

}
}
else if (evt is PointerDownEvent || evt is PointerCancelEvent) {
this._longPressAccepted = false;
this._longPressOrigin = OffsetPair.fromEventPosition(evt);
_longPressAccepted = false;
_longPressOrigin = OffsetPair.fromEventPosition(evt);
}
else if (evt is PointerMoveEvent && _longPressAccepted && onLongPressMoveUpdate != null) {
invokeCallback<object>("onLongPressMoveUpdate", () => {

offsetFromOrigin: evt.position - this._longPressOrigin.global,
localOffsetFromOrigin: evt.localPosition - this._longPressOrigin.local
offsetFromOrigin: evt.position - _longPressOrigin.global,
localOffsetFromOrigin: evt.localPosition - _longPressOrigin.local
));
return null;
});

128
com.unity.uiwidgets/Runtime/gestures/monodrag.cs


readonly Dictionary<int, VelocityTracker> _velocityTrackers = new Dictionary<int, VelocityTracker>();
public override void addScrollPointer(PointerScrollEvent evt) {
this.startTrackingScrollerPointer(evt.pointer);
if (this._state == _DragState.ready) {
this._state = _DragState.possible;
this._initialPosition = new OffsetPair(global: evt.position, local: evt.localPosition);
if (this.onStart != null) {
this.invokeCallback<object>("onStart", () => {
this.onStart(new DragStartDetails(
startTrackingScrollerPointer(evt.pointer);
if (_state == _DragState.ready) {
_state = _DragState.possible;
_initialPosition = new OffsetPair(global: evt.position, local: evt.localPosition);
if (onStart != null) {
invokeCallback<object>("onStart", () => {
onStart(new DragStartDetails(
globalPosition: this._initialPosition.global,
localPosition: this._initialPosition.local
globalPosition: _initialPosition.global,
localPosition: _initialPosition.local
));
return null;
});

public override void addAllowedPointer(PointerDownEvent evt) {
this.startTrackingPointer(evt.pointer, evt.transform);
this._velocityTrackers[evt.pointer] = new VelocityTracker();
if (this._state == _DragState.ready) {
this._state = _DragState.possible;
this._initialPosition = new OffsetPair(global: evt.position, local: evt.localPosition);
this._pendingDragOffset = OffsetPair.zero;
this._globalDistanceMoved = 0f;
this._lastPendingEventTimestamp = evt.timeStamp;
this._lastTransform = evt.transform;
if (this.onDown != null) {
this.invokeCallback<object>("onDown",
startTrackingPointer(evt.pointer, evt.transform);
_velocityTrackers[evt.pointer] = new VelocityTracker();
if (_state == _DragState.ready) {
_state = _DragState.possible;
_initialPosition = new OffsetPair(global: evt.position, local: evt.localPosition);
_pendingDragOffset = OffsetPair.zero;
_globalDistanceMoved = 0f;
_lastPendingEventTimestamp = evt.timeStamp;
_lastTransform = evt.transform;
if (onDown != null) {
invokeCallback<object>("onDown",
this.onDown(new DragDownDetails(
globalPosition: this._initialPosition.global,
localPosition: this._initialPosition.local));
onDown(new DragDownDetails(
globalPosition: _initialPosition.global,
localPosition: _initialPosition.local));
return null;
});
}

}
if (evt is PointerMoveEvent) {
if (this._state == _DragState.accepted) {
if (this.onUpdate != null) {
this.invokeCallback<object>("onUpdate", () => {
this.onUpdate(new DragUpdateDetails(
if (_state == _DragState.accepted) {
if (onUpdate != null) {
invokeCallback<object>("onUpdate", () => {
onUpdate(new DragUpdateDetails(
delta: this._getDeltaForDetails(evt.localDelta),
primaryDelta: this._getPrimaryValueFromOffset(evt.localDelta),
delta: _getDeltaForDetails(evt.localDelta),
primaryDelta: _getPrimaryValueFromOffset(evt.localDelta),
globalPosition: evt.position,
localPosition: evt.localPosition
));

}
else {
this._pendingDragOffset += new OffsetPair(local: evt.localDelta, global: evt.delta);
this._lastPendingEventTimestamp = evt.timeStamp;
this._lastTransform = evt.transform;
Offset movedLocally = this._getDeltaForDetails(evt.localDelta);
_pendingDragOffset += new OffsetPair(local: evt.localDelta, global: evt.delta);
_lastPendingEventTimestamp = evt.timeStamp;
_lastTransform = evt.transform;
Offset movedLocally = _getDeltaForDetails(evt.localDelta);
this._globalDistanceMoved += PointerEvent.transformDeltaViaPositions(
_globalDistanceMoved += PointerEvent.transformDeltaViaPositions(
).distance * (this._getPrimaryValueFromOffset(movedLocally) ?? 1).sign();
if (this._hasSufficientGlobalDistanceToAccept) {
this.resolve(GestureDisposition.accepted);
).distance * (_getPrimaryValueFromOffset(movedLocally) ?? 1).sign();
if (_hasSufficientGlobalDistanceToAccept) {
resolve(GestureDisposition.accepted);
}
}
}

public override void acceptGesture(int pointer) {
if (this._state != _DragState.accepted) {
this._state = _DragState.accepted;
OffsetPair delta = this._pendingDragOffset;
var timestamp = this._lastPendingEventTimestamp;
Matrix4 transform = this._lastTransform;
if (_state != _DragState.accepted) {
_state = _DragState.accepted;
OffsetPair delta = _pendingDragOffset;
var timestamp = _lastPendingEventTimestamp;
Matrix4 transform = _lastTransform;
switch (this.dragStartBehavior) {
switch (dragStartBehavior) {
this._initialPosition = this._initialPosition + delta;
_initialPosition = _initialPosition + delta;
localUpdateDelta = this._getDeltaForDetails(delta.local);
localUpdateDelta = _getDeltaForDetails(delta.local);
this._pendingDragOffset = OffsetPair.zero;
this._lastPendingEventTimestamp = default(TimeSpan);
this._lastTransform = null;
if (this.onStart != null) {
this.invokeCallback<object>("onStart", () => {
this.onStart(new DragStartDetails(
_pendingDragOffset = OffsetPair.zero;
_lastPendingEventTimestamp = default(TimeSpan);
_lastTransform = null;
if (onStart != null) {
invokeCallback<object>("onStart", () => {
onStart(new DragStartDetails(
globalPosition: this._initialPosition.global,
localPosition: this._initialPosition.local
globalPosition: _initialPosition.global,
localPosition: _initialPosition.local
if (localUpdateDelta != Offset.zero && this.onUpdate != null) {
if (localUpdateDelta != Offset.zero && onUpdate != null) {
Offset correctedLocalPosition = this._initialPosition.local + localUpdateDelta;
Offset correctedLocalPosition = _initialPosition.local + localUpdateDelta;
Offset globalUpdateDelta = PointerEvent.transformDeltaViaPositions(
untransformedEndPosition: correctedLocalPosition,
untransformedDelta: localUpdateDelta,

OffsetPair correctedPosition = this._initialPosition + updateDelta; // Only adds delta for down behaviour
this.invokeCallback<object>("onUpdate", () => {
this.onUpdate(new DragUpdateDetails(
OffsetPair correctedPosition = _initialPosition + updateDelta; // Only adds delta for down behaviour
invokeCallback<object>("onUpdate", () => {
onUpdate(new DragUpdateDetails(
primaryDelta: this._getPrimaryValueFromOffset(localUpdateDelta),
globalPosition: this._initialPosition.global,
localPosition: this._initialPosition.local
primaryDelta: _getPrimaryValueFromOffset(localUpdateDelta),
globalPosition: _initialPosition.global,
localPosition: _initialPosition.local
));
return null;
});

}
protected override bool _hasSufficientGlobalDistanceToAccept {
get { return Mathf.Abs(this._globalDistanceMoved) > Constants.kTouchSlop; }
get { return Mathf.Abs(_globalDistanceMoved) > Constants.kTouchSlop; }
}
protected override Offset _getDeltaForDetails(Offset delta) {

}
protected override bool _hasSufficientGlobalDistanceToAccept {
get { return Mathf.Abs(this._globalDistanceMoved) > Constants.kTouchSlop; }
get { return Mathf.Abs(_globalDistanceMoved) > Constants.kTouchSlop; }
}
protected override Offset _getDeltaForDetails(Offset delta) {

}
protected override bool _hasSufficientGlobalDistanceToAccept {
get { return Math.Abs(this._globalDistanceMoved) > Constants.kPanSlop; }
get { return Math.Abs(_globalDistanceMoved) > Constants.kPanSlop; }
}
protected override Offset _getDeltaForDetails(Offset delta) {

66
com.unity.uiwidgets/Runtime/gestures/multitap.cs


TimeSpan doubleTapMinTime,
GestureArenaEntry entry = null
) {
this.pointer = evt.pointer;
this._initialGlobalPosition = evt.position;
this._doubleTapMinTimeCountdown = new _CountdownZoned(duration: doubleTapMinTime);
pointer = evt.pointer;
_initialGlobalPosition = evt.position;
_doubleTapMinTimeCountdown = new _CountdownZoned(duration: doubleTapMinTime);
this.entry = entry;
}

bool _isTrackingPointer = false;
public void startTrackingPointer(PointerRoute route, Matrix4 transform) {
if (!this._isTrackingPointer) {
this._isTrackingPointer = true;
GestureBinding.instance.pointerRouter.addRoute(this.pointer, route, transform);
if (!_isTrackingPointer) {
_isTrackingPointer = true;
GestureBinding.instance.pointerRouter.addRoute(pointer, route, transform);
}
}

}
public bool isWithinGlobalTolerance(PointerEvent evt, float tolerance) {
Offset offset = evt.position - this._initialGlobalPosition;
Offset offset = evt.position - _initialGlobalPosition;
return offset.distance <= tolerance;
}

readonly Dictionary<int, _TapTracker> _trackers = new Dictionary<int, _TapTracker>();
public override void addAllowedPointer(PointerDownEvent evt) {
if (this._firstTap != null &&
!this._firstTap.isWithinGlobalTolerance(evt, Constants.kDoubleTapSlop)) {
if (_firstTap != null &&
!_firstTap.isWithinGlobalTolerance(evt, Constants.kDoubleTapSlop)) {
return;
}

entry: GestureBinding.instance.gestureArena.add(evt.pointer, this),
doubleTapMinTime: Constants.kDoubleTapMinTime
);
this._trackers[evt.pointer] = tracker;
tracker.startTrackingPointer(this._handleEvent, evt.transform);
_trackers[evt.pointer] = tracker;
tracker.startTrackingPointer(_handleEvent, evt.transform);
}
void _handleEvent(PointerEvent evt) {

}
else if (evt is PointerMoveEvent) {
if (!tracker.isWithinGlobalTolerance(evt, Constants.kDoubleTapTouchSlop)) {
this._reject(tracker);
_reject(tracker);
}
}
else if (evt is PointerCancelEvent) {

void _registerSecondTap(_TapTracker tracker) {
var initialPosition = tracker._initialGlobalPosition;
this._firstTap.entry.resolve(GestureDisposition.accepted);
_firstTap.entry.resolve(GestureDisposition.accepted);
tracker.entry.resolve(GestureDisposition.accepted);
_freezeTracker(tracker);
_trackers.Remove(tracker.pointer);

doubleTapMinTime: Constants.kDoubleTapMinTime
) {
this.gestureRecognizer = gestureRecognizer;
this._lastPosition = OffsetPair.fromEventPosition(evt);
this.startTrackingPointer(this.handleEvent, evt.transform);
_lastPosition = OffsetPair.fromEventPosition(evt);
startTrackingPointer(handleEvent, evt.transform);
if (longTapDelay > TimeSpan.Zero) {
_timer = Window.instance.run(longTapDelay, () => {
_timer = null;

void handleEvent(PointerEvent evt) {
D.assert(evt.pointer == pointer);
if (evt is PointerMoveEvent) {
if (!this.isWithinGlobalTolerance(evt, Constants.kTouchSlop)) {
this.cancel();
if (!isWithinGlobalTolerance(evt, Constants.kTouchSlop)) {
cancel();
this._lastPosition = OffsetPair.fromEventPosition(evt);
_lastPosition = OffsetPair.fromEventPosition(evt);
}
}
else if (evt is PointerCancelEvent) {

this.stopTrackingPointer(this.handleEvent);
this._finalPosition = OffsetPair.fromEventPosition(evt);
this._check();
stopTrackingPointer(handleEvent);
_finalPosition = OffsetPair.fromEventPosition(evt);
_check();
}
}

evt: evt,
longTapDelay: longTapDelay
);
if (this.onTapDown != null) {
this.invokeCallback<object>("onTapDown", () => {
this.onTapDown(evt.pointer, new TapDownDetails(
if (onTapDown != null) {
invokeCallback<object>("onTapDown", () => {
onTapDown(evt.pointer, new TapDownDetails(
globalPosition: evt.position,
localPosition: evt.localPosition,
kind: evt.kind));

}
public void _dispatchTap(int pointer, OffsetPair position) {
D.assert(this._gestureMap.ContainsKey(pointer));
this._gestureMap.Remove(pointer);
if (this.onTapUp != null) {
this.invokeCallback<object>("onTapUp",
D.assert(_gestureMap.ContainsKey(pointer));
_gestureMap.Remove(pointer);
if (onTapUp != null) {
invokeCallback<object>("onTapUp",
this.onTapUp(pointer, new TapUpDetails(globalPosition: position.global, localPosition: position.local));
onTapUp(pointer, new TapUpDetails(globalPosition: position.global, localPosition: position.local));
return null;
});
}

}
public void _dispatchLongTap(int pointer, OffsetPair lastPosition) {
D.assert(this._gestureMap.ContainsKey(pointer));
if (this.onLongTapDown != null) {
this.invokeCallback<object>("onLongTapDown",
D.assert(_gestureMap.ContainsKey(pointer));
if (onLongTapDown != null) {
invokeCallback<object>("onLongTapDown",
this.onLongTapDown(pointer, new TapDownDetails(
onLongTapDown(pointer, new TapDownDetails(
globalPosition: lastPosition.global,
localPosition: lastPosition.local));
return null;

20
com.unity.uiwidgets/Runtime/gestures/pointer_router.cs


readonly Dictionary<PointerRoute, Matrix4> _globalRoutes = new Dictionary<PointerRoute, Matrix4>();
public void addRoute(int pointer, PointerRoute route, Matrix4 transform = null) {
var routes = this._routeMap.putIfAbsent(
var routes = _routeMap.putIfAbsent(
pointer,
() => new Dictionary<PointerRoute, Matrix4>()
);

}
public void addGlobalRoute(PointerRoute route, Matrix4 transform = null) {
D.assert(!this._globalRoutes.ContainsKey(route));
this._globalRoutes[route] = transform;
D.assert(!_globalRoutes.ContainsKey(route));
_globalRoutes[route] = transform;
D.assert(this._globalRoutes.ContainsKey(route));
this._globalRoutes.Remove(route);
D.assert(_globalRoutes.ContainsKey(route));
_globalRoutes.Remove(route);
}
public bool acceptScroll() {

public void route(PointerEvent evt) {
// TODO: update this to latest version
Dictionary<PointerRoute, Matrix4> routes;
this._routeMap.TryGetValue(evt.pointer, out routes);
_routeMap.TryGetValue(evt.pointer, out routes);
Dictionary<PointerRoute, Matrix4> copiedGlobalRoutes = new Dictionary<PointerRoute, Matrix4>(this._globalRoutes);
Dictionary<PointerRoute, Matrix4> copiedGlobalRoutes = new Dictionary<PointerRoute, Matrix4>(_globalRoutes);
this._dispatchEventToRoutes(
_dispatchEventToRoutes(
this._dispatchEventToRoutes(evt, this._globalRoutes, copiedGlobalRoutes);
_dispatchEventToRoutes(evt, _globalRoutes, copiedGlobalRoutes);
}
public void _dispatchEventToRoutes(

var route = item.Key;
var transform = item.Value;
if (referenceRoutes.ContainsKey(route)) {
this._dispatch(evt, route, transform);
_dispatch(evt, route, transform);
}
}
}

4
com.unity.uiwidgets/Runtime/gestures/pointer_signal_resolver.cs


return;
}
D.assert((_currentEvent.original ?? this._currentEvent) == evt);
D.assert((_currentEvent.original ?? _currentEvent) == evt);
this._firstRegisteredCallback(_currentEvent);
_firstRegisteredCallback(_currentEvent);
}
catch (Exception exception) {
UIWidgetsError.reportError(new UIWidgetsErrorDetails(

62
com.unity.uiwidgets/Runtime/gestures/recognizer.cs


public abstract class GestureRecognizer : DiagnosticableTree, GestureArenaMember {
protected GestureRecognizer(object debugOwner = null, PointerDeviceKind? kind = null) {
this.debugOwner = debugOwner;
this._kindFilter = kind;
_kindFilter = kind;
}
public readonly object debugOwner;

readonly Dictionary<int, PointerDeviceKind> _pointerToKind = new Dictionary<int, PointerDeviceKind>{};
public void addPointer(PointerDownEvent evt) {
this._pointerToKind[evt.pointer] = evt.kind;
if (this.isPointerAllowed(evt)) {
this.addAllowedPointer(evt);
_pointerToKind[evt.pointer] = evt.kind;
if (isPointerAllowed(evt)) {
addAllowedPointer(evt);
}
else {
handleNonAllowedPointer(evt);

}
protected virtual bool isPointerAllowed(PointerDownEvent evt) {
return this._kindFilter == null || this._kindFilter == evt.kind;
return _kindFilter == null || _kindFilter == evt.kind;
D.assert(this._pointerToKind.ContainsKey(pointer));
return this._pointerToKind[pointer];
D.assert(_pointerToKind.ContainsKey(pointer));
return _pointerToKind[pointer];
}
public virtual void addScrollPointer(PointerScrollEvent evt) {

}
protected void startTrackingPointer(int pointer, Matrix4 transform = null) {
GestureBinding.instance.pointerRouter.addRoute(pointer, this.handleEvent, transform);
this._trackedPointers.Add(pointer);
D.assert(!this._entries.ContainsKey(pointer));
this._entries[pointer] = this._addPointerToArena(pointer);
GestureBinding.instance.pointerRouter.addRoute(pointer, handleEvent, transform);
_trackedPointers.Add(pointer);
D.assert(!_entries.ContainsKey(pointer));
_entries[pointer] = _addPointerToArena(pointer);
}
protected void stopTrackingPointer(int pointer) {

Timer _timer;
public override void addAllowedPointer(PointerDownEvent evt) {
this.startTrackingPointer(evt.pointer, evt.transform);
if (this.state == GestureRecognizerState.ready) {
this.state = GestureRecognizerState.possible;
this.primaryPointer = evt.pointer;
this.initialPosition = new OffsetPair(local: evt.localPosition, global: evt.position);
if (this.deadline != null) {
this._timer = Window.instance.run(this.deadline.Value, () => didExceedDeadlineWithEvent(evt));
startTrackingPointer(evt.pointer, evt.transform);
if (state == GestureRecognizerState.ready) {
state = GestureRecognizerState.possible;
primaryPointer = evt.pointer;
initialPosition = new OffsetPair(local: evt.localPosition, global: evt.position);
if (deadline != null) {
_timer = Window.instance.run(deadline.Value, () => didExceedDeadlineWithEvent(evt));
}
}
}

if (evt.pointer == this.primaryPointer) {
bool isPreAcceptSlopPastTolerance = this.state == GestureRecognizerState.possible &&
this.preAcceptSlopTolerance != null &&
this._getGlobalDistance(evt) > this.preAcceptSlopTolerance;
bool isPostAcceptSlopPastTolerance = this.state == GestureRecognizerState.accepted &&
this.postAcceptSlopTolerance != null &&
this._getGlobalDistance(evt) > this.postAcceptSlopTolerance;
if (evt.pointer == primaryPointer) {
bool isPreAcceptSlopPastTolerance = state == GestureRecognizerState.possible &&
preAcceptSlopTolerance != null &&
_getGlobalDistance(evt) > preAcceptSlopTolerance;
bool isPostAcceptSlopPastTolerance = state == GestureRecognizerState.accepted &&
postAcceptSlopTolerance != null &&
_getGlobalDistance(evt) > postAcceptSlopTolerance;
if (evt is PointerMoveEvent && (isPreAcceptSlopPastTolerance || isPostAcceptSlopPastTolerance)) {
resolve(GestureDisposition.rejected);

}
protected virtual void didExceedDeadlineWithEvent(PointerDownEvent evt) {
this.didExceedDeadline();
didExceedDeadline();
if (pointer == this.primaryPointer && this.state == GestureRecognizerState.possible) {
this._stopTimer();
this.state = GestureRecognizerState.accepted;
if (pointer == primaryPointer && state == GestureRecognizerState.possible) {
_stopTimer();
state = GestureRecognizerState.accepted;
}
}

}
float _getGlobalDistance(PointerEvent evt) {
Offset offset = evt.position - this.initialPosition.global;
Offset offset = evt.position - initialPosition.global;
return offset.distance;
}

}
public override string ToString() {
return $"runtimeType(local: ${this.local}, global: ${this.global})";
return $"runtimeType(local: ${local}, global: ${global})";
}
}
}

2
com.unity.uiwidgets/Runtime/gestures/tap.cs


}
protected override void handleTapDown(PointerDownEvent down) {
if (this.onTapDown != null) {
if (onTapDown != null) {
TapDownDetails details = new TapDownDetails(
globalPosition: down.position,
localPosition: down.localPosition,

4
com.unity.uiwidgets/Runtime/material/chip.cs


}
public override bool hitTest(BoxHitTestResult result, Offset position = null) {
if (!this.size.contains(position)) {
if (!size.contains(position)) {
return false;
}

}
public override bool hitTest(BoxHitTestResult result, Offset position = null) {
if (!this.size.contains(position)) {
if (!size.contains(position)) {
return false;
}

2
com.unity.uiwidgets/Runtime/material/flexible_space_bar.cs


);
float scaleValue = new FloatTween(begin: 1.5f, end: 1.0f).lerp(t);
Matrix4 scaleTransform = new Matrix4().diagonal3Values(scaleValue, scaleValue, 1);
Alignment titleAlignment = this._getTitleAlignment(effectiveCenterTitle);
Alignment titleAlignment = _getTitleAlignment(effectiveCenterTitle);
children.Add(new Container(
padding: padding,

4
com.unity.uiwidgets/Runtime/material/ink_decoration.cs


}
protected override void paintFeature(Canvas canvas, Matrix4 transform) {
if (this._painter == null) {
if (_painter == null) {
return;
}

if (originOffset == null) {
canvas.save();
canvas.concat(transform.toMatrix3());
this._painter.paint(canvas, Offset.zero, sizedConfiguration);
_painter.paint(canvas, Offset.zero, sizedConfiguration);
canvas.restore();
}
else {

4
com.unity.uiwidgets/Runtime/material/ink_highlight.cs


}
protected override void paintFeature(Canvas canvas, Matrix4 transform) {
Paint paint = new Paint {color = this.color.withAlpha(this._alpha.value)};
Paint paint = new Paint {color = color.withAlpha(_alpha.value)};
this._paintHighlight(canvas, rect, paint);
_paintHighlight(canvas, rect, paint);
canvas.restore();
}
else {

4
com.unity.uiwidgets/Runtime/material/ink_ripple.cs


}
protected override void paintFeature(Canvas canvas, Matrix4 transform) {
int alpha = this._fadeInController.isAnimating ? this._fadeIn.value : this._fadeOut.value;
Paint paint = new Paint {color = this.color.withAlpha(alpha)};
int alpha = _fadeInController.isAnimating ? _fadeIn.value : _fadeOut.value;
Paint paint = new Paint {color = color.withAlpha(alpha)};
Offset center = Offset.lerp(
_position,
referenceBox.size.center(Offset.zero),

8
com.unity.uiwidgets/Runtime/material/ink_splash.cs


}
protected override void paintFeature(Canvas canvas, Matrix4 transform) {
Paint paint = new Paint {color = this.color.withAlpha(this._alpha.value)};
Offset center = this._position;
if (this._repositionToReferenceBox) {
center = Offset.lerp(center, this.referenceBox.size.center(Offset.zero), this._radiusController.value);
Paint paint = new Paint {color = color.withAlpha(_alpha.value)};
Offset center = _position;
if (_repositionToReferenceBox) {
center = Offset.lerp(center, referenceBox.size.center(Offset.zero), _radiusController.value);
}
Offset originOffset = transform.getAsTranslation();

64
com.unity.uiwidgets/Runtime/material/input_decorator.cs


protected internal override Widget build(BuildContext context) {
return new Transform(
transform: new Matrix4().translationValues(this.translateX, 0, 0),
child: this.child
transform: new Matrix4().translationValues(translateX, 0, 0),
child: child
);
}
}

boxToBaseline[prefix] = _layoutLineBox(prefix, boxConstraints);
}
if (this.suffix != null) {
boxToBaseline[this.suffix] = this._layoutLineBox(this.suffix, boxConstraints);
if (suffix != null) {
boxToBaseline[suffix] = _layoutLineBox(suffix, boxConstraints);
if (this.icon != null) {
boxToBaseline[this.icon] = this._layoutLineBox(this.icon, boxConstraints);
if (icon != null) {
boxToBaseline[icon] = _layoutLineBox(icon, boxConstraints);
if (this.prefixIcon != null) {
boxToBaseline[this.prefixIcon] = this._layoutLineBox(this.prefixIcon, boxConstraints);
if (prefixIcon != null) {
boxToBaseline[prefixIcon] = _layoutLineBox(prefixIcon, boxConstraints);
if (this.suffixIcon != null) {
boxToBaseline[this.suffixIcon] = this._layoutLineBox(this.suffixIcon, boxConstraints);
if (suffixIcon != null) {
boxToBaseline[suffixIcon] = _layoutLineBox(suffixIcon, boxConstraints);
float inputWidth = Math.Max(0.0f, this.constraints.maxWidth - (
_boxSize(this.icon).width
+ this.contentPadding.left
+ _boxSize(this.prefixIcon).width
+ _boxSize(this.prefix).width
+ _boxSize(this.suffix).width
+ _boxSize(this.suffixIcon).width
+ this.contentPadding.right));
if (this.label != null) {
boxToBaseline[this.label] = this._layoutLineBox(this.label,
float inputWidth = Math.Max(0.0f, constraints.maxWidth - (
_boxSize(icon).width
+ contentPadding.left
+ _boxSize(prefixIcon).width
+ _boxSize(prefix).width
+ _boxSize(suffix).width
+ _boxSize(suffixIcon).width
+ contentPadding.right));
if (label != null) {
boxToBaseline[label] = _layoutLineBox(label,
boxConstraints.copyWith(maxWidth: inputWidth)
);
}

float right = overallWidth - contentPadding.right;
height = layout.containerHeight ?? 0.0f;
baseline = (this.decoration.isCollapsed || !this.decoration.border.isOutline
baseline = (decoration.isCollapsed || !decoration.border.isOutline
? layout.inputBaseline
: layout.outlineBaseline) ?? 0.0f;

float scale = MathUtils.lerpFloat(1.0f, 0.75f, t);
float dx = labelOffset.dx;
float dy = MathUtils.lerpFloat(0.0f, floatingY - labelOffset.dy, t);
this._labelTransform = new Matrix4().identity();
this._labelTransform.translate(dx, labelOffset.dy + dy);
this._labelTransform.scale(scale, scale, 1);
context.pushTransform(this.needsCompositing, offset, this._labelTransform, this._paintLabel);
_labelTransform = new Matrix4().identity();
_labelTransform.translate(dx, labelOffset.dy + dy);
_labelTransform.scale(scale, scale, 1);
context.pushTransform(needsCompositing, offset, _labelTransform, _paintLabel);
}
doPaint(icon);

protected override bool hitTestChildren(BoxHitTestResult result, Offset position) {
D.assert(position != null);
foreach (RenderBox child in this._children) {
foreach (RenderBox child in _children) {
Offset offset = _boxParentData(child).offset;
bool isHit = result.addWithPaintOffset(
offset: offset,

}
public override void applyPaintTransform(RenderObject child, Matrix4 transform) {
if (child == this.label && this._labelTransform != null) {
Offset labelOffset = _boxParentData(this.label).offset;
transform.multiply(this._labelTransform);
if (child == label && _labelTransform != null) {
Offset labelOffset = _boxParentData(label).offset;
transform.multiply(_labelTransform);
transform.translate(-labelOffset.dx, -labelOffset.dy);
}

public InputDecoration decoration {
get {
this._effectiveDecoration = this._effectiveDecoration ?? this.widget.decoration.applyDefaults(
Theme.of(this.context).inputDecorationTheme
_effectiveDecoration = _effectiveDecoration ?? widget.decoration.applyDefaults(
Theme.of(context).inputDecorationTheme
return this._effectiveDecoration;
return _effectiveDecoration;
}
}

4
com.unity.uiwidgets/Runtime/material/list_tile.cs


bool isTwoLine = !isThreeLine && hasSubtitle;
bool isOneLine = !isThreeLine && !hasSubtitle;
BoxConstraints maxIconHeightConstrains = new BoxConstraints(
maxHeight: this.isDense ? 48.0f : 56.0f
maxHeight: isDense ? 48.0f : 56.0f
);
BoxConstraints looseConstraints = constraints.loosen();
BoxConstraints iconConstraints = looseConstraints.enforce(maxIconHeightConstrains);

protected override bool hitTestChildren(BoxHitTestResult result, Offset position) {
D.assert(position != null);
foreach (RenderBox child in this._children) {
foreach (RenderBox child in _children) {
BoxParentData parentData = child.parentData as BoxParentData;
bool isHit = result.addWithPaintOffset(
offset: parentData.offset,

20
com.unity.uiwidgets/Runtime/rendering/box.cs


}
}
return this.addWithRawTransform(
return addWithRawTransform(
transform: transform,
position: position,
hitTest: hitTest

BoxHitTest hitTest
) {
D.assert(hitTest != null);
return this.addWithRawTransform(
return addWithRawTransform(
transform: offset != null ? new Matrix4().translationValues(-offset.dx, -offset.dy, 0) : null,
position: position,
hitTest: hitTest

? position
: MatrixUtils.transformPoint(transform, position);
if (transform != null) {
this.pushTransform(transform);
pushTransform(transform);
this.popTransform();
popTransform();
}
return isHit;

public class BoxParentData : ParentData {
public Offset offset {
get { return this._offset; }
set { this._offset = value; }
get { return _offset; }
set { _offset = value; }
}
Offset _offset = Offset.zero;

D.assert(!_debugDoingBaseline,
() =>
"Please see the documentation for computeDistanceToActualBaseline for the required calling conventions of this method.");
D.assert(!this.debugNeedsLayout);
D.assert(!debugNeedsLayout);
D.assert(() => {
RenderObject parent = (RenderObject) this.parent;
if (owner.debugDoingLayout) {

}
public Offset globalToLocal(Offset point, RenderObject ancestor = null) {
var transform = this.getTransformTo(ancestor);
var transform = getTransformTo(ancestor);
float det = transform.invert();
if (det == 0) {
return Offset.zero;

}
public Offset localToGlobal(Offset point, RenderObject ancestor = null) {
return MatrixUtils.transformPoint(this.getTransformTo(ancestor), point);
return MatrixUtils.transformPoint(getTransformTo(ancestor), point);
}
public override Rect paintBounds {

}
public bool defaultHitTestChildren(BoxHitTestResult result, Offset position = null) {
ChildType child = this.lastChild;
ChildType child = lastChild;
while (child != null) {
ParentDataType childParentData = child.parentData as ParentDataType;
bool isHit = result.addWithPaintOffset(

2
com.unity.uiwidgets/Runtime/rendering/box.mixin.gen.cs


public bool defaultHitTestChildren(BoxHitTestResult result, Offset position) {
// the x, y parameters have the top left of the node's box as the origin4
ChildType child = this.lastChild;
ChildType child = lastChild;
while (child != null) {
ParentDataType childParentData = child.parentData as ParentDataType;
bool isHit = result.addWithPaintOffset(

2
com.unity.uiwidgets/Runtime/rendering/custom_layout.cs


}
protected override bool hitTestChildren(BoxHitTestResult result, Offset position) {
return this.defaultHitTestChildren(result, position: position);
return defaultHitTestChildren(result, position: position);
}
}
}

2
com.unity.uiwidgets/Runtime/rendering/custom_paint.cs


}
protected override bool hitTestChildren(BoxHitTestResult result, Offset position) {
if (this._foregroundPainter != null && ((this._foregroundPainter.hitTest(position)) ?? false)) {
if (_foregroundPainter != null && ((_foregroundPainter.hitTest(position)) ?? false)) {
return true;
}

2
com.unity.uiwidgets/Runtime/rendering/flex.cs


}
protected override bool hitTestChildren(BoxHitTestResult result, Offset position = null) {
return this.defaultHitTestChildren(result, position: position);
return defaultHitTestChildren(result, position: position);
}
}
}

96
com.unity.uiwidgets/Runtime/rendering/layer.cs


public override void applyTransform(Layer child, Matrix4 transform) {
D.assert(child != null);
D.assert(transform != null);
transform.translate(this.offset.dx, this.offset.dy);
transform.translate(offset.dx, offset.dy);
}
public Scene buildScene(SceneBuilder builder) {

public class TransformLayer : OffsetLayer {
public TransformLayer(Matrix4 transform = null, Offset offset = null) : base(offset) {
this._transform = transform ?? new Matrix4().identity();
_transform = transform ?? new Matrix4().identity();
get { return this._transform; }
get { return _transform; }
}
Matrix4 _transform;

bool _inverseDirty = true;
internal override S find<S>(Offset regionOffset) {
if (this._inverseDirty) {
this._invertedTransform = Matrix4.tryInvert(
PointerEvent.removePerspectiveTransform(this.transform)
if (_inverseDirty) {
_invertedTransform = Matrix4.tryInvert(
PointerEvent.removePerspectiveTransform(transform)
this._inverseDirty = false;
_inverseDirty = false;
}
if (_invertedTransform == null) {

Vector4 result = this._invertedTransform.transform(vector);
Vector4 result = _invertedTransform.transform(vector);
return base.find<S>(new Offset(result[0], result[1]));
}

var totalOffset = offset + layerOffset;
if (totalOffset != Offset.zero) {
this._lastEffectiveTransform = new Matrix4().translationValues(totalOffset.dx, totalOffset.dy, 0);
this._lastEffectiveTransform.multiply(this.transform);
_lastEffectiveTransform = new Matrix4().translationValues(totalOffset.dx, totalOffset.dy, 0);
_lastEffectiveTransform.multiply(transform);
builder.pushTransform(this._lastEffectiveTransform.toMatrix3());
this.addChildrenToScene(builder);
builder.pushTransform(_lastEffectiveTransform.toMatrix3());
addChildrenToScene(builder);
builder.pop();
return null;
}

D.assert(transform != null);
D.assert(this._lastEffectiveTransform != null || this.transform != null);
if (this._lastEffectiveTransform == null) {
D.assert(_lastEffectiveTransform != null || this.transform != null);
if (_lastEffectiveTransform == null) {
transform.multiply(this._lastEffectiveTransform);
transform.multiply(_lastEffectiveTransform);
properties.add(new DiagnosticsProperty<Matrix4>("transform", this.transform));
properties.add(new DiagnosticsProperty<Matrix4>("transform", transform));
}
}

internal override flow.Layer addToScene(SceneBuilder builder, Offset layerOffset = null) {
layerOffset = layerOffset ?? Offset.zero;
D.assert(this.offset != null);
this._lastOffset = this.offset + layerOffset;
if (this._lastOffset != Offset.zero) {
D.assert(offset != null);
_lastOffset = offset + layerOffset;
if (_lastOffset != Offset.zero) {
.translationValues(this._lastOffset.dx, this._lastOffset.dy,0)
.translationValues(_lastOffset.dx, _lastOffset.dy,0)
.toMatrix3());
}

}
public override void applyTransform(Layer child, Matrix4 transform) {
D.assert(this._lastOffset != null);
if (this._lastOffset != Offset.zero) {
transform.translate(this._lastOffset.dx, this._lastOffset.dy);
D.assert(_lastOffset != null);
if (_lastOffset != Offset.zero) {
transform.translate(_lastOffset.dx, _lastOffset.dy);
}
}

return showWhenUnlinked ? base.find<S>(regionOffset - unlinkedOffset) : null;
}
if (this._inverseDirty) {
this._invertedTransform = Matrix4.tryInvert(this.getLastTransform());
this._inverseDirty = false;
if (_inverseDirty) {
_invertedTransform = Matrix4.tryInvert(getLastTransform());
_inverseDirty = false;
}
if (_invertedTransform == null) {

Vector4 vector = new Vector4(regionOffset.dx, regionOffset.dy, 0, 1);
Vector4 result = this._invertedTransform.transform(vector);
return base.find<S>(new Offset(result[0] - this.linkedOffset.dx, result[1] - this.linkedOffset.dy));
Vector4 result = _invertedTransform.transform(vector);
return base.find<S>(new Offset(result[0] - linkedOffset.dx, result[1] - linkedOffset.dy));
if (this._lastTransform == null) {
if (_lastTransform == null) {
Matrix4 result = new Matrix4().translationValues(-this._lastOffset.dx, -this._lastOffset.dy,0 );
result.multiply(this._lastTransform);
Matrix4 result = new Matrix4().translationValues(-_lastOffset.dx, -_lastOffset.dy,0 );
result.multiply(_lastTransform);
return result;
}

inverseLayers.Add(layer);
} while (layer != ancestor);
Matrix4 forwardTransform = this._collectTransformForLayerChain(forwardLayers);
Matrix4 inverseTransform = this._collectTransformForLayerChain(inverseLayers);
Matrix4 forwardTransform = _collectTransformForLayerChain(forwardLayers);
Matrix4 inverseTransform = _collectTransformForLayerChain(inverseLayers);
inverseTransform.translate(this.linkedOffset.dx, this.linkedOffset.dy);
this._lastTransform = inverseTransform;
this._inverseDirty = true;
inverseTransform.translate(linkedOffset.dx, linkedOffset.dy);
_lastTransform = inverseTransform;
_inverseDirty = true;
}
protected override bool alwaysNeedsAddToScene {

return null;
}
this._establishTransform();
if (this._lastTransform != null) {
builder.pushTransform(this._lastTransform.toMatrix3());
this.addChildrenToScene(builder);
_establishTransform();
if (_lastTransform != null) {
builder.pushTransform(_lastTransform.toMatrix3());
addChildrenToScene(builder);
this._lastOffset = null;
var matrix = new Matrix4().translationValues(this.unlinkedOffset.dx, this.unlinkedOffset.dy, 0);
_lastOffset = null;
var matrix = new Matrix4().translationValues(unlinkedOffset.dx, unlinkedOffset.dy, 0);
this.addChildrenToScene(builder);
addChildrenToScene(builder);
builder.pop();
}

public override void applyTransform(Layer child, Matrix4 transform) {
D.assert(child != null);
D.assert(transform != null);
if (this._lastTransform != null) {
transform.multiply(this._lastTransform);
if (_lastTransform != null) {
transform.multiply(_lastTransform);
transform.multiply(new Matrix4().translationValues(this.unlinkedOffset.dx, this.unlinkedOffset.dy, 0));
transform.multiply(new Matrix4().translationValues(unlinkedOffset.dx, unlinkedOffset.dy, 0));
}
}

internal Path _debugTransformedClipPath {
get {
ContainerLayer ancestor = this.parent;
ContainerLayer ancestor = parent;
Matrix4 matrix = new Matrix4().identity();
while (ancestor != null && ancestor.parent != null) {
ancestor.applyTransform(this, matrix);

return this.clipPath.transform(matrix.toMatrix3());
return clipPath.transform(matrix.toMatrix3());
}
}

2
com.unity.uiwidgets/Runtime/rendering/list_body.cs


protected override bool hitTestChildren(BoxHitTestResult result, Offset position = null) {
return this.defaultHitTestChildren(result, position: position);
return defaultHitTestChildren(result, position: position);
}
}
}

8
com.unity.uiwidgets/Runtime/rendering/object.cs


new TransformLayer(effectiveTransform),
painter,
offset,
childPaintBounds: MatrixUtils.inverseTransformRect(effectiveTransform, this.estimatedBounds)
childPaintBounds: MatrixUtils.inverseTransformRect(effectiveTransform, estimatedBounds)
this.canvas.save();
this.canvas.concat(effectiveTransform.toMatrix3());
canvas.save();
canvas.concat(effectiveTransform.toMatrix3());
painter(this, offset);
canvas.restore();
}

}
public Matrix4 getTransformTo(RenderObject ancestor) {
D.assert(this.attached);
D.assert(attached);
if (ancestor == null) {
var rootNode = owner.rootNode;

138
com.unity.uiwidgets/Runtime/rendering/proxy_box.cs


}
public override bool hitTest(BoxHitTestResult result, Offset position = null) {
if (this._clipper != null) {
this._updateClip();
D.assert(this._clip != null);
if (!this._clip.contains(position)) {
if (_clipper != null) {
_updateClip();
D.assert(_clip != null);
if (!_clip.contains(position)) {
return false;
}
}

}
public override bool hitTest(BoxHitTestResult result, Offset position = null) {
if (this._clipper != null) {
this._updateClip();
D.assert(this._clip != null);
if (!this._clip.contains(position)) {
if (_clipper != null) {
_updateClip();
D.assert(_clip != null);
if (!_clip.contains(position)) {
return false;
}
}

}
public override bool hitTest(BoxHitTestResult result, Offset position = null) {
if (this._clipper != null) {
this._updateClip();
D.assert(this._clip != null);
if (!this._clip.contains(position)) {
if (_clipper != null) {
_updateClip();
D.assert(_clip != null);
if (!_clip.contains(position)) {
return false;
}
}

}
public override bool hitTest(BoxHitTestResult result, Offset position = null) {
if (this._clipper != null) {
this._updateClip();
D.assert(this._clip != null);
if (!this._clip.contains(position)) {
if (_clipper != null) {
_updateClip();
D.assert(_clip != null);
if (!_clip.contains(position)) {
return false;
}
}

Matrix4 _transform;
public void setIdentity() {
this._transform = new Matrix4().identity();
this.markNeedsPaint();
_transform = new Matrix4().identity();
markNeedsPaint();
}
public void rotateX(float degrees) {

}
public void rotateZ(float degrees) {
this._transform.rotateZ(degrees);
this.markNeedsPaint();
_transform.rotateZ(degrees);
markNeedsPaint();
this._transform.translationValues(x, y, 0);
this.markNeedsPaint();
_transform.translationValues(x, y, 0);
markNeedsPaint();
this._transform.scale(x, y, 1);
this.markNeedsPaint();
_transform.scale(x, y, 1);
markNeedsPaint();
}
Matrix4 _effectiveTransform {

}
var result = new Matrix4().identity();
if (this._origin != null) {
result.translate(this._origin.dx, this._origin.dy);
if (_origin != null) {
result.translate(_origin.dx, _origin.dy);
translation = resolvedAlignment.alongSize(this.size);
translation = resolvedAlignment.alongSize(size);
result.multiply(this._transform);
result.multiply(_transform);
if (this._origin != null) {
result.translate(-this._origin.dx, -this._origin.dy);
if (_origin != null) {
result.translate(-_origin.dx, -_origin.dy);
}
return result;

public override bool hitTest(BoxHitTestResult result, Offset position = null) {
return this.hitTestChildren(result, position: position);
return hitTestChildren(result, position: position);
D.assert(!this.transformHitTests || this._effectiveTransform != null);
D.assert(!transformHitTests || _effectiveTransform != null);
transform: this.transformHitTests ? this._effectiveTransform : null,
transform: transformHitTests ? _effectiveTransform : null,
position: position,
hitTest: (BoxHitTestResult resultIn, Offset positionIn) => {
return base.hitTestChildren(resultIn, position: positionIn);

}
public override void applyPaintTransform(RenderObject child, Matrix4 transform) {
transform.multiply(this._effectiveTransform);
transform.multiply(_effectiveTransform);
properties.add(new DiagnosticsProperty<Matrix4>("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));
properties.add(new DiagnosticsProperty<Matrix4>("transform matrix", _transform));
properties.add(new DiagnosticsProperty<Offset>("origin", origin));
properties.add(new DiagnosticsProperty<Alignment>("alignment", alignment));
properties.add(new DiagnosticsProperty<bool>("transformHitTests", transformHitTests));
}
}

return;
}
if (this.child == null) {
this._hasVisualOverflow = false;
this._transform = new Matrix4().identity();
if (child == null) {
_hasVisualOverflow = false;
_transform = new Matrix4().identity();
}
else {
_resolve();

float scaleY = sizes.destination.height / sizes.source.height;
Rect sourceRect = this._resolvedAlignment.inscribe(sizes.source, Offset.zero & childSize);
Rect destinationRect = this._resolvedAlignment.inscribe(sizes.destination, Offset.zero & this.size);
this._hasVisualOverflow = sourceRect.width < childSize.width || sourceRect.height < childSize.height;
this._transform = new Matrix4().translationValues(destinationRect.left, destinationRect.top, 0);
this._transform.scale(scaleX, scaleY, 1);
this._transform.translate(-sourceRect.left, -sourceRect.top);
Rect sourceRect = _resolvedAlignment.inscribe(sizes.source, Offset.zero & childSize);
Rect destinationRect = _resolvedAlignment.inscribe(sizes.destination, Offset.zero & size);
_hasVisualOverflow = sourceRect.width < childSize.width || sourceRect.height < childSize.height;
_transform = new Matrix4().translationValues(destinationRect.left, destinationRect.top, 0);
_transform.scale(scaleX, scaleY, 1);
_transform.translate(-sourceRect.left, -sourceRect.top);
}
}

}
protected override bool hitTestChildren(BoxHitTestResult result, Offset position = null) {
if (this.size.isEmpty || this.child?.size?.isEmpty == true)
if (size.isEmpty || child?.size?.isEmpty == true)
this._updatePaintData();
_updatePaintData();
transform: this._transform,
transform: _transform,
position: position,
hitTest: (BoxHitTestResult resultIn, Offset positionIn) => {
return base.hitTestChildren(resultIn, position: positionIn);

public override void applyPaintTransform(RenderObject child, Matrix4 transform) {
if (this.size.isEmpty) {
if (size.isEmpty) {
this._updatePaintData();
transform.multiply(this._transform);
_updatePaintData();
transform.multiply(_transform);
}
}

Offset _translation;
public override bool hitTest(BoxHitTestResult result, Offset position) {
return this.hitTestChildren(result, position: position);
return hitTestChildren(result, position: position);
D.assert(!this.debugNeedsLayout);
D.assert(!debugNeedsLayout);
offset: this.transformHitTests
? new Offset(this.translation.dx * this.size.width, this.translation.dy * this.size.height)
offset: transformHitTests
? new Offset(translation.dx * size.width, translation.dy * size.height)
: null,
position: position,
hitTest: (BoxHitTestResult resultIn, Offset positionIn) => {

}
public override void applyPaintTransform(RenderObject child, Matrix4 transform) {
transform.translate(this.translation.dx * this.size.width,
this.translation.dy * this.size.height);
transform.translate(translation.dx * size.width,
translation.dy * size.height);
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {

return;
}
if (this.onPointerScroll != null && evt is PointerScrollEvent) {
this.onPointerScroll((PointerScrollEvent) evt);
if (onPointerScroll != null && evt is PointerScrollEvent) {
onPointerScroll((PointerScrollEvent) evt);
}
}

bool _ignoring;
public override bool hitTest(BoxHitTestResult result, Offset position = null) {
return this.ignoring ? false : base.hitTest(result, position: position);
return ignoring ? false : base.hitTest(result, position: position);
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {

}
public override bool hitTest(BoxHitTestResult result, Offset position) {
return !this.offstage && base.hitTest(result, position: position);
return !offstage && base.hitTest(result, position: position);
}
public override void paint(PaintingContext context, Offset offset) {

bool _absorbing;
public override bool hitTest(BoxHitTestResult result, Offset position) {
return this.absorbing
? this.size.contains(position)
return absorbing
? size.contains(position)
: base.hitTest(result, position: position);
}

new FollowerLayer _layer;
Matrix4 getCurrentTransform() {
return this._layer?.getLastTransform() ?? new Matrix4().identity();
return _layer?.getLastTransform() ?? new Matrix4().identity();
return this.hitTestChildren(result, position: position);
return hitTestChildren(result, position: position);
transform: this.getCurrentTransform(),
transform: getCurrentTransform(),
position: position,
hitTest: (BoxHitTestResult resultIn, Offset positionIn) => {
return base.hitTestChildren(resultIn, position: positionIn);

}
public override void applyPaintTransform(RenderObject child, Matrix4 transform) {
transform.multiply(this.getCurrentTransform());
transform.multiply(getCurrentTransform());
}
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {

4
com.unity.uiwidgets/Runtime/rendering/proxy_box.mixin.gen.cs


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

28
com.unity.uiwidgets/Runtime/rendering/rotated_box.cs


Matrix4 _paintTransform;
protected override void performLayout() {
this._paintTransform = null;
if (this.child != null) {
this.child.layout(this._isVertical ? this.constraints.flipped : this.constraints, parentUsesSize: true);
this.size = this._isVertical
? new Size(this.child.size.height, this.child.size.width)
: this.child.size;
this._paintTransform = new Matrix4().identity();
this._paintTransform.translate(this.size.width / 2.0f, this.size.height / 2.0f);
this._paintTransform.rotateZ(RotatedBoxUtils._kQuarterTurnsInRadians * (this.quarterTurns % 4));
this._paintTransform.translate(-this.child.size.width / 2.0f, -this.child.size.height / 2.0f);
_paintTransform = null;
if (child != null) {
child.layout(_isVertical ? constraints.flipped : constraints, parentUsesSize: true);
size = _isVertical
? new Size(child.size.height, child.size.width)
: child.size;
_paintTransform = new Matrix4().identity();
_paintTransform.translate(size.width / 2.0f, size.height / 2.0f);
_paintTransform.rotateZ(RotatedBoxUtils._kQuarterTurnsInRadians * (quarterTurns % 4));
_paintTransform.translate(-child.size.width / 2.0f, -child.size.height / 2.0f);
}
else {
performResize();

}
return result.addWithPaintTransform(
transform: this._paintTransform,
transform: _paintTransform,
return this.child.hitTest(resultIn, position: positionIn);
return child.hitTest(resultIn, position: positionIn);
}
);
}

}
public override void applyPaintTransform(RenderObject child, Matrix4 transform) {
if (this._paintTransform != null) {
transform.multiply(this._paintTransform);
if (_paintTransform != null) {
transform.multiply(_paintTransform);
}
base.applyPaintTransform(child, transform);

12
com.unity.uiwidgets/Runtime/rendering/shifted_box.cs


}
protected override bool hitTestChildren(BoxHitTestResult result, Offset position = null) {
if (this.child != null) {
var childParentData = (BoxParentData) this.child.parentData;
if (child != null) {
var childParentData = (BoxParentData) child.parentData;
return this.child.hitTest(resultIn, position: transformed);
return child.hitTest(resultIn, position: transformed);
}
);
}

path.lineTo(x += -headSize, y += -headSize);
path.lineTo(x += 0.0f, y += headSize);
path.moveTo(x = offset.dx + this.size.width, y = offset.dy + this.size.height / 2.0f);
path.moveTo(x = offset.dx + size.width, y = offset.dy + size.height / 2.0f);
path.lineTo(x += -childParentData.offset.dx + headSize, y += 0.0f);
path.lineTo(x += 0.0f, y += headSize);
path.lineTo(x += -headSize, y += -headSize);

context.pushClipRect(needsCompositing, offset, Offset.zero & size, base.paint);
D.assert(() => {
DebugOverflowIndicatorMixin.paintOverflowIndicator(this, context, offset, this._overflowContainerRect,
this._overflowChildRect);
DebugOverflowIndicatorMixin.paintOverflowIndicator(this, context, offset, _overflowContainerRect,
_overflowChildRect);
return true;
});
}

30
com.unity.uiwidgets/Runtime/rendering/sliver.cs


D.assert(crossAxisPosition != null);
D.assert(hitTest != null);
if (paintOffset != null) {
this.pushTransform(new Matrix4().translationValues(-paintOffset.dx, -paintOffset.dy, 0));
pushTransform(new Matrix4().translationValues(-paintOffset.dx, -paintOffset.dy, 0));
}
bool isHit = hitTest(
this,

if (paintOffset != null) {
this.popTransform();
popTransform();
}
return isHit;
}

public Offset paintOffset = Offset.zero;
public void applyPaintTransform(Matrix4 transform) {
transform.translate(this.paintOffset.dx, this.paintOffset.dy);
transform.translate(paintOffset.dx, paintOffset.dy);
}
public override string ToString() {

}
public bool hitTest(SliverHitTestResult result, float mainAxisPosition = 0, float crossAxisPosition = 0) {
if (mainAxisPosition >= 0.0f && mainAxisPosition < this.geometry.hitTestExtent &&
crossAxisPosition >= 0.0f && crossAxisPosition < this.constraints.crossAxisExtent) {
if (this.hitTestChildren(result, mainAxisPosition: mainAxisPosition,
if (mainAxisPosition >= 0.0f && mainAxisPosition < geometry.hitTestExtent &&
crossAxisPosition >= 0.0f && crossAxisPosition < constraints.crossAxisExtent) {
if (hitTestChildren(result, mainAxisPosition: mainAxisPosition,
crossAxisPosition: crossAxisPosition) ||
hitTestSelf(mainAxisPosition: mainAxisPosition, crossAxisPosition: crossAxisPosition)) {
result.add(new SliverHitTestEntry(

}
public override void applyPaintTransform(RenderObject child, Matrix4 transform) {
D.assert(() => { throw new UIWidgetsError(this.GetType() + " does not implement applyPaintTransform."); });
D.assert(() => { throw new UIWidgetsError(GetType() + " does not implement applyPaintTransform."); });
}
internal Size getAbsoluteSizeRelativeToOrigin() {

}
protected Size getAbsoluteSize() {
D.assert(this.geometry != null);
D.assert(!this.debugNeedsLayout);
switch (this.constraints.axisDirection) {
D.assert(geometry != null);
D.assert(!debugNeedsLayout);
switch (constraints.axisDirection) {
return new Size(this.constraints.crossAxisExtent, this.geometry.paintExtent);
return new Size(constraints.crossAxisExtent, geometry.paintExtent);
return new Size(this.geometry.paintExtent, this.constraints.crossAxisExtent);
return new Size(geometry.paintExtent, constraints.crossAxisExtent);
}
return null;
}

protected override bool hitTestChildren(SliverHitTestResult result, float mainAxisPosition = 0.0f,
float crossAxisPosition = 0.0f) {
D.assert(this.geometry.hitTestExtent > 0.0f);
if (this.child != null) {
return this.hitTestBoxChild(new BoxHitTestResult(result), this.child, mainAxisPosition: mainAxisPosition,
D.assert(geometry.hitTestExtent > 0.0f);
if (child != null) {
return this.hitTestBoxChild(new BoxHitTestResult(result), child, mainAxisPosition: mainAxisPosition,
crossAxisPosition: crossAxisPosition);
}

2
com.unity.uiwidgets/Runtime/rendering/sliver_multi_box_adaptor.cs


protected override bool hitTestChildren(SliverHitTestResult result, float mainAxisPosition = 0.0f,
float crossAxisPosition = 0.0f) {
RenderBox child = this.lastChild;
RenderBox child = lastChild;
BoxHitTestResult boxResult = new BoxHitTestResult(result);
while (child != null) {

10
com.unity.uiwidgets/Runtime/rendering/sliver_padding.cs


protected override bool hitTestChildren(SliverHitTestResult result, float mainAxisPosition = 0.0f,
float crossAxisPosition = 0.0f) {
if (this.child != null && this.child.geometry.hitTestExtent > 0.0) {
SliverPhysicalParentData childParentData = this.child.parentData as SliverPhysicalParentData;
if (child != null && child.geometry.hitTestExtent > 0.0) {
SliverPhysicalParentData childParentData = child.parentData as SliverPhysicalParentData;
mainAxisOffset: this.childMainAxisPosition(this.child),
crossAxisOffset: this.childCrossAxisPosition(this.child),
mainAxisOffset: childMainAxisPosition(child),
crossAxisOffset: childCrossAxisPosition(child),
hitTest: this.child.hitTest
hitTest: child.hitTest
);
}

6
com.unity.uiwidgets/Runtime/rendering/sliver_persistent_header.cs


}
protected override bool hitTestChildren(SliverHitTestResult result, float mainAxisPosition, float crossAxisPosition) {
D.assert(this.geometry.hitTestExtent > 0.0f);
if (this.child != null) {
return RenderSliverHelpers.hitTestBoxChild(this, new BoxHitTestResult(result), this.child, mainAxisPosition: mainAxisPosition,
D.assert(geometry.hitTestExtent > 0.0f);
if (child != null) {
return RenderSliverHelpers.hitTestBoxChild(this, new BoxHitTestResult(result), child, mainAxisPosition: mainAxisPosition,
crossAxisPosition: crossAxisPosition);
}

4
com.unity.uiwidgets/Runtime/rendering/stack.cs


}
protected override bool hitTestChildren(BoxHitTestResult result, Offset position = null) {
return this.defaultHitTestChildren(result, position: position);
return defaultHitTestChildren(result, position: position);
}
public virtual void paintStack(PaintingContext context, Offset offset) {

}
protected override bool hitTestChildren(BoxHitTestResult result, Offset position) {
if (this.firstChild == null || this.index == null) {
if (firstChild == null || index == null) {
return false;
}

24
com.unity.uiwidgets/Runtime/rendering/table.cs


if (tableWidth > maxWidthConstraint) {
float deficit = tableWidth - maxWidthConstraint;
int availableColumns = this.columns;
int availableColumns = columns;
//(Xingwei Zhu) this deficit is double and set to be 0.00000001f in flutter.
//since we use float by default, making it larger should make sense in most cases

}
protected override bool hitTestChildren(BoxHitTestResult result, Offset position = null) {
D.assert(this._children.Count == this.rows * this.columns);
for (int index = this._children.Count - 1; index >= 0; index--) {
RenderBox child = this._children[index];
D.assert(_children.Count == rows * columns);
for (int index = _children.Count - 1; index >= 0; index--) {
RenderBox child = _children[index];
if (child != null) {
BoxParentData childParentData = (BoxParentData) child.parentData;
bool isHit = result.addWithPaintOffset(

}
}
D.assert(this._rows == this._rowTops.Count - 1);
D.assert(this._columns == this._columnLefts.Count);
if (this.border != null) {
Rect borderRect = Rect.fromLTWH(offset.dx, offset.dy, this.size.width,
this._rowTops[this._rowTops.Count - 1]);
List<float> rows = this._rowTops.GetRange(1, this._rowTops.Count - 2);
List<float> columns = this._columnLefts.GetRange(1, this._columnLefts.Count - 1);
this.border.paint(context.canvas, borderRect, rows: rows, columns: columns);
D.assert(_rows == _rowTops.Count - 1);
D.assert(_columns == _columnLefts.Count);
if (border != null) {
Rect borderRect = Rect.fromLTWH(offset.dx, offset.dy, size.width,
_rowTops[_rowTops.Count - 1]);
List<float> rows = _rowTops.GetRange(1, _rowTops.Count - 2);
List<float> columns = _columnLefts.GetRange(1, _columnLefts.Count - 1);
border.paint(context.canvas, borderRect, rows: rows, columns: columns);
}
}

10
com.unity.uiwidgets/Runtime/rendering/view.cs


}
public bool hitTest(HitTestResult result, Offset position = null) {
if (this.child != null) {
this.child.hitTest(new BoxHitTestResult(result), position: position);
if (child != null) {
child.hitTest(new BoxHitTestResult(result), position: position);
}
result.add(new HitTestEntry(this));

}
public override void applyPaintTransform(RenderObject child, Matrix4 transform) {
transform.multiply(this._rootTransform);
transform.multiply(_rootTransform);
base.applyPaintTransform(child, transform);
}

public override Rect semanticBounds {
get {
D.assert(this._rootTransform != null);
return MatrixUtils.transformRect(this._rootTransform, Offset.zero & this.size);
D.assert(_rootTransform != null);
return MatrixUtils.transformRect(_rootTransform, Offset.zero & size);
}
}

10
com.unity.uiwidgets/Runtime/rendering/viewport.cs


}
SliverHitTestResult sliverResult = new SliverHitTestResult(result);
foreach (RenderSliver child in this.childrenInHitTestOrder) {
foreach (RenderSliver child in childrenInHitTestOrder) {
this.applyPaintTransform(child, transform);
applyPaintTransform(child, transform);
bool isHit = result.addWithPaintTransform(
transform: transform,
position: null, // Manually adapting from box to sliver position below.

mainAxisPosition: this.computeChildMainAxisPosition(child, mainAxisPosition),
mainAxisPosition: computeChildMainAxisPosition(child, mainAxisPosition),
crossAxisPosition: crossAxisPosition
);
}

float offsetDifference = this.offset.pixels - targetOffset;
transform = target.getTransformTo(this);
this.applyPaintTransform(child, transform);
applyPaintTransform(child, transform);
Rect targetRect = MatrixUtils.transformRect(transform, rect);
switch (axisDirection) {

public override void applyPaintTransform(RenderObject child, Matrix4 transform) {
D.assert(child != null);
Offset offset = this.paintOffsetOf((RenderSliver) child);
Offset offset = paintOffsetOf((RenderSliver) child);
transform.translate(offset.dx, offset.dy);
}

2
com.unity.uiwidgets/Runtime/rendering/wrap.cs


}
protected override bool hitTestChildren(BoxHitTestResult result, Offset position = null) {
return this.defaultHitTestChildren(result, position: position);
return defaultHitTestChildren(result, position: position);
}
public override void paint(PaintingContext context, Offset offset) {

890
com.unity.uiwidgets/Runtime/ui/Matrix4.cs


}
public Matrix4() {
this._m4storage = new float[16];
_m4storage = new float[16];
this._m4storage = new float[16];
this.setFrom(other);
_m4storage = new float[16];
setFrom(other);
}
public static Matrix4 tryInvert(Matrix4 other) {

float arg13,
float arg14,
float arg15) {
this._m4storage = new float[16];
this.setValues(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9,
_m4storage = new float[16];
setValues(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9,
arg10, arg11, arg12, arg13, arg14, arg15);
}

float arg13,
float arg14,
float arg15) {
this.setValues(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9,
setValues(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9,
this.setIdentity();
setIdentity();
double determinant = this.copyInverse(other);
double determinant = copyInverse(other);
if (determinant == 0) {
// throw new Exception("input matrix cannot be inverted");
return null;

}
public Matrix4 copy(Matrix4 other) {
this.setFrom(other);
setFrom(other);
this.setFromTranslationRotationScale(translation, rotation, scale);
setFromTranslationRotationScale(translation, rotation, scale);
this._m4storage[entry + 3] = arg[3];
this._m4storage[entry + 2] = arg[2];
this._m4storage[entry + 1] = arg[1];
this._m4storage[entry + 0] = arg[0];
_m4storage[entry + 3] = arg[3];
_m4storage[entry + 2] = arg[2];
_m4storage[entry + 1] = arg[1];
_m4storage[entry + 0] = arg[0];
r[3] = this._m4storage[entry + 3];
r[2] = this._m4storage[entry + 2];
r[1] = this._m4storage[entry + 1];
r[0] = this._m4storage[entry + 0];
r[3] = _m4storage[entry + 3];
r[2] = _m4storage[entry + 2];
r[1] = _m4storage[entry + 1];
r[0] = _m4storage[entry + 0];
this._m4storage[this.index(row, 0)] = arg[0];
this._m4storage[this.index(row, 1)] = arg[1];
this._m4storage[this.index(row, 2)] = arg[2];
this._m4storage[this.index(row, 3)] = arg[3];
_m4storage[index(row, 0)] = arg[0];
_m4storage[index(row, 1)] = arg[1];
_m4storage[index(row, 2)] = arg[2];
_m4storage[index(row, 3)] = arg[3];
r[0] = this._m4storage[this.index(row, 0)];
r[1] = this._m4storage[this.index(row, 1)];
r[2] = this._m4storage[this.index(row, 2)];
r[3] = this._m4storage[this.index(row, 3)];
r[0] = _m4storage[index(row, 0)];
r[1] = _m4storage[index(row, 1)];
r[2] = _m4storage[index(row, 2)];
r[3] = _m4storage[index(row, 3)];
return r;
}

void setFromTranslationRotationScale(
Vector3 translation, Quaternion rotation, Vector3 scale) {
this.setFromTranslationRotation(translation, rotation);
setFromTranslationRotation(translation, rotation);
this.scale(scale);
}

float wy = w * y2;
float wz = w * z2;
this._m4storage[0] = 1.0f - (yy + zz);
this._m4storage[1] = xy + wz;
this._m4storage[2] = xz - wy;
this._m4storage[3] = 0;
this._m4storage[4] = xy - wz;
this._m4storage[5] = 1.0f - (xx + zz);
this._m4storage[6] = yz + wx;
this._m4storage[7] = 0;
this._m4storage[8] = xz + wy;
this._m4storage[9] = yz - wx;
this._m4storage[10] = 1.0f - (xx + yy);
this._m4storage[11] = 0;
this._m4storage[12] = arg0[0];
this._m4storage[13] = arg0[1];
this._m4storage[14] = arg0[2];
this._m4storage[15] = 1.0f;
_m4storage[0] = 1.0f - (yy + zz);
_m4storage[1] = xy + wz;
_m4storage[2] = xz - wy;
_m4storage[3] = 0;
_m4storage[4] = xy - wz;
_m4storage[5] = 1.0f - (xx + zz);
_m4storage[6] = yz + wx;
_m4storage[7] = 0;
_m4storage[8] = xz + wy;
_m4storage[9] = yz - wx;
_m4storage[10] = 1.0f - (xx + yy);
_m4storage[11] = 0;
_m4storage[12] = arg0[0];
_m4storage[13] = arg0[1];
_m4storage[14] = arg0[2];
_m4storage[15] = 1.0f;
this._m4storage[15] = arg[15];
this._m4storage[14] = arg[14];
this._m4storage[13] = arg[13];
this._m4storage[12] = arg[12];
this._m4storage[11] = arg[11];
this._m4storage[10] = arg[10];
this._m4storage[9] = arg[9];
this._m4storage[8] = arg[8];
this._m4storage[7] = arg[7];
this._m4storage[6] = arg[6];
this._m4storage[5] = arg[5];
this._m4storage[4] = arg[4];
this._m4storage[3] = arg[3];
this._m4storage[2] = arg[2];
this._m4storage[1] = arg[1];
this._m4storage[0] = arg[0];
_m4storage[15] = arg[15];
_m4storage[14] = arg[14];
_m4storage[13] = arg[13];
_m4storage[12] = arg[12];
_m4storage[11] = arg[11];
_m4storage[10] = arg[10];
_m4storage[9] = arg[9];
_m4storage[8] = arg[8];
_m4storage[7] = arg[7];
_m4storage[6] = arg[6];
_m4storage[5] = arg[5];
_m4storage[4] = arg[4];
_m4storage[3] = arg[3];
_m4storage[2] = arg[2];
_m4storage[1] = arg[1];
_m4storage[0] = arg[0];
}
void setValues(

float arg13,
float arg14,
float arg15) {
this._m4storage[15] = arg15;
this._m4storage[14] = arg14;
this._m4storage[13] = arg13;
this._m4storage[12] = arg12;
this._m4storage[11] = arg11;
this._m4storage[10] = arg10;
this._m4storage[9] = arg9;
this._m4storage[8] = arg8;
this._m4storage[7] = arg7;
this._m4storage[6] = arg6;
this._m4storage[5] = arg5;
this._m4storage[4] = arg4;
this._m4storage[3] = arg3;
this._m4storage[2] = arg2;
this._m4storage[1] = arg1;
this._m4storage[0] = arg0;
_m4storage[15] = arg15;
_m4storage[14] = arg14;
_m4storage[13] = arg13;
_m4storage[12] = arg12;
_m4storage[11] = arg11;
_m4storage[10] = arg10;
_m4storage[9] = arg9;
_m4storage[8] = arg8;
_m4storage[7] = arg7;
_m4storage[6] = arg6;
_m4storage[5] = arg5;
_m4storage[4] = arg4;
_m4storage[3] = arg3;
_m4storage[2] = arg2;
_m4storage[1] = arg1;
_m4storage[0] = arg0;
this._m4storage[0] = 0;
this._m4storage[1] = 0;
this._m4storage[2] = 0;
this._m4storage[3] = 0;
this._m4storage[4] = 0;
this._m4storage[5] = 0;
this._m4storage[6] = 0;
this._m4storage[7] = 0;
this._m4storage[8] = 0;
this._m4storage[9] = 0;
this._m4storage[10] = 0;
this._m4storage[11] = 0;
this._m4storage[12] = 0;
this._m4storage[13] = 0;
this._m4storage[14] = 0;
this._m4storage[15] = 0;
_m4storage[0] = 0;
_m4storage[1] = 0;
_m4storage[2] = 0;
_m4storage[3] = 0;
_m4storage[4] = 0;
_m4storage[5] = 0;
_m4storage[6] = 0;
_m4storage[7] = 0;
_m4storage[8] = 0;
_m4storage[9] = 0;
_m4storage[10] = 0;
_m4storage[11] = 0;
_m4storage[12] = 0;
_m4storage[13] = 0;
_m4storage[14] = 0;
_m4storage[15] = 0;
this._m4storage[0] = 1;
this._m4storage[1] = 0;
this._m4storage[2] = 0;
this._m4storage[3] = 0;
this._m4storage[4] = 0;
this._m4storage[5] = 1;
this._m4storage[6] = 0;
this._m4storage[7] = 0;
this._m4storage[8] = 0;
this._m4storage[9] = 0;
this._m4storage[10] = 1;
this._m4storage[11] = 0;
this._m4storage[12] = 0;
this._m4storage[13] = 0;
this._m4storage[14] = 0;
this._m4storage[15] = 1;
_m4storage[0] = 1;
_m4storage[1] = 0;
_m4storage[2] = 0;
_m4storage[3] = 0;
_m4storage[4] = 0;
_m4storage[5] = 1;
_m4storage[6] = 0;
_m4storage[7] = 0;
_m4storage[8] = 0;
_m4storage[9] = 0;
_m4storage[10] = 1;
_m4storage[11] = 0;
_m4storage[12] = 0;
_m4storage[13] = 0;
_m4storage[14] = 0;
_m4storage[15] = 1;
this[0] = this._m4storage[0].abs();
this[1] = this._m4storage[1].abs();
this[2] = this._m4storage[2].abs();
this[3] = this._m4storage[3].abs();
this[4] = this._m4storage[4].abs();
this[5] = this._m4storage[5].abs();
this[6] = this._m4storage[6].abs();
this[7] = this._m4storage[7].abs();
this[8] = this._m4storage[8].abs();
this[9] = this._m4storage[9].abs();
this[10] = this._m4storage[10].abs();
this[11] = this._m4storage[11].abs();
this[12] = this._m4storage[12].abs();
this[13] = this._m4storage[13].abs();
this[14] = this._m4storage[14].abs();
this[15] = this._m4storage[15].abs();
this[0] = _m4storage[0].abs();
this[1] = _m4storage[1].abs();
this[2] = _m4storage[2].abs();
this[3] = _m4storage[3].abs();
this[4] = _m4storage[4].abs();
this[5] = _m4storage[5].abs();
this[6] = _m4storage[6].abs();
this[7] = _m4storage[7].abs();
this[8] = _m4storage[8].abs();
this[9] = _m4storage[9].abs();
this[10] = _m4storage[10].abs();
this[11] = _m4storage[11].abs();
this[12] = _m4storage[12].abs();
this[13] = _m4storage[13].abs();
this[14] = _m4storage[14].abs();
this[15] = _m4storage[15].abs();
this._m4storage[0] * this._m4storage[5] - this._m4storage[1] * this._m4storage[4];
_m4storage[0] * _m4storage[5] - _m4storage[1] * _m4storage[4];
this._m4storage[0] * this._m4storage[6] - this._m4storage[2] * this._m4storage[4];
_m4storage[0] * _m4storage[6] - _m4storage[2] * _m4storage[4];
this._m4storage[0] * this._m4storage[7] - this._m4storage[3] * this._m4storage[4];
_m4storage[0] * _m4storage[7] - _m4storage[3] * _m4storage[4];
this._m4storage[1] * this._m4storage[6] - this._m4storage[2] * this._m4storage[5];
_m4storage[1] * _m4storage[6] - _m4storage[2] * _m4storage[5];
this._m4storage[1] * this._m4storage[7] - this._m4storage[3] * this._m4storage[5];
_m4storage[1] * _m4storage[7] - _m4storage[3] * _m4storage[5];
this._m4storage[2] * this._m4storage[7] - this._m4storage[3] * this._m4storage[6];
float det3_201_012 = this._m4storage[8] * det2_01_12 -
this._m4storage[9] * det2_01_02 +
this._m4storage[10] * det2_01_01;
float det3_201_013 = this._m4storage[8] * det2_01_13 -
this._m4storage[9] * det2_01_03 +
this._m4storage[11] * det2_01_01;
float det3_201_023 = this._m4storage[8] * det2_01_23 -
this._m4storage[10] * det2_01_03 +
this._m4storage[11] * det2_01_02;
float det3_201_123 = this._m4storage[9] * det2_01_23 -
this._m4storage[10] * det2_01_13 +
this._m4storage[11] * det2_01_12;
return -det3_201_123 * this._m4storage[12] +
det3_201_023 * this._m4storage[13] -
det3_201_013 * this._m4storage[14] +
det3_201_012 * this._m4storage[15];
_m4storage[2] * _m4storage[7] - _m4storage[3] * _m4storage[6];
float det3_201_012 = _m4storage[8] * det2_01_12 -
_m4storage[9] * det2_01_02 +
_m4storage[10] * det2_01_01;
float det3_201_013 = _m4storage[8] * det2_01_13 -
_m4storage[9] * det2_01_03 +
_m4storage[11] * det2_01_01;
float det3_201_023 = _m4storage[8] * det2_01_23 -
_m4storage[10] * det2_01_03 +
_m4storage[11] * det2_01_02;
float det3_201_123 = _m4storage[9] * det2_01_23 -
_m4storage[10] * det2_01_13 +
_m4storage[11] * det2_01_12;
return -det3_201_123 * _m4storage[12] +
det3_201_023 * _m4storage[13] -
det3_201_013 * _m4storage[14] +
det3_201_012 * _m4storage[15];
float det = this.determinant();
float det = determinant();
if (det == 0) {
return 0;
}

float ky;
float kz;
ix = invDet *
(this._m4storage[5] * this._m4storage[10] - this._m4storage[6] * this._m4storage[9]);
(_m4storage[5] * _m4storage[10] - _m4storage[6] * _m4storage[9]);
(this._m4storage[2] * this._m4storage[9] - this._m4storage[1] * this._m4storage[10]);
(_m4storage[2] * _m4storage[9] - _m4storage[1] * _m4storage[10]);
(this._m4storage[1] * this._m4storage[6] - this._m4storage[2] * this._m4storage[5]);
(_m4storage[1] * _m4storage[6] - _m4storage[2] * _m4storage[5]);
(this._m4storage[6] * this._m4storage[8] - this._m4storage[4] * this._m4storage[10]);
(_m4storage[6] * _m4storage[8] - _m4storage[4] * _m4storage[10]);
(this._m4storage[0] * this._m4storage[10] - this._m4storage[2] * this._m4storage[8]);
(_m4storage[0] * _m4storage[10] - _m4storage[2] * _m4storage[8]);
(this._m4storage[2] * this._m4storage[4] - this._m4storage[0] * this._m4storage[6]);
(_m4storage[2] * _m4storage[4] - _m4storage[0] * _m4storage[6]);
(this._m4storage[4] * this._m4storage[9] - this._m4storage[5] * this._m4storage[8]);
(_m4storage[4] * _m4storage[9] - _m4storage[5] * _m4storage[8]);
(this._m4storage[1] * this._m4storage[8] - this._m4storage[0] * this._m4storage[9]);
(_m4storage[1] * _m4storage[8] - _m4storage[0] * _m4storage[9]);
(this._m4storage[0] * this._m4storage[5] - this._m4storage[1] * this._m4storage[4]);
this._m4storage[0] = ix;
this._m4storage[1] = iy;
this._m4storage[2] = iz;
this._m4storage[4] = jx;
this._m4storage[5] = jy;
this._m4storage[6] = jz;
this._m4storage[8] = kx;
this._m4storage[9] = ky;
this._m4storage[10] = kz;
(_m4storage[0] * _m4storage[5] - _m4storage[1] * _m4storage[4]);
_m4storage[0] = ix;
_m4storage[1] = iy;
_m4storage[2] = iz;
_m4storage[4] = jx;
_m4storage[5] = jy;
_m4storage[6] = jz;
_m4storage[8] = kx;
_m4storage[9] = ky;
_m4storage[10] = kz;
float x_ = (this._m4storage[0] * arg[0]) +
(this._m4storage[4] * arg[1]) +
(this._m4storage[8] * arg[2]) +
(this._m4storage[12] * arg[3]);
float y_ = (this._m4storage[1] * arg[0]) +
(this._m4storage[5] * arg[1]) +
(this._m4storage[9] * arg[2]) +
(this._m4storage[13] * arg[3]);
float z_ = (this._m4storage[2] * arg[0]) +
(this._m4storage[6] * arg[1]) +
(this._m4storage[10] * arg[2]) +
(this._m4storage[14] * arg[3]);
float w_ = (this._m4storage[3] * arg[0]) +
(this._m4storage[7] * arg[1]) +
(this._m4storage[11] * arg[2]) +
(this._m4storage[15] * arg[3]);
float x_ = (_m4storage[0] * arg[0]) +
(_m4storage[4] * arg[1]) +
(_m4storage[8] * arg[2]) +
(_m4storage[12] * arg[3]);
float y_ = (_m4storage[1] * arg[0]) +
(_m4storage[5] * arg[1]) +
(_m4storage[9] * arg[2]) +
(_m4storage[13] * arg[3]);
float z_ = (_m4storage[2] * arg[0]) +
(_m4storage[6] * arg[1]) +
(_m4storage[10] * arg[2]) +
(_m4storage[14] * arg[3]);
float w_ = (_m4storage[3] * arg[0]) +
(_m4storage[7] * arg[1]) +
(_m4storage[11] * arg[2]) +
(_m4storage[15] * arg[3]);
arg[0] = x_;
arg[1] = y_;
arg[2] = z_;

public Vector3 perspectiveTransform(Vector3 arg) {
float x_ = (this._m4storage[0] * arg[0]) +
(this._m4storage[4] * arg[1]) +
(this._m4storage[8] * arg[2]) +
this._m4storage[12];
float y_ = (this._m4storage[1] * arg[0]) +
(this._m4storage[5] * arg[1]) +
(this._m4storage[9] * arg[2]) +
this._m4storage[13];
float z_ = (this._m4storage[2] * arg[0]) +
(this._m4storage[6] * arg[1]) +
(this._m4storage[10] * arg[2]) +
this._m4storage[14];
float x_ = (_m4storage[0] * arg[0]) +
(_m4storage[4] * arg[1]) +
(_m4storage[8] * arg[2]) +
_m4storage[12];
float y_ = (_m4storage[1] * arg[0]) +
(_m4storage[5] * arg[1]) +
(_m4storage[9] * arg[2]) +
_m4storage[13];
float z_ = (_m4storage[2] * arg[0]) +
(_m4storage[6] * arg[1]) +
(_m4storage[10] * arg[2]) +
_m4storage[14];
((this._m4storage[3] * arg[0]) +
(this._m4storage[7] * arg[1]) +
(this._m4storage[11] * arg[2]) +
this._m4storage[15]);
((_m4storage[3] * arg[0]) +
(_m4storage[7] * arg[1]) +
(_m4storage[11] * arg[2]) +
_m4storage[15]);
arg[0] = x_ * w_;
arg[1] = y_ * w_;
arg[2] = z_ * w_;

public void translate(float tx, float ty = 0, float tz = 0, float tw = 1) {
float t1 = this._m4storage[0] * tx +
this._m4storage[4] * ty +
this._m4storage[8] * tz +
this._m4storage[12] * tw;
float t2 = this._m4storage[1] * tx +
this._m4storage[5] * ty +
this._m4storage[9] * tz +
this._m4storage[13] * tw;
float t3 = this._m4storage[2] * tx +
this._m4storage[6] * ty +
this._m4storage[10] * tz +
this._m4storage[14] * tw;
float t4 = this._m4storage[3] * tx +
this._m4storage[7] * ty +
this._m4storage[11] * tz +
this._m4storage[15] * tw;
this._m4storage[12] = t1;
this._m4storage[13] = t2;
this._m4storage[14] = t3;
this._m4storage[15] = t4;
float t1 = _m4storage[0] * tx +
_m4storage[4] * ty +
_m4storage[8] * tz +
_m4storage[12] * tw;
float t2 = _m4storage[1] * tx +
_m4storage[5] * ty +
_m4storage[9] * tz +
_m4storage[13] * tw;
float t3 = _m4storage[2] * tx +
_m4storage[6] * ty +
_m4storage[10] * tz +
_m4storage[14] * tw;
float t4 = _m4storage[3] * tx +
_m4storage[7] * ty +
_m4storage[11] * tz +
_m4storage[15] * tw;
_m4storage[12] = t1;
_m4storage[13] = t2;
_m4storage[14] = t3;
_m4storage[15] = t4;
this._m4storage[15] = 1.0f;
this.setRotationX(radians);
_m4storage[15] = 1.0f;
setRotationX(radians);
this._m4storage[15] = 1.0f;
this.setRotationY(radians);
_m4storage[15] = 1.0f;
setRotationY(radians);
this._m4storage[15] = 1.0f;
this.setRotationZ(radians);
_m4storage[15] = 1.0f;
setRotationZ(radians);
this._m4storage[15] = 1.0f;
this.setRotationZ(radians, px, py);
_m4storage[15] = 1.0f;
setRotationZ(radians, px, py);
this._m4storage[15] = 1;
this._m4storage[10] = z;
this._m4storage[5] = y;
this._m4storage[0] = x;
_m4storage[15] = 1;
_m4storage[10] = z;
_m4storage[5] = y;
_m4storage[0] = x;
this._m4storage[0] *= sx;
this._m4storage[1] *= sx;
this._m4storage[2] *= sx;
this._m4storage[3] *= sx;
this._m4storage[4] *= sy;
this._m4storage[5] *= sy;
this._m4storage[6] *= sy;
this._m4storage[7] *= sy;
this._m4storage[8] *= sz;
this._m4storage[9] *= sz;
this._m4storage[10] *= sz;
this._m4storage[11] *= sz;
this._m4storage[12] *= sw;
this._m4storage[13] *= sw;
this._m4storage[14] *= sw;
this._m4storage[15] *= sw;
_m4storage[0] *= sx;
_m4storage[1] *= sx;
_m4storage[2] *= sx;
_m4storage[3] *= sx;
_m4storage[4] *= sy;
_m4storage[5] *= sy;
_m4storage[6] *= sy;
_m4storage[7] *= sy;
_m4storage[8] *= sz;
_m4storage[9] *= sz;
_m4storage[10] *= sz;
_m4storage[11] *= sz;
_m4storage[12] *= sw;
_m4storage[13] *= sw;
_m4storage[14] *= sw;
_m4storage[15] *= sw;
}
public void scale(Vector3 s) {

float sw = 1;
this._m4storage[0] *= sx;
this._m4storage[1] *= sx;
this._m4storage[2] *= sx;
this._m4storage[3] *= sx;
this._m4storage[4] *= sy;
this._m4storage[5] *= sy;
this._m4storage[6] *= sy;
this._m4storage[7] *= sy;
this._m4storage[8] *= sz;
this._m4storage[9] *= sz;
this._m4storage[10] *= sz;
this._m4storage[11] *= sz;
this._m4storage[12] *= sw;
this._m4storage[13] *= sw;
this._m4storage[14] *= sw;
this._m4storage[15] *= sw;
_m4storage[0] *= sx;
_m4storage[1] *= sx;
_m4storage[2] *= sx;
_m4storage[3] *= sx;
_m4storage[4] *= sy;
_m4storage[5] *= sy;
_m4storage[6] *= sy;
_m4storage[7] *= sy;
_m4storage[8] *= sz;
_m4storage[9] *= sz;
_m4storage[10] *= sz;
_m4storage[11] *= sz;
_m4storage[12] *= sw;
_m4storage[13] *= sw;
_m4storage[14] *= sw;
_m4storage[15] *= sw;
var result = this.clone();
var result = clone();
this.identity();
this.setTranslationRaw(x, y, z);
identity();
setTranslationRaw(x, y, z);
return this;
}

float t1 = this._m4storage[4] * cosAngle + this._m4storage[8] * sinAngle;
float t2 = this._m4storage[5] * cosAngle + this._m4storage[9] * sinAngle;
float t3 = this._m4storage[6] * cosAngle + this._m4storage[10] * sinAngle;
float t4 = this._m4storage[7] * cosAngle + this._m4storage[11] * sinAngle;
float t5 = this._m4storage[4] * -sinAngle + this._m4storage[8] * cosAngle;
float t6 = this._m4storage[5] * -sinAngle + this._m4storage[9] * cosAngle;
float t7 = this._m4storage[6] * -sinAngle + this._m4storage[10] * cosAngle;
float t8 = this._m4storage[7] * -sinAngle + this._m4storage[11] * cosAngle;
this._m4storage[4] = t1;
this._m4storage[5] = t2;
this._m4storage[6] = t3;
this._m4storage[7] = t4;
this._m4storage[8] = t5;
this._m4storage[9] = t6;
this._m4storage[10] = t7;
this._m4storage[11] = t8;
float t1 = _m4storage[4] * cosAngle + _m4storage[8] * sinAngle;
float t2 = _m4storage[5] * cosAngle + _m4storage[9] * sinAngle;
float t3 = _m4storage[6] * cosAngle + _m4storage[10] * sinAngle;
float t4 = _m4storage[7] * cosAngle + _m4storage[11] * sinAngle;
float t5 = _m4storage[4] * -sinAngle + _m4storage[8] * cosAngle;
float t6 = _m4storage[5] * -sinAngle + _m4storage[9] * cosAngle;
float t7 = _m4storage[6] * -sinAngle + _m4storage[10] * cosAngle;
float t8 = _m4storage[7] * -sinAngle + _m4storage[11] * cosAngle;
_m4storage[4] = t1;
_m4storage[5] = t2;
_m4storage[6] = t3;
_m4storage[7] = t4;
_m4storage[8] = t5;
_m4storage[9] = t6;
_m4storage[10] = t7;
_m4storage[11] = t8;
float t1 = this._m4storage[0] * cosAngle + this._m4storage[8] * -sinAngle;
float t2 = this._m4storage[1] * cosAngle + this._m4storage[9] * -sinAngle;
float t3 = this._m4storage[2] * cosAngle + this._m4storage[10] * -sinAngle;
float t4 = this._m4storage[3] * cosAngle + this._m4storage[11] * -sinAngle;
float t5 = this._m4storage[0] * sinAngle + this._m4storage[8] * cosAngle;
float t6 = this._m4storage[1] * sinAngle + this._m4storage[9] * cosAngle;
float t7 = this._m4storage[2] * sinAngle + this._m4storage[10] * cosAngle;
float t8 = this._m4storage[3] * sinAngle + this._m4storage[11] * cosAngle;
this._m4storage[0] = t1;
this._m4storage[1] = t2;
this._m4storage[2] = t3;
this._m4storage[3] = t4;
this._m4storage[8] = t5;
this._m4storage[9] = t6;
this._m4storage[10] = t7;
this._m4storage[11] = t8;
float t1 = _m4storage[0] * cosAngle + _m4storage[8] * -sinAngle;
float t2 = _m4storage[1] * cosAngle + _m4storage[9] * -sinAngle;
float t3 = _m4storage[2] * cosAngle + _m4storage[10] * -sinAngle;
float t4 = _m4storage[3] * cosAngle + _m4storage[11] * -sinAngle;
float t5 = _m4storage[0] * sinAngle + _m4storage[8] * cosAngle;
float t6 = _m4storage[1] * sinAngle + _m4storage[9] * cosAngle;
float t7 = _m4storage[2] * sinAngle + _m4storage[10] * cosAngle;
float t8 = _m4storage[3] * sinAngle + _m4storage[11] * cosAngle;
_m4storage[0] = t1;
_m4storage[1] = t2;
_m4storage[2] = t3;
_m4storage[3] = t4;
_m4storage[8] = t5;
_m4storage[9] = t6;
_m4storage[10] = t7;
_m4storage[11] = t8;
float t1 = this._m4storage[0] * cosAngle + this._m4storage[4] * sinAngle;
float t2 = this._m4storage[1] * cosAngle + this._m4storage[5] * sinAngle;
float t3 = this._m4storage[2] * cosAngle + this._m4storage[6] * sinAngle;
float t4 = this._m4storage[3] * cosAngle + this._m4storage[7] * sinAngle;
float t5 = this._m4storage[0] * -sinAngle + this._m4storage[4] * cosAngle;
float t6 = this._m4storage[1] * -sinAngle + this._m4storage[5] * cosAngle;
float t7 = this._m4storage[2] * -sinAngle + this._m4storage[6] * cosAngle;
float t8 = this._m4storage[3] * -sinAngle + this._m4storage[7] * cosAngle;
this._m4storage[0] = t1;
this._m4storage[1] = t2;
this._m4storage[2] = t3;
this._m4storage[3] = t4;
this._m4storage[4] = t5;
this._m4storage[5] = t6;
this._m4storage[6] = t7;
this._m4storage[7] = t8;
float t1 = _m4storage[0] * cosAngle + _m4storage[4] * sinAngle;
float t2 = _m4storage[1] * cosAngle + _m4storage[5] * sinAngle;
float t3 = _m4storage[2] * cosAngle + _m4storage[6] * sinAngle;
float t4 = _m4storage[3] * cosAngle + _m4storage[7] * sinAngle;
float t5 = _m4storage[0] * -sinAngle + _m4storage[4] * cosAngle;
float t6 = _m4storage[1] * -sinAngle + _m4storage[5] * cosAngle;
float t7 = _m4storage[2] * -sinAngle + _m4storage[6] * cosAngle;
float t8 = _m4storage[3] * -sinAngle + _m4storage[7] * cosAngle;
_m4storage[0] = t1;
_m4storage[1] = t2;
_m4storage[2] = t3;
_m4storage[3] = t4;
_m4storage[4] = t5;
_m4storage[5] = t6;
_m4storage[6] = t7;
_m4storage[7] = t8;
float m00 = this._m4storage[0];
float m01 = this._m4storage[4];
float m02 = this._m4storage[8];
float m03 = this._m4storage[12];
float m10 = this._m4storage[1];
float m11 = this._m4storage[5];
float m12 = this._m4storage[9];
float m13 = this._m4storage[13];
float m20 = this._m4storage[2];
float m21 = this._m4storage[6];
float m22 = this._m4storage[10];
float m23 = this._m4storage[14];
float m30 = this._m4storage[3];
float m31 = this._m4storage[7];
float m32 = this._m4storage[11];
float m33 = this._m4storage[15];
float m00 = _m4storage[0];
float m01 = _m4storage[4];
float m02 = _m4storage[8];
float m03 = _m4storage[12];
float m10 = _m4storage[1];
float m11 = _m4storage[5];
float m12 = _m4storage[9];
float m13 = _m4storage[13];
float m20 = _m4storage[2];
float m21 = _m4storage[6];
float m22 = _m4storage[10];
float m23 = _m4storage[14];
float m30 = _m4storage[3];
float m31 = _m4storage[7];
float m32 = _m4storage[11];
float m33 = _m4storage[15];
float[] argStorage = arg._m4storage;
float n00 = argStorage[0];
float n01 = argStorage[4];

float n31 = argStorage[7];
float n32 = argStorage[11];
float n33 = argStorage[15];
this._m4storage[0] = (m00 * n00) + (m01 * n10) + (m02 * n20) + (m03 * n30);
this._m4storage[4] = (m00 * n01) + (m01 * n11) + (m02 * n21) + (m03 * n31);
this._m4storage[8] = (m00 * n02) + (m01 * n12) + (m02 * n22) + (m03 * n32);
this._m4storage[12] = (m00 * n03) + (m01 * n13) + (m02 * n23) + (m03 * n33);
this._m4storage[1] = (m10 * n00) + (m11 * n10) + (m12 * n20) + (m13 * n30);
this._m4storage[5] = (m10 * n01) + (m11 * n11) + (m12 * n21) + (m13 * n31);
this._m4storage[9] = (m10 * n02) + (m11 * n12) + (m12 * n22) + (m13 * n32);
this._m4storage[13] = (m10 * n03) + (m11 * n13) + (m12 * n23) + (m13 * n33);
this._m4storage[2] = (m20 * n00) + (m21 * n10) + (m22 * n20) + (m23 * n30);
this._m4storage[6] = (m20 * n01) + (m21 * n11) + (m22 * n21) + (m23 * n31);
this._m4storage[10] = (m20 * n02) + (m21 * n12) + (m22 * n22) + (m23 * n32);
this._m4storage[14] = (m20 * n03) + (m21 * n13) + (m22 * n23) + (m23 * n33);
this._m4storage[3] = (m30 * n00) + (m31 * n10) + (m32 * n20) + (m33 * n30);
this._m4storage[7] = (m30 * n01) + (m31 * n11) + (m32 * n21) + (m33 * n31);
this._m4storage[11] = (m30 * n02) + (m31 * n12) + (m32 * n22) + (m33 * n32);
this._m4storage[15] = (m30 * n03) + (m31 * n13) + (m32 * n23) + (m33 * n33);
_m4storage[0] = (m00 * n00) + (m01 * n10) + (m02 * n20) + (m03 * n30);
_m4storage[4] = (m00 * n01) + (m01 * n11) + (m02 * n21) + (m03 * n31);
_m4storage[8] = (m00 * n02) + (m01 * n12) + (m02 * n22) + (m03 * n32);
_m4storage[12] = (m00 * n03) + (m01 * n13) + (m02 * n23) + (m03 * n33);
_m4storage[1] = (m10 * n00) + (m11 * n10) + (m12 * n20) + (m13 * n30);
_m4storage[5] = (m10 * n01) + (m11 * n11) + (m12 * n21) + (m13 * n31);
_m4storage[9] = (m10 * n02) + (m11 * n12) + (m12 * n22) + (m13 * n32);
_m4storage[13] = (m10 * n03) + (m11 * n13) + (m12 * n23) + (m13 * n33);
_m4storage[2] = (m20 * n00) + (m21 * n10) + (m22 * n20) + (m23 * n30);
_m4storage[6] = (m20 * n01) + (m21 * n11) + (m22 * n21) + (m23 * n31);
_m4storage[10] = (m20 * n02) + (m21 * n12) + (m22 * n22) + (m23 * n32);
_m4storage[14] = (m20 * n03) + (m21 * n13) + (m22 * n23) + (m23 * n33);
_m4storage[3] = (m30 * n00) + (m31 * n10) + (m32 * n20) + (m33 * n30);
_m4storage[7] = (m30 * n01) + (m31 * n11) + (m32 * n21) + (m33 * n31);
_m4storage[11] = (m30 * n02) + (m31 * n12) + (m32 * n22) + (m33 * n32);
_m4storage[15] = (m30 * n03) + (m31 * n13) + (m32 * n23) + (m33 * n33);
v.Set(this._m4storage[0], this._m4storage[1], this._m4storage[2]);
v.Set(_m4storage[0], _m4storage[1], _m4storage[2]);
v.Set(this._m4storage[4], this._m4storage[5], this._m4storage[6]);
v.Set(_m4storage[4], _m4storage[5], _m4storage[6]);
v.Set(this._m4storage[8], this._m4storage[9], this._m4storage[10]);
v.Set(_m4storage[8], _m4storage[9], _m4storage[10]);
if (this.determinant() < 0) {
if (determinant() < 0) {
translation[0] = this._m4storage[12];
translation[1] = this._m4storage[13];
translation[2] = this._m4storage[14];
translation[0] = _m4storage[12];
translation[1] = _m4storage[13];
translation[2] = _m4storage[14];
float invSX = 1.0f / sx;
float invSY = 1.0f / sy;

}
void setTranslationRaw(float x, float y, float z) {
this._m4storage[14] = z;
this._m4storage[13] = y;
this._m4storage[12] = x;
_m4storage[14] = z;
_m4storage[13] = y;
_m4storage[12] = x;
this._m4storage[0] = 1.0f;
this._m4storage[1] = 0;
this._m4storage[2] = 0;
this._m4storage[4] = 0;
this._m4storage[5] = c;
this._m4storage[6] = s;
this._m4storage[8] = 0;
this._m4storage[9] = -s;
this._m4storage[10] = c;
this._m4storage[3] = 0;
this._m4storage[7] = 0;
this._m4storage[11] = 0;
_m4storage[0] = 1.0f;
_m4storage[1] = 0;
_m4storage[2] = 0;
_m4storage[4] = 0;
_m4storage[5] = c;
_m4storage[6] = s;
_m4storage[8] = 0;
_m4storage[9] = -s;
_m4storage[10] = c;
_m4storage[3] = 0;
_m4storage[7] = 0;
_m4storage[11] = 0;
this._m4storage[0] = c;
this._m4storage[1] = 0;
this._m4storage[2] = -s;
this._m4storage[4] = 0;
this._m4storage[5] = 1.0f;
this._m4storage[6] = 0;
this._m4storage[8] = s;
this._m4storage[9] = 0;
this._m4storage[10] = c;
this._m4storage[3] = 0;
this._m4storage[7] = 0;
this._m4storage[11] = 0;
_m4storage[0] = c;
_m4storage[1] = 0;
_m4storage[2] = -s;
_m4storage[4] = 0;
_m4storage[5] = 1.0f;
_m4storage[6] = 0;
_m4storage[8] = s;
_m4storage[9] = 0;
_m4storage[10] = c;
_m4storage[3] = 0;
_m4storage[7] = 0;
_m4storage[11] = 0;
this._m4storage[0] = c;
this._m4storage[1] = s;
this._m4storage[2] = 0;
this._m4storage[4] = -s;
this._m4storage[5] = c;
this._m4storage[6] = 0;
this._m4storage[8] = 0;
this._m4storage[9] = 0;
this._m4storage[10] = 1.0f;
this._m4storage[3] = 0;
this._m4storage[7] = 0;
this._m4storage[11] = 0;
_m4storage[0] = c;
_m4storage[1] = s;
_m4storage[2] = 0;
_m4storage[4] = -s;
_m4storage[5] = c;
_m4storage[6] = 0;
_m4storage[8] = 0;
_m4storage[9] = 0;
_m4storage[10] = 1.0f;
_m4storage[3] = 0;
_m4storage[7] = 0;
_m4storage[11] = 0;
this._m4storage[0] = c;
this._m4storage[1] = s;
this._m4storage[2] = 0;
this._m4storage[4] = -s;
this._m4storage[5] = c;
this._m4storage[6] = 0;
this._m4storage[8] = 0;
this._m4storage[9] = 0;
this._m4storage[10] = 1.0f;
this._m4storage[3] = 0;
this._m4storage[7] = 0;
this._m4storage[11] = 0;
this._m4storage[12] = s * py + (1 - c) * px;
this._m4storage[13] = -s * px + (1 - c) * py;
_m4storage[0] = c;
_m4storage[1] = s;
_m4storage[2] = 0;
_m4storage[4] = -s;
_m4storage[5] = c;
_m4storage[6] = 0;
_m4storage[8] = 0;
_m4storage[9] = 0;
_m4storage[10] = 1.0f;
_m4storage[3] = 0;
_m4storage[7] = 0;
_m4storage[11] = 0;
_m4storage[12] = s * py + (1 - c) * px;
_m4storage[13] = -s * px + (1 - c) * py;
public float invert() => this.copyInverse(this);
public float invert() => copyInverse(this);
float copyInverse(Matrix4 arg) {
float a00 = arg[0];

float det =
(b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06);
if (det == 0) {
this.setFrom(arg);
setFrom(arg);
this._m4storage[0] = (a11 * b11 - a12 * b10 + a13 * b09) * invDet;
this._m4storage[1] = (-a01 * b11 + a02 * b10 - a03 * b09) * invDet;
this._m4storage[2] = (a31 * b05 - a32 * b04 + a33 * b03) * invDet;
this._m4storage[3] = (-a21 * b05 + a22 * b04 - a23 * b03) * invDet;
this._m4storage[4] = (-a10 * b11 + a12 * b08 - a13 * b07) * invDet;
this._m4storage[5] = (a00 * b11 - a02 * b08 + a03 * b07) * invDet;
this._m4storage[6] = (-a30 * b05 + a32 * b02 - a33 * b01) * invDet;
this._m4storage[7] = (a20 * b05 - a22 * b02 + a23 * b01) * invDet;
this._m4storage[8] = (a10 * b10 - a11 * b08 + a13 * b06) * invDet;
this._m4storage[9] = (-a00 * b10 + a01 * b08 - a03 * b06) * invDet;
this._m4storage[10] = (a30 * b04 - a31 * b02 + a33 * b00) * invDet;
this._m4storage[11] = (-a20 * b04 + a21 * b02 - a23 * b00) * invDet;
this._m4storage[12] = (-a10 * b09 + a11 * b07 - a12 * b06) * invDet;
this._m4storage[13] = (a00 * b09 - a01 * b07 + a02 * b06) * invDet;
this._m4storage[14] = (-a30 * b03 + a31 * b01 - a32 * b00) * invDet;
this._m4storage[15] = (a20 * b03 - a21 * b01 + a22 * b00) * invDet;
_m4storage[0] = (a11 * b11 - a12 * b10 + a13 * b09) * invDet;
_m4storage[1] = (-a01 * b11 + a02 * b10 - a03 * b09) * invDet;
_m4storage[2] = (a31 * b05 - a32 * b04 + a33 * b03) * invDet;
_m4storage[3] = (-a21 * b05 + a22 * b04 - a23 * b03) * invDet;
_m4storage[4] = (-a10 * b11 + a12 * b08 - a13 * b07) * invDet;
_m4storage[5] = (a00 * b11 - a02 * b08 + a03 * b07) * invDet;
_m4storage[6] = (-a30 * b05 + a32 * b02 - a33 * b01) * invDet;
_m4storage[7] = (a20 * b05 - a22 * b02 + a23 * b01) * invDet;
_m4storage[8] = (a10 * b10 - a11 * b08 + a13 * b06) * invDet;
_m4storage[9] = (-a00 * b10 + a01 * b08 - a03 * b06) * invDet;
_m4storage[10] = (a30 * b04 - a31 * b02 + a33 * b00) * invDet;
_m4storage[11] = (-a20 * b04 + a21 * b02 - a23 * b00) * invDet;
_m4storage[12] = (-a10 * b09 + a11 * b07 - a12 * b06) * invDet;
_m4storage[13] = (a00 * b09 - a01 * b07 + a02 * b06) * invDet;
_m4storage[14] = (-a30 * b03 + a31 * b01 - a32 * b00) * invDet;
_m4storage[15] = (a20 * b03 - a21 * b01 + a22 * b00) * invDet;
return det;
}

D.assert((row >= 0) && (row < this.dimension));
D.assert((col >= 0) && (col < this.dimension));
D.assert((row >= 0) && (row < dimension));
D.assert((col >= 0) && (col < dimension));
return this._m4storage[this.index(row, col)];
return _m4storage[index(row, col)];
return this._m4storage[index];
return _m4storage[index];
this._m4storage[index] = value;
_m4storage[index] = value;
}
}

return true;
}
return (this._m4storage[0] == other._m4storage[0]) &&
(this._m4storage[1] == other._m4storage[1]) &&
(this._m4storage[2] == other._m4storage[2]) &&
(this._m4storage[3] == other._m4storage[3]) &&
(this._m4storage[4] == other._m4storage[4]) &&
(this._m4storage[5] == other._m4storage[5]) &&
(this._m4storage[6] == other._m4storage[6]) &&
(this._m4storage[7] == other._m4storage[7]) &&
(this._m4storage[8] == other._m4storage[8]) &&
(this._m4storage[9] == other._m4storage[9]) &&
(this._m4storage[10] == other._m4storage[10]) &&
(this._m4storage[11] == other._m4storage[11]) &&
(this._m4storage[12] == other._m4storage[12]) &&
(this._m4storage[13] == other._m4storage[13]) &&
(this._m4storage[14] == other._m4storage[14]) &&
(this._m4storage[15] == other._m4storage[15]);
return (_m4storage[0] == other._m4storage[0]) &&
(_m4storage[1] == other._m4storage[1]) &&
(_m4storage[2] == other._m4storage[2]) &&
(_m4storage[3] == other._m4storage[3]) &&
(_m4storage[4] == other._m4storage[4]) &&
(_m4storage[5] == other._m4storage[5]) &&
(_m4storage[6] == other._m4storage[6]) &&
(_m4storage[7] == other._m4storage[7]) &&
(_m4storage[8] == other._m4storage[8]) &&
(_m4storage[9] == other._m4storage[9]) &&
(_m4storage[10] == other._m4storage[10]) &&
(_m4storage[11] == other._m4storage[11]) &&
(_m4storage[12] == other._m4storage[12]) &&
(_m4storage[13] == other._m4storage[13]) &&
(_m4storage[14] == other._m4storage[14]) &&
(_m4storage[15] == other._m4storage[15]);
}
public override bool Equals(object obj) {

return true;
}
if (obj.GetType() != this.GetType()) {
if (obj.GetType() != GetType()) {
return this.Equals((Matrix4) obj);
return Equals((Matrix4) obj);
return (this._m4storage != null ? this._m4storage.GetHashCode() : 0);
return (_m4storage != null ? _m4storage.GetHashCode() : 0);
}
}
}

4
com.unity.uiwidgets/Runtime/ui2/painting.cs


List<Shadow> result = new List<Shadow>();
int commonLength = Math.Min(a.Count, b.Count);
for (int i = 0; i < commonLength; i += 1)
result.Add(Shadow.lerp(a[i], b[i], t));
result.Add(lerp(a[i], b[i], t));
for (int i = commonLength; i < a.Count; i += 1)
result.Add(a[i].scale(1.0f - t));
for (int i = commonLength; i < b.Count; i += 1)

shadowOffset = shadowIndex * _kBytesPerShadow;
shadowsData.setInt32(_kColorOffset + shadowOffset,
(int) (shadow.color.value ^ Shadow._kColorDefault));
(int) (shadow.color.value ^ _kColorDefault));
shadowsData.setFloat32(_kXOffset + shadowOffset,
shadow.offset.dx);

8
com.unity.uiwidgets/Runtime/ui2/text.cs


}
List<string> values = new List<string>();
if ((_mask & TextDecoration.underline._mask) != 0)
if ((_mask & underline._mask) != 0)
if ((_mask & TextDecoration.overline._mask) != 0)
if ((_mask & overline._mask) != 0)
if ((_mask & TextDecoration.lineThrough._mask) != 0)
if ((_mask & lineThrough._mask) != 0)
values.Add("lineThrough");
if (values.Count == 1)
return $"TextDecoration.{values[0]}";

}
public static unsafe Future loadFontFromList(byte[] list, string fontFamily = null) {
return ui_._futurize((_Callback<object> callback) => {
return _futurize((_Callback<object> callback) => {
// var completer = new Promise(true);
GCHandle completerHandle = GCHandle.Alloc(callback);
fixed (byte* listPtr = list) {

10
com.unity.uiwidgets/Runtime/widgets/basic.cs


Widget child = null,
float degree = 0.0f
) : base(key: key, child: child) {
this.transform = new Matrix4().rotationZ(degree);
transform = new Matrix4().rotationZ(degree);
this.origin = origin;
this.alignment = alignment;
this.transformHitTests = transformHitTests;

Widget child = null
) : base(key: key, child: child) {
D.assert(offset != null);
this.transform = new Matrix4().translationValues(offset.dx, offset.dy, 0);
this.origin = null;
this.alignment = null;
transform = new Matrix4().translationValues(offset.dx, offset.dy, 0);
origin = null;
alignment = null;
this.transformHitTests = transformHitTests;
}

bool transformHitTests = true,
Widget child = null
) : base(key: key, child: child) {
this.transform = new Matrix4().translationValues(scale, scale, scale);
transform = new Matrix4().translationValues(scale, scale, scale);
this.origin = origin;
this.alignment = alignment;
this.transformHitTests = transformHitTests;

8
com.unity.uiwidgets/Runtime/widgets/container.cs


current = new Padding(padding: margin, child: current);
}
if (this.transform != null) {
current = new Transform(transform: new Matrix4(this.transform), child: current);
if (transform != null) {
current = new Transform(transform: new Matrix4(transform), child: current);
}
return current;

properties.add(new DiagnosticsProperty<BoxConstraints>("constraints",
constraints, defaultValue: foundation_.kNullDefaultValue));
properties.add(new DiagnosticsProperty<EdgeInsets>("margin",
this.margin, defaultValue: Diagnostics.kNullDefaultValue));
margin, defaultValue: foundation_.kNullDefaultValue));
this.transform));
transform));
}
}
}

18
com.unity.uiwidgets/Runtime/widgets/implicit_animations.cs


}
public override Matrix4 lerp(float t) {
D.assert(this.begin != null);
D.assert(this.end != null);
D.assert(begin != null);
D.assert(end != null);
Vector3 beginTranslation = Vector3.zero;
Vector3 endTranslation = Vector3.zero;

Vector3 endScale = Vector3.zero;
this.begin.decompose(ref beginTranslation, ref beginRotation, ref beginScale);
this.end.decompose(ref endTranslation, ref endRotation, ref endScale);
begin.decompose(ref beginTranslation, ref beginRotation, ref beginScale);
end.decompose(ref endTranslation, ref endRotation, ref endScale);
Vector3 lerpTranslation =
beginTranslation * (1.0f - t) + endTranslation * t;
// TODO(alangardner): Implement slerp for constant rotation

properties.add(new DiagnosticsProperty<BoxConstraints>("constraints", constraints,
defaultValue: null,
showName: false));
properties.add(new DiagnosticsProperty<EdgeInsets>("margin", this.margin, defaultValue: null));
properties.add(ObjectFlagProperty<Matrix4>.has("transform", this.transform));
properties.add(new DiagnosticsProperty<EdgeInsets>("margin", margin, defaultValue: null));
properties.add(ObjectFlagProperty<Matrix4>.has("transform", transform));
}
}

(BoxConstraints value) => new BoxConstraintsTween(begin: value));
_margin = (EdgeInsetsTween) visitor.visit(this, _margin, widget.margin,
(EdgeInsets value) => new EdgeInsetsTween(begin: value));
this._transform = (Matrix4Tween) visitor.visit(this, this._transform, this.widget.transform,
_transform = (Matrix4Tween) visitor.visit(this, _transform, widget.transform,
(Matrix4 value) => new Matrix4Tween(begin: value));
}

new DiagnosticsProperty<DecorationTween>("fg", _foregroundDecoration, defaultValue: null));
description.add(new DiagnosticsProperty<BoxConstraintsTween>("constraints", _constraints,
showName: false, defaultValue: null));
description.add(new DiagnosticsProperty<EdgeInsetsTween>("margin", this._margin, defaultValue: null));
description.add(ObjectFlagProperty<Matrix4Tween>.has("transform", this._transform));
description.add(new DiagnosticsProperty<EdgeInsetsTween>("margin", _margin, defaultValue: null));
description.add(ObjectFlagProperty<Matrix4Tween>.has("transform", _transform));
}
}

2
com.unity.uiwidgets/Runtime/widgets/layout_builder.cs


}
protected override bool hitTestChildren(BoxHitTestResult result, Offset position = null) {
return this.child?.hitTest(result, position: position) ?? false;
return child?.hitTest(result, position: position) ?? false;
}
public override void paint(PaintingContext context, Offset offset) {

120
com.unity.uiwidgets/Runtime/widgets/overlay.cs


return;
}
this._opaque = value;
this._overlay?._didChangeEntryOpacity();
_opaque = value;
_overlay?._didChangeEntryOpacity();
}
}

entry._overlay = this;
}
this.setState(() => { this._entries.InsertRange(this._insertionIndex(below, above), entries); });
setState(() => { _entries.InsertRange(_insertionIndex(below, above), entries); });
}
public void rearrange(IEnumerable<OverlayEntry> newEntries, OverlayEntry below = null,

return;
}
HashSet<OverlayEntry> old = new HashSet<OverlayEntry>(this._entries);
HashSet<OverlayEntry> old = new HashSet<OverlayEntry>(_entries);
this.setState(() => {
this._entries.Clear();
this._entries.AddRange(newEntriesList);
setState(() => {
_entries.Clear();
_entries.AddRange(newEntriesList);
foreach (OverlayEntry entry in newEntriesList) {
old.Remove(entry);
}

public override RenderObject createRenderObject(BuildContext context) {
return new _RenderTheatre(
skipCount: this.skipCount,
skipCount: skipCount,
renderObject.skipCount = this.skipCount;
renderObject.skipCount = skipCount;
renderObject.textDirection = Directionality.of(context);
}
}

}
public override void debugVisitOnstageChildren(ElementVisitor visitor) {
D.assert(this.children.Count() >= this.widget.skipCount);
foreach (var item in this.children.Skip(this.widget.skipCount)) {
D.assert(children.Count() >= widget.skipCount);
foreach (var item in children.Skip(widget.skipCount)) {
visitor(item);
}
}

D.assert(skipCount != null);
D.assert(skipCount >= 0);
D.assert(textDirection != null);
this._textDirection = textDirection;
this._skipCount = skipCount;
this.addAll(children);
_textDirection = textDirection;
_skipCount = skipCount;
addAll(children);
}
bool _hasVisualOverflow = false;

void _resolve() {
if (this._resolvedAlignment != null)
if (_resolvedAlignment != null)
switch (this.textDirection) {
switch (textDirection) {
this._resolvedAlignment = new Alignment(-1, -1);
_resolvedAlignment = new Alignment(-1, -1);
this._resolvedAlignment = new Alignment(1, -1);
_resolvedAlignment = new Alignment(1, -1);
this._resolvedAlignment = null;
this.markNeedsLayout();
_resolvedAlignment = null;
markNeedsLayout();
get { return this._textDirection; }
get { return _textDirection; }
if (this._textDirection == value)
if (_textDirection == value)
this._textDirection = value;
this._markNeedResolution();
_textDirection = value;
_markNeedResolution();
}
}

get { return this._skipCount; }
get { return _skipCount; }
if (this._skipCount != value) {
this._skipCount = value;
this.markNeedsLayout();
if (_skipCount != value) {
_skipCount = value;
markNeedsLayout();
}
}
}

RenderBox _firstOnstageChild {
get {
if (this.skipCount == base.childCount) {
if (skipCount == childCount) {
RenderBox child = base.firstChild;
for (int toSkip = this.skipCount; toSkip > 0; toSkip--) {
RenderBox child = firstChild;
for (int toSkip = skipCount; toSkip > 0; toSkip--) {
StackParentData childParentData = child.parentData as StackParentData;
child = childParentData.nextSibling;
D.assert(child != null);

}
RenderBox _lastOnstageChild {
get { return this.skipCount == this.childCount ? null : this.lastChild; }
get { return skipCount == childCount ? null : lastChild; }
get { return this.childCount - this.skipCount; }
get { return childCount - skipCount; }
return RenderStack.getIntrinsicDimension(this._firstOnstageChild,
return RenderStack.getIntrinsicDimension(_firstOnstageChild,
return RenderStack.getIntrinsicDimension(this._firstOnstageChild,
return RenderStack.getIntrinsicDimension(_firstOnstageChild,
return RenderStack.getIntrinsicDimension(this._firstOnstageChild,
return RenderStack.getIntrinsicDimension(_firstOnstageChild,
return RenderStack.getIntrinsicDimension(this._firstOnstageChild,
return RenderStack.getIntrinsicDimension(_firstOnstageChild,
D.assert(!this.debugNeedsLayout);
D.assert(!debugNeedsLayout);
RenderBox child = this._firstOnstageChild;
RenderBox child = _firstOnstageChild;
while (child != null) {
D.assert(!child.debugNeedsLayout);
StackParentData childParentData = child.parentData as StackParentData;

}
protected override void performResize() {
this.size = this.constraints.biggest;
D.assert(this.size.isFinite);
size = constraints.biggest;
D.assert(size.isFinite);
this._hasVisualOverflow = false;
_hasVisualOverflow = false;
if (this._onstageChildCount == 0) {
if (_onstageChildCount == 0) {
this._resolve();
D.assert(this._resolvedAlignment != null);
_resolve();
D.assert(_resolvedAlignment != null);
BoxConstraints nonPositionedConstraints = BoxConstraints.tight(this.constraints.biggest);
BoxConstraints nonPositionedConstraints = BoxConstraints.tight(constraints.biggest);
RenderBox child = this._firstOnstageChild;
RenderBox child = _firstOnstageChild;
childParentData.offset = this._resolvedAlignment.alongOffset(this.size - child.size as Offset);
childParentData.offset = _resolvedAlignment.alongOffset(size - child.size as Offset);
this._hasVisualOverflow =
RenderStack.layoutPositionedChild(child, childParentData, this.size, this._resolvedAlignment) ||
_hasVisualOverflow =
RenderStack.layoutPositionedChild(child, childParentData, size, _resolvedAlignment) ||
_hasVisualOverflow;
}

}
protected override bool hitTestChildren(BoxHitTestResult result, Offset position = null) {
RenderBox child = this._lastOnstageChild;
for (int i = 0; i < this._onstageChildCount; i++) {
RenderBox child = _lastOnstageChild;
for (int i = 0; i < _onstageChildCount; i++) {
D.assert(child != null);
StackParentData childParentData = child.parentData as StackParentData;

}
void paintStack(PaintingContext context, Offset offset) {
RenderBox child = this._firstOnstageChild;
RenderBox child = _firstOnstageChild;
while (child != null) {
StackParentData childParentData = child.parentData as StackParentData;
context.paintChild(child, childParentData.offset + offset);

public override void paint(PaintingContext context, Offset offset) {
if (this._hasVisualOverflow) {
context.pushClipRect(this.needsCompositing, offset, Offset.zero & this.size, this.paintStack);
if (_hasVisualOverflow) {
context.pushClipRect(needsCompositing, offset, Offset.zero & size, paintStack);
this.paintStack(context, offset);
paintStack(context, offset);
RenderBox child = this._firstOnstageChild;
RenderBox child = _firstOnstageChild;
while (child != null) {
visitor(child);
StackParentData childParentData = child.parentData as StackParentData;

public override Rect describeApproximatePaintClip(RenderObject child) =>
this._hasVisualOverflow ? Offset.zero & this.size : null;
_hasVisualOverflow ? Offset.zero & size : null;
properties.add(new IntProperty("skipCount", this.skipCount));
properties.add(new EnumProperty<TextDirection>("textDirection", this.textDirection));
properties.add(new IntProperty("skipCount", skipCount));
properties.add(new EnumProperty<TextDirection>("textDirection", textDirection));
}
}
}

16
com.unity.uiwidgets/Runtime/widgets/single_child_scroll_view.cs


public readonly DragStartBehavior dragStartBehavior;
AxisDirection _getDirection(BuildContext context) {
return AxisDirectionUtils.getAxisDirectionFromAxisReverseAndDirectionality(context, this.scrollDirection,
this.reverse) ?? AxisDirection.down;
return AxisDirectionUtils.getAxisDirectionFromAxisReverseAndDirectionality(context, scrollDirection,
reverse) ?? AxisDirection.down;
}
public override Widget build(BuildContext context) {

}
public override void applyPaintTransform(RenderObject child, Matrix4 transform) {
Offset paintOffset = this._paintOffset;
Offset paintOffset = _paintOffset;
transform.translate(paintOffset.dx, paintOffset.dy);
}

}
protected override bool hitTestChildren(BoxHitTestResult result, Offset position = null) {
if (this.child != null) {
if (child != null) {
offset: this._paintOffset,
offset: _paintOffset,
D.assert(transformed == position + (-this._paintOffset));
return this.child.hitTest(result, position: transformed);
D.assert(transformed == position + (-_paintOffset));
return child.hitTest(result, position: transformed);
}
);
}

RenderBox targetBox = (RenderBox) target;
Matrix4 transform = targetBox.getTransformTo(this);
Rect bounds = MatrixUtils.transformRect(transform, rect);
Size contentSize = this.child.size;
Size contentSize = child.size;
float leadingScrollOffset = 0.0f;
float targetMainAxisExtent = 0.0f;

4
com.unity.uiwidgets/Runtime/widgets/transitions.cs


public readonly Widget child;
protected internal override Widget build(BuildContext context) {
float scaleValue = this.scale.value;
float scaleValue = scale.value;
Matrix4 transform = new Matrix4().diagonal3Values(scaleValue, scaleValue, 1);
return new Transform(
transform: transform,

public readonly Widget child;
protected internal override Widget build(BuildContext context) {
float turnsValue = this.turns.value;
float turnsValue = turns.value;
Matrix4 transform = new Matrix4().rotationZ((turnsValue * Mathf.PI * 2.0f));
return new Transform(
transform: transform,

正在加载...
取消
保存