This commit is contained in:
codeimp 2008-09-24 12:00:55 +00:00
parent dcda9cdab3
commit 15693e1ca8

View file

@ -76,7 +76,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
private const float GRIP_SIZE = 9.0f;
private const float ZERO_SIZE_ADDITION = 20.0f;
private const byte RECTANGLE_ALPHA = 60;
private const byte EXTENSION_LINE_ALPHA = 200;
private const byte EXTENSION_LINE_ALPHA = 150;
private readonly Cursor[] RESIZE_CURSORS = { Cursors.SizeNS, Cursors.SizeNWSE, Cursors.SizeWE, Cursors.SizeNESW };
#endregion
@ -370,15 +370,14 @@ namespace CodeImp.DoomBuilder.BuilderModes
Vector2D newcorner = TransformedPoint(originalcorners[stickcorner]);
offset -= newcorner - oldcorner;
// Snappedmappos is outside the edgevector of our rectangle?
// Then show the extension line so that the user knows what it is aligning to
// Show the extension line so that the user knows what it is aligning to
Vector2D sizefiltered = (size * resizefilter);
float sizelength = sizefiltered.x + sizefiltered.y;
Line2D edgeline = new Line2D(resizeaxis.v1 + resizevector * sizelength, resizeaxis.v1 + resizevector * sizelength - edgevector);
float nearestonedge = edgeline.GetNearestOnLine(snappedmappos);
if(nearestonedge > 0.5f)
extensionline = new Line2D(edgeline.v1, snappedmappos);
else if(nearestonedge < 0.5f)
else
extensionline = new Line2D(edgeline.v2, snappedmappos);
// Update