浏览代码

fix nine patch image

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

4
Runtime/ui/painting/canvas_impl.cs


float x0 = (float) dst.left;
float x3 = (float) dst.right;
float x1 = x0 + (float) ((center.left - src.left) * srcWidth);
float x2 = x3 - (float) ((src.right - center.right) * srcHeight);
float x2 = x3 - (float) ((src.right - center.right) * srcWidth);
float y1 = y0 + (float) ((center.top - src.top) * srcWidth);
float y1 = y0 + (float) ((center.top - src.top) * srcHeight);
float y2 = y3 - (float) ((src.bottom - center.bottom) * srcHeight);
float tx0 = (float) src.left;

正在加载...
取消
保存