浏览代码

refine canvas.

/main
kg 6 年前
当前提交
92013291
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5
      Runtime/ui/painting/canvas_impl.cs

5
Runtime/ui/painting/canvas_impl.cs


}
bool _applyClip(Rect queryBounds) {
if (queryBounds == null || queryBounds.isEmpty) {
return false;
}
var layer = this._currentLayer;
var layerBounds = layer.layerBounds;
ReducedClip reducedClip = new ReducedClip(layer.clipStack, layerBounds, queryBounds);

// clear triangles first in order to bypass validation in SetVertices.
cmd.meshObj.SetTriangles((int[]) null, 0, false);
D.assert(cmd.mesh.vertices.Count > 0);
cmd.meshObj.SetVertices(cmd.mesh.vertices);
cmd.meshObj.SetTriangles(cmd.mesh.triangles, 0, false);
cmd.meshObj.SetUVs(0, cmd.mesh.uv);

正在加载...
取消
保存