浏览代码

fix compilation errors in rendering more

/siyaoH-1.17-PlatformMessage
xingweizhu 4 年前
当前提交
90543e5e
共有 5 个文件被更改,包括 17 次插入16 次删除
  1. 2
      com.unity.uiwidgets/Runtime/rendering/editable.cs
  2. 1
      com.unity.uiwidgets/Runtime/rendering/paragraph.cs
  3. 8
      com.unity.uiwidgets/Runtime/rendering/proxy_box.cs
  4. 20
      com.unity.uiwidgets/Runtime/rendering/texture.cs
  5. 2
      com.unity.uiwidgets/Runtime/ui2/text.cs

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


using Canvas = Unity.UIWidgets.ui.Canvas;
using Color = Unity.UIWidgets.ui.Color;
using Rect = Unity.UIWidgets.ui.Rect;
using StrutStyle = Unity.UIWidgets.ui.StrutStyle;
using TextRange = Unity.UIWidgets.ui.TextRange;
namespace Unity.UIWidgets.rendering {
class EditableUtils {

1
com.unity.uiwidgets/Runtime/rendering/paragraph.cs


using Canvas = Unity.UIWidgets.ui.Canvas;
using Color = Unity.UIWidgets.ui.Color;
using Rect = Unity.UIWidgets.ui.Rect;
using StrutStyle = Unity.UIWidgets.ui.StrutStyle;
namespace Unity.UIWidgets.rendering {
public enum TextOverflow {

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


D.assert(() => {
if (child != null) {
base.debugPaintSize(context, offset);
Path offsetPath = new Path();
offsetPath.addPath(_clip, offset);
context.canvas.drawPath(offsetPath, _debugPaint);
context.canvas.drawPath(_clip.shift(offset), _debugPaint);
_debugText.paint(context.canvas, offset);
}

if (child != null) {
_updateClip();
Rect offsetBounds = offset & size;
Path offsetPath = new Path();
offsetPath.addPath(_clip, offset);
Path offsetPath = _clip.shift(offset);
PhysicalModelLayer physicalModel = new PhysicalModelLayer(
clipPath: offsetPath,

shadowColor: shadowColor);
context.pushLayer(physicalModel, base.paint, offset, childPaintBounds: offsetBounds);
}
}

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


namespace Unity.UIWidgets.rendering {
public class TextureBox : RenderBox {
public TextureBox(Texture texture = null) {
D.assert(texture != null);
_texture = texture;
public TextureBox(int textureId) {
D.assert(textureId != null);
_textureId = textureId;
public Texture texture {
get { return _texture; }
public int textureId {
get { return _textureId; }
if (value != _texture) {
_texture = value;
if (value != _textureId) {
_textureId = value;
Texture _texture;
int _textureId;
protected override bool sizedByParent {
get { return true; }

}
public override void paint(PaintingContext context, Offset offset) {
if (_texture == null) {
if (_textureId == null) {
texture: _texture
textureId: _textureId
));
}
}

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


public readonly TextDirection direction;
Rect toRect() => Rect.fromLTRB((float) left, (float) top, (float) right, (float) bottom);
public Rect toRect() => Rect.fromLTRB((float) left, (float) top, (float) right, (float) bottom);
public float start {
get { return (direction == TextDirection.ltr) ? left : right; }

正在加载...
取消
保存