浏览代码

Shrink the fill path.

/main
Yuncong Zhang 5 年前
当前提交
88c4bcc2
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 10
      Runtime/ui/renderer/common/geometry/path/path_cache.cs

10
Runtime/ui/renderer/common/geometry/path/path_cache.cs


VertexUV _expandFill(float fringe) {
float aa = fringe;
float woff = aa * 0.5f;
var points = this._points;
var paths = this._paths;
this._calculateJoins(fringe, StrokeJoin.miter, 4.0f);

path.ifill = _vertices.Count;
for (var j = 0; j < path.count; j++) {
var p = points[path.first + j];
_vertices.Add(new Vector2(p.x, p.y));
if (aa > 0.0f) {
_vertices.Add(new Vector2(p.x + p.dmx * woff, p.y + p.dmy * woff));
}
else {
_vertices.Add(new Vector2(p.x, p.y));
}
_uv.Add(new Vector2(0.5f, 1.0f));
}

_strokeVertices.SetCapacity(cvertices);
_strokeUV.SetCapacity(cvertices);
float woff = aa * 0.5f;
float lw = this._fillConvex ? woff : aa + woff;
float rw = aa - woff;
float lu = this._fillConvex ? 0.5f : 0.0f;

正在加载...
取消
保存