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

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49755 954022d7-b5bf-4e40-9824-e11837661b57
parent a304338d
...@@ -497,6 +497,8 @@ function CGraphics() ...@@ -497,6 +497,8 @@ function CGraphics()
this.TextClipRect = null; this.TextClipRect = null;
this.IsClipContext = false; this.IsClipContext = false;
this.ClearMode = false;
} }
CGraphics.prototype = CGraphics.prototype =
......
...@@ -495,6 +495,30 @@ CShapeDrawer.prototype = ...@@ -495,6 +495,30 @@ CShapeDrawer.prototype =
var bIsCheckBounds = false; var bIsCheckBounds = false;
if (graphics.ClearMode === true)
{
if (this.UniFill == null || this.UniFill.fill == null)
this.bIsNoFillAttack = true;
else
{
this.FillUniColor = { R : 0, G : 0, B : 0, A : 0 };
}
if (this.Ln == null || this.Ln.Fill == null || this.Ln.Fill.fill == null)
this.bIsNoStrokeAttack = true;
else
{
this.StrokeUniColor = { R : 0, G : 0, B : 0, A : 0 };
this.StrokeWidth = (this.Ln.w == null) ? 12700 : parseInt(this.Ln.w);
this.StrokeWidth /= 36000.0;
this.p_width(1000 * this.StrokeWidth);
}
return;
}
if (this.UniFill == null || this.UniFill.fill == null) if (this.UniFill == null || this.UniFill.fill == null)
this.bIsNoFillAttack = true; this.bIsNoFillAttack = true;
else else
...@@ -632,6 +656,13 @@ CShapeDrawer.prototype = ...@@ -632,6 +656,13 @@ CShapeDrawer.prototype =
this.Graphics.put_TextureBounds(this.min_x, this.min_y, this.max_x - this.min_x, this.max_y - this.min_y); this.Graphics.put_TextureBounds(this.min_x, this.min_y, this.max_x - this.min_x, this.max_y - this.min_y);
} }
var _old_composite = null;
if (this.Graphics.ClearMode === true)
{
_old_composite = this.Graphics.m_oContext.globalCompositeOperation;
this.Graphics.m_oContext.globalCompositeOperation = "copy";
}
if(geom) if(geom)
{ {
geom.draw(this); geom.draw(this);
...@@ -658,6 +689,11 @@ CShapeDrawer.prototype = ...@@ -658,6 +689,11 @@ CShapeDrawer.prototype =
{ {
this.Graphics.CorrectBounds2(); this.Graphics.CorrectBounds2();
} }
if (this.Graphics.ClearMode === true)
{
this.Graphics.m_oContext.globalCompositeOperation = _old_composite;
}
}, },
p_width : function(w) p_width : function(w)
...@@ -1019,7 +1055,7 @@ CShapeDrawer.prototype = ...@@ -1019,7 +1055,7 @@ CShapeDrawer.prototype =
} }
if(rgba) if(rgba)
{ {
if (this.UniFill != null && this.UniFill.transparent != null) if (this.UniFill != null && this.UniFill.transparent != null && this.Graphics.ClearMode !== true)
rgba.A = this.UniFill.transparent; rgba.A = this.UniFill.transparent;
this.Graphics.b_color1(rgba.R, rgba.G, rgba.B, rgba.A); this.Graphics.b_color1(rgba.R, rgba.G, rgba.B, rgba.A);
} }
......
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