Commit 375d0a18 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

track line

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57779 954022d7-b5bf-4e40-9824-e11837661b57
parent 94828f47
This diff is collapsed.
...@@ -1093,24 +1093,24 @@ CAutoshapeTrack.prototype = ...@@ -1093,24 +1093,24 @@ CAutoshapeTrack.prototype =
ctx.strokeStyle = _style_blue; ctx.strokeStyle = _style_blue;
if (nIsCleverWithTransform) if (!isLine)
{ {
ctx.rect(_x1 + 0.5, _y2 + 0.5, _x4 - _x1, _y4 - _y1); if (nIsCleverWithTransform)
ctx.stroke(); {
ctx.beginPath(); ctx.rect(_x1 + 0.5, _y2 + 0.5, _x4 - _x1, _y4 - _y1);
} ctx.stroke();
else ctx.beginPath();
{ }
if (!isLine) else
{ {
ctx.moveTo(x1, y1); ctx.moveTo(x1, y1);
ctx.lineTo(x2, y2); ctx.lineTo(x2, y2);
ctx.lineTo(x4, y4); ctx.lineTo(x4, y4);
ctx.lineTo(x3, y3); ctx.lineTo(x3, y3);
ctx.closePath(); ctx.closePath();
ctx.stroke(); ctx.stroke();
} }
} }
overlay.CheckPoint(x1, y1); overlay.CheckPoint(x1, y1);
overlay.CheckPoint(x2, y2); overlay.CheckPoint(x2, y2);
...@@ -1258,49 +1258,57 @@ CAutoshapeTrack.prototype = ...@@ -1258,49 +1258,57 @@ CAutoshapeTrack.prototype =
} }
else else
{ {
overlay.AddRect2(_x1 + 0.5, _y1 + 0.5, TRACK_RECT_SIZE); if (!isLine)
if (!isLine) {
{ overlay.AddRect2(_x1 + 0.5, _y1 + 0.5, TRACK_RECT_SIZE);
overlay.AddRect2(_x2 + 0.5, _y2 + 0.5, TRACK_RECT_SIZE); overlay.AddRect2(_x2 + 0.5, _y2 + 0.5, TRACK_RECT_SIZE);
overlay.AddRect2(_x3 + 0.5, _y3 + 0.5, TRACK_RECT_SIZE); overlay.AddRect2(_x3 + 0.5, _y3 + 0.5, TRACK_RECT_SIZE);
} overlay.AddRect2(_x4 + 0.5, _y4 + 0.5, TRACK_RECT_SIZE);
overlay.AddRect2(_x4 + 0.5, _y4 + 0.5, TRACK_RECT_SIZE); }
else
{
overlay.AddRect2(x1 + 0.5, y1 + 0.5, TRACK_RECT_SIZE);
overlay.AddRect2(x4 + 0.5, y4 + 0.5, TRACK_RECT_SIZE);
}
} }
} }
if (!nIsCleverWithTransform) if (!isLine)
{ {
if (bIsRectsTrack && !isLine) if (!nIsCleverWithTransform)
{ {
if (bIsRectsTrackX) if (bIsRectsTrack)
{ {
overlay.AddRect3((x1 + x2) / 2, (y1 + y2) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2); if (bIsRectsTrackX)
overlay.AddRect3((x3 + x4) / 2, (y3 + y4) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2); {
} overlay.AddRect3((x1 + x2) / 2, (y1 + y2) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2);
if (bIsRectsTrackY) overlay.AddRect3((x3 + x4) / 2, (y3 + y4) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2);
{ }
overlay.AddRect3((x2 + x4) / 2, (y2 + y4) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2); if (bIsRectsTrackY)
overlay.AddRect3((x3 + x1) / 2, (y3 + y1) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2); {
} overlay.AddRect3((x2 + x4) / 2, (y2 + y4) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2);
} overlay.AddRect3((x3 + x1) / 2, (y3 + y1) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2);
} }
else }
{ }
var _xC = (((_x1 + _x2) / 2) >> 0) + 0.5; else
var _yC = (((_y1 + _y3) / 2) >> 0) + 0.5; {
var _xC = (((_x1 + _x2) / 2) >> 0) + 0.5;
var _yC = (((_y1 + _y3) / 2) >> 0) + 0.5;
if (bIsRectsTrackX) if (bIsRectsTrackX)
{ {
overlay.AddRect2(_xC, _y1+0.5, TRACK_RECT_SIZE); overlay.AddRect2(_xC, _y1+0.5, TRACK_RECT_SIZE);
overlay.AddRect2(_xC, _y3+0.5, TRACK_RECT_SIZE); overlay.AddRect2(_xC, _y3+0.5, TRACK_RECT_SIZE);
} }
if (bIsRectsTrackY) if (bIsRectsTrackY)
{ {
overlay.AddRect2(_x2+0.5, _yC, TRACK_RECT_SIZE); overlay.AddRect2(_x2+0.5, _yC, TRACK_RECT_SIZE);
overlay.AddRect2(_x1+0.5, _yC, TRACK_RECT_SIZE); overlay.AddRect2(_x1+0.5, _yC, TRACK_RECT_SIZE);
} }
} }
}
ctx.fill(); ctx.fill();
ctx.stroke(); ctx.stroke();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment