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

git-svn-id:...

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@54518 954022d7-b5bf-4e40-9824-e11837661b57
parent 62e9f30f
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
this.Frame = null; this.Frame = null;
this.Table = null; this.Table = null;
this.AutoShapesTrack = null; this.AutoShapesTrack = null;
this.m_oWordControl = window.native;
} }
CDrawingDocument.prototype = CDrawingDocument.prototype =
......
...@@ -78,8 +78,9 @@ CShapeDrawer.prototype = ...@@ -78,8 +78,9 @@ CShapeDrawer.prototype =
fromShape : function(shape, graphics) fromShape : function(shape, graphics)
{ {
this.IsRectShape = false; this.IsRectShape = false;
this.Shape = shape; this.Shape = shape;
this.Graphics = window.native;
this.Graphics = (graphics.IsSlideBoundsCheckerType !== undefined) ? graphics : window.native;
this.UniFill = shape.brush; this.UniFill = shape.brush;
this.Ln = shape.pen; this.Ln = shape.pen;
this.Transform = shape.TransformMatrix; this.Transform = shape.TransformMatrix;
...@@ -178,6 +179,9 @@ CShapeDrawer.prototype = ...@@ -178,6 +179,9 @@ CShapeDrawer.prototype =
this.StrokeWidth = (this.Ln.w == null) ? 12700 : parseInt(this.Ln.w); this.StrokeWidth = (this.Ln.w == null) ? 12700 : parseInt(this.Ln.w);
this.StrokeWidth /= 36000.0; this.StrokeWidth /= 36000.0;
if (graphics.IsSlideBoundsCheckerType && !this.bIsNoStrokeAttack)
graphics.LineWidth = this.StrokeWidth;
} }
if (this.bIsTexture || bIsCheckBounds) if (this.bIsTexture || bIsCheckBounds)
...@@ -193,6 +197,32 @@ CShapeDrawer.prototype = ...@@ -193,6 +197,32 @@ CShapeDrawer.prototype =
{ {
if (this.bIsNoStrokeAttack && this.bIsNoFillAttack) if (this.bIsNoStrokeAttack && this.bIsNoFillAttack)
return; return;
if (this.Graphics.IsSlideBoundsCheckerType)
{
// slide bounds checker
if(geom)
{
geom.draw(this);
}
else
{
this._s();
this._m(0, 0);
this._l(this.Shape.extX, 0);
this._l(this.Shape.extX, this.Shape.extY);
this._l(0, this.Shape.extY);
this._z();
this.drawFillStroke(true, "norm", true && !this.bIsNoStrokeAttack);
this._e();
}
if (this.Graphics.IsSlideBoundsCheckerType && this.Graphics.AutoCheckLineWidth)
{
this.Graphics.CorrectBounds2();
}
return;
}
this.Graphics["PD_StartShapeDraw"](this.IsRectShape); this.Graphics["PD_StartShapeDraw"](this.IsRectShape);
if(geom) if(geom)
...@@ -215,6 +245,8 @@ CShapeDrawer.prototype = ...@@ -215,6 +245,8 @@ CShapeDrawer.prototype =
p_width : function(w) p_width : function(w)
{ {
if (this.Graphics.IsSlideBoundsCheckerType)
return this.Graphics.p_width(w);
this.Graphics["PD_p_width"](w); this.Graphics["PD_p_width"](w);
}, },
...@@ -225,6 +257,8 @@ CShapeDrawer.prototype = ...@@ -225,6 +257,8 @@ CShapeDrawer.prototype =
this.CheckPoint(x, y); this.CheckPoint(x, y);
return; return;
} }
if (this.Graphics.IsSlideBoundsCheckerType)
return this.Graphics._m(x, y);
this.Graphics["PD_PathMoveTo"](x, y); this.Graphics["PD_PathMoveTo"](x, y);
}, },
_l : function(x, y) _l : function(x, y)
...@@ -234,6 +268,8 @@ CShapeDrawer.prototype = ...@@ -234,6 +268,8 @@ CShapeDrawer.prototype =
this.CheckPoint(x, y); this.CheckPoint(x, y);
return; return;
} }
if (this.Graphics.IsSlideBoundsCheckerType)
return this.Graphics._l(x, y);
this.Graphics["PD_PathLineTo"](x, y); this.Graphics["PD_PathLineTo"](x, y);
}, },
_c : function(x1, y1, x2, y2, x3, y3) _c : function(x1, y1, x2, y2, x3, y3)
...@@ -245,6 +281,8 @@ CShapeDrawer.prototype = ...@@ -245,6 +281,8 @@ CShapeDrawer.prototype =
this.CheckPoint(x3, y3); this.CheckPoint(x3, y3);
return; return;
} }
if (this.Graphics.IsSlideBoundsCheckerType)
return this.Graphics._c(x1, y1, x2, y2, x3, y3);
this.Graphics["PD_PathCurveTo"](x1, y1, x2, y2, x3, y3); this.Graphics["PD_PathCurveTo"](x1, y1, x2, y2, x3, y3);
}, },
_c2 : function(x1, y1, x2, y2) _c2 : function(x1, y1, x2, y2)
...@@ -255,20 +293,28 @@ CShapeDrawer.prototype = ...@@ -255,20 +293,28 @@ CShapeDrawer.prototype =
this.CheckPoint(x2, y2); this.CheckPoint(x2, y2);
return; return;
} }
if (this.Graphics.IsSlideBoundsCheckerType)
return this.Graphics._c2(x1, y1, x2, y2);
this.Graphics["PD_PathCurveTo2"](x1, y1, x2, y2); this.Graphics["PD_PathCurveTo2"](x1, y1, x2, y2);
}, },
_z : function() _z : function()
{ {
if (this.bIsCheckBounds) if (this.bIsCheckBounds)
return; return;
this.Graphics["PD_PathClose"](); if (this.Graphics.IsSlideBoundsCheckerType)
return this.Graphics._z();
this.Graphics["PD_PathClose"]();
}, },
_s : function() _s : function()
{ {
if (this.Graphics.IsSlideBoundsCheckerType)
return this.Graphics._s();
this.Graphics["PD_PathStart"](); this.Graphics["PD_PathStart"]();
}, },
_e : function() _e : function()
{ {
if (this.Graphics.IsSlideBoundsCheckerType)
return this.Graphics._e();
this.Graphics["PD_PathEnd"](); this.Graphics["PD_PathEnd"]();
}, },
...@@ -276,6 +322,9 @@ CShapeDrawer.prototype = ...@@ -276,6 +322,9 @@ CShapeDrawer.prototype =
{ {
if (mode == "none" || this.bIsNoFillAttack) if (mode == "none" || this.bIsNoFillAttack)
return; return;
if (this.Graphics.IsSlideBoundsCheckerType)
return;
var _fill = this.UniFill.fill; var _fill = this.UniFill.fill;
switch (_fill.type) switch (_fill.type)
...@@ -392,6 +441,9 @@ CShapeDrawer.prototype = ...@@ -392,6 +441,9 @@ CShapeDrawer.prototype =
{ {
if (this.bIsNoStrokeAttack) if (this.bIsNoStrokeAttack)
return; return;
if (this.Graphics.IsSlideBoundsCheckerType)
return;
if (this.Ln.Join != null && this.Ln.Join.type != null) if (this.Ln.Join != null && this.Ln.Join.type != null)
{ {
......
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