浏览代码

fix BoxFit

/main
gewentao 6 年前
当前提交
c5849871
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 8
      Assets/UIWidgets/painting/decoration_image.cs

8
Assets/UIWidgets/painting/decoration_image.cs


Rect rect,
ui.Image image,
// ColorFilter colorFileter,
BoxFit fit,
BoxFit? fit,
Rect centerSlice,
Alignment alignment = null,
ImageRepeat repeat = ImageRepeat.noRepeat

inputSize -= sliceBorder;
}
fit = centerSlice == null ? BoxFit.scaleDown : BoxFit.fill;
FittedSizes fittedSizes = FittedSizes.applyBoxFit(fit, inputSize, outputSize);
if (fit == null) {
fit = centerSlice == null ? BoxFit.scaleDown : BoxFit.fill;
}
FittedSizes fittedSizes = FittedSizes.applyBoxFit(fit.Value, inputSize, outputSize);
Size sourceSize = fittedSizes.source;
Size destinationSize = fittedSizes.destination;
if (centerSlice != null) {

正在加载...
取消
保存