Compare commits

..

No commits in common. "06b0bac6881008edfc565e4a9d03f77bffa66aa6" and "215e96e70c6584940f15ab1868dd9c6a63a68c4f" have entirely different histories.

View File

@ -700,12 +700,7 @@ public class ScreenShotPainter : MonoBehaviour
RectFactory();
break;
case Status.Circle:
Vector2 last;
Vector2 mouse;
RectTransformUtility.ScreenPointToLocalPointInRectangle(circleImg.rectTransform.parent as RectTransform, _lastPoint, null, out last);
RectTransformUtility.ScreenPointToLocalPointInRectangle(circleImg.rectTransform.parent as RectTransform, Input.mousePosition, null, out mouse);
var dis = Vector2.Distance(last, mouse) * 2;
var dis = Vector2.Distance(_lastPoint, Input.mousePosition) * 2;
circleImg.rectTransform.sizeDelta = new Vector2(dis, dis);
break;
case Status.Arrow:
@ -826,7 +821,7 @@ public class ScreenShotPainter : MonoBehaviour
{
if (lineStart != default)
{
var points = GenerateArrowPoints(lineStart, Input.mousePosition, 0.1f);
var points = GenerateArrowPoints(lineStart, Input.mousePosition,0.1f);
_lastPoint = lineStart;
Paint(_eraserFlag, lineStart);
LerpPaint(Input.mousePosition, _eraserFlag);
@ -1043,6 +1038,10 @@ public class ScreenShotPainter : MonoBehaviour
yield return new WaitForEndOfFrame();
float width = _rightUpConnerPoint.x - _leftDownConnerPoint.x;
float height = _rightUpConnerPoint.y - _leftDownConnerPoint.y;
Debug.Log(_leftDownConnerPoint.x.ToString("0.00"));
Debug.Log(_leftDownConnerPoint.y.ToString("0.00"));
Debug.Log("width:" + width);
Debug.Log("width:" + height);
Rect rect = new Rect(_leftDownConnerPoint.x, _leftDownConnerPoint.y, width, height); //坑爹啊 如果是开携程在WaitForEndOfFrame时候截图那么他的坐标系换了。。rect起始点要设置在左下角