mirror of
https://github.com/greenshot/greenshot
synced 2025-08-22 22:34:27 -07:00
Fix incorrect casting for Freehand tool.
This commit is contained in:
parent
7e9c893575
commit
c1e9c72968
1 changed files with 14 additions and 14 deletions
|
@ -65,10 +65,10 @@ namespace Greenshot.Addon.LegacyEditor.Drawing {
|
||||||
|
|
||||||
public override void Transform(Matrix matrix)
|
public override void Transform(Matrix matrix)
|
||||||
{
|
{
|
||||||
var newPoints = _capturePoints.Cast<PointF>().ToArray();
|
var newPoints = _capturePoints.ConvertAll<PointF>(p => p).ToArray();
|
||||||
matrix.TransformPoints(newPoints);
|
matrix.TransformPoints(newPoints);
|
||||||
_capturePoints.Clear();
|
_capturePoints.Clear();
|
||||||
_capturePoints.AddRange(newPoints.Cast<NativePointFloat>());
|
_capturePoints.AddRange(newPoints.Select(p => (NativePointFloat)p));
|
||||||
RecalculatePath();
|
RecalculatePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ namespace Greenshot.Addon.LegacyEditor.Drawing {
|
||||||
// duplicate points, first at 50% than 25% than 75%
|
// duplicate points, first at 50% than 25% than 75%
|
||||||
_capturePoints.Insert((int)(_capturePoints.Count * PointOffset[index]), _capturePoints[(int)(_capturePoints.Count * PointOffset[index++])]);
|
_capturePoints.Insert((int)(_capturePoints.Count * PointOffset[index]), _capturePoints[(int)(_capturePoints.Count * PointOffset[index++])]);
|
||||||
}
|
}
|
||||||
_freehandPath.AddBeziers(_capturePoints.Cast<PointF>().ToArray());
|
_freehandPath.AddBeziers(_capturePoints.ConvertAll<PointF>(p => p).ToArray());
|
||||||
}
|
}
|
||||||
else if (_capturePoints.Count == 2)
|
else if (_capturePoints.Count == 2)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue