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

bIsRectsTrack X/Y

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@52774 954022d7-b5bf-4e40-9824-e11837661b57
parent 929f8b6d
......@@ -792,7 +792,9 @@ CAutoshapeTrack.prototype =
if (_len_y < 1)
_len_y = 1;
var bIsRectsTrack = ((_len_x >= 30) && (_len_y >= 30)) ? true : false;
var bIsRectsTrackX = (_len_x >= 30) ? true : false;
var bIsRectsTrackY = (_len_y >= 30) ? true : false;
var bIsRectsTrack = (bIsRectsTrackX || bIsRectsTrackY) ? true : false;
ctx.lineWidth = 1;
ctx.beginPath();
......@@ -879,10 +881,17 @@ CAutoshapeTrack.prototype =
var _xC = (((x1 + x2) / 2) >> 0) + 0.5;
var _yC = (((y1 + y3) / 2) >> 0) + 0.5;
overlay.AddRect2(_xC, y1+0.5, TRACK_RECT_SIZE);
overlay.AddRect2(x2+0.5, _yC, TRACK_RECT_SIZE);
overlay.AddRect2(_xC, y3+0.5, TRACK_RECT_SIZE);
overlay.AddRect2(x1+0.5, _yC, TRACK_RECT_SIZE);
if (bIsRectsTrackX)
{
overlay.AddRect2(_xC, y1+0.5, TRACK_RECT_SIZE);
overlay.AddRect2(_xC, y3+0.5, TRACK_RECT_SIZE);
}
if (bIsRectsTrackY)
{
overlay.AddRect2(x2+0.5, _yC, TRACK_RECT_SIZE);
overlay.AddRect2(x1+0.5, _yC, TRACK_RECT_SIZE);
}
}
ctx.fill();
......@@ -982,10 +991,16 @@ CAutoshapeTrack.prototype =
if (bIsRectsTrack && !isLine)
{
overlay.AddRect3((x1 + x2) / 2, (y1 + y2) / 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 + x4) / 2, (y3 + y4) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2);
overlay.AddRect3((x3 + x1) / 2, (y3 + y1) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2);
if (bIsRectsTrackX)
{
overlay.AddRect3((x1 + x2) / 2, (y1 + y2) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2);
overlay.AddRect3((x3 + x4) / 2, (y3 + y4) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2);
}
if (bIsRectsTrackY)
{
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);
}
}
ctx.fill();
......@@ -1065,10 +1080,16 @@ CAutoshapeTrack.prototype =
var _xC = (((x1 + x2) / 2) >> 0) + 0.5;
var _yC = (((y1 + y3) / 2) >> 0) + 0.5;
overlay.AddRect2(_xC, y1+0.5, TRACK_RECT_SIZE);
overlay.AddRect2(x2+0.5, _yC, TRACK_RECT_SIZE);
overlay.AddRect2(_xC, y3+0.5, TRACK_RECT_SIZE);
overlay.AddRect2(x1+0.5, _yC, TRACK_RECT_SIZE);
if (bIsRectsTrackX)
{
overlay.AddRect2(_xC, y1+0.5, TRACK_RECT_SIZE);
overlay.AddRect2(_xC, y3+0.5, TRACK_RECT_SIZE);
}
if (bIsRectsTrackY)
{
overlay.AddRect2(x2+0.5, _yC, TRACK_RECT_SIZE);
overlay.AddRect2(x1+0.5, _yC, TRACK_RECT_SIZE);
}
}
ctx.fill();
......@@ -1155,10 +1176,16 @@ CAutoshapeTrack.prototype =
if (bIsRectsTrack)
{
overlay.AddRect3((x1 + x2) / 2, (y1 + y2) / 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 + x4) / 2, (y3 + y4) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2);
overlay.AddRect3((x3 + x1) / 2, (y3 + y1) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2);
if (bIsRectsTrackX)
{
overlay.AddRect3((x1 + x2) / 2, (y1 + y2) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2);
overlay.AddRect3((x3 + x4) / 2, (y3 + y4) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2);
}
if (bIsRectsTrackY)
{
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);
}
}
ctx.fill();
......
......@@ -900,7 +900,9 @@ CAutoshapeTrack.prototype =
if (_len_y < 1)
_len_y = 1;
var bIsRectsTrack = ((_len_x >= 30) && (_len_y >= 30)) ? true : false;
var bIsRectsTrackX = (_len_x >= 30) ? true : false;
var bIsRectsTrackY = (_len_y >= 30) ? true : false;
var bIsRectsTrack = (bIsRectsTrackX || bIsRectsTrackY) ? true : false;
ctx.lineWidth = 1;
ctx.beginPath();
......@@ -987,10 +989,17 @@ CAutoshapeTrack.prototype =
var _xC = (((x1 + x2) / 2) >> 0) + 0.5;
var _yC = (((y1 + y3) / 2) >> 0) + 0.5;
overlay.AddRect2(_xC, y1+0.5, TRACK_RECT_SIZE);
overlay.AddRect2(x2+0.5, _yC, TRACK_RECT_SIZE);
overlay.AddRect2(_xC, y3+0.5, TRACK_RECT_SIZE);
overlay.AddRect2(x1+0.5, _yC, TRACK_RECT_SIZE);
if (bIsRectsTrackX)
{
overlay.AddRect2(_xC, y1+0.5, TRACK_RECT_SIZE);
overlay.AddRect2(_xC, y3+0.5, TRACK_RECT_SIZE);
}
if (bIsRectsTrackY)
{
overlay.AddRect2(x2+0.5, _yC, TRACK_RECT_SIZE);
overlay.AddRect2(x1+0.5, _yC, TRACK_RECT_SIZE);
}
}
ctx.fill();
......@@ -1090,10 +1099,16 @@ CAutoshapeTrack.prototype =
if (bIsRectsTrack && !isLine)
{
overlay.AddRect3((x1 + x2) / 2, (y1 + y2) / 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 + x4) / 2, (y3 + y4) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2);
overlay.AddRect3((x3 + x1) / 2, (y3 + y1) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2);
if (bIsRectsTrackX)
{
overlay.AddRect3((x1 + x2) / 2, (y1 + y2) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2);
overlay.AddRect3((x3 + x4) / 2, (y3 + y4) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2);
}
if (bIsRectsTrackY)
{
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);
}
}
ctx.fill();
......@@ -1173,10 +1188,16 @@ CAutoshapeTrack.prototype =
var _xC = (((x1 + x2) / 2) >> 0) + 0.5;
var _yC = (((y1 + y3) / 2) >> 0) + 0.5;
overlay.AddRect2(_xC, y1+0.5, TRACK_RECT_SIZE);
overlay.AddRect2(x2+0.5, _yC, TRACK_RECT_SIZE);
overlay.AddRect2(_xC, y3+0.5, TRACK_RECT_SIZE);
overlay.AddRect2(x1+0.5, _yC, TRACK_RECT_SIZE);
if (bIsRectsTrackX)
{
overlay.AddRect2(_xC, y1+0.5, TRACK_RECT_SIZE);
overlay.AddRect2(_xC, y3+0.5, TRACK_RECT_SIZE);
}
if (bIsRectsTrackY)
{
overlay.AddRect2(x2+0.5, _yC, TRACK_RECT_SIZE);
overlay.AddRect2(x1+0.5, _yC, TRACK_RECT_SIZE);
}
}
ctx.fill();
......@@ -1263,10 +1284,16 @@ CAutoshapeTrack.prototype =
if (bIsRectsTrack)
{
overlay.AddRect3((x1 + x2) / 2, (y1 + y2) / 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 + x4) / 2, (y3 + y4) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2);
overlay.AddRect3((x3 + x1) / 2, (y3 + y1) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2);
if (bIsRectsTrackX)
{
overlay.AddRect3((x1 + x2) / 2, (y1 + y2) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2);
overlay.AddRect3((x3 + x4) / 2, (y3 + y4) / 2, TRACK_RECT_SIZE, ex1, ey1, ex2, ey2);
}
if (bIsRectsTrackY)
{
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);
}
}
ctx.fill();
......
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