Commit c6a81ec3 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47548 954022d7-b5bf-4e40-9824-e11837661b57
parent 2fda0124
...@@ -95,7 +95,18 @@ ...@@ -95,7 +95,18 @@
<script type="text/javascript" src="../Common/Shapes/SerializeWriter.js"></script> <script type="text/javascript" src="../Common/Shapes/SerializeWriter.js"></script>
<script type="text/javascript" src="../Word/Editor/SerializeCommon.js"></script> <script type="text/javascript" src="../Word/Editor/SerializeCommon.js"></script>
<script type="text/javascript" src="../Word/Editor/GraphicObjects/ObjectTypes/Format.js"></script> <script type="text/javascript" src="../Word/Editor/GraphicObjects/ObjectTypes/Format.js"></script>
<script type="text/javascript" src="../Word/apiCommon.js"></script> <script type="text/javascript" src="../Word/Editor/GraphicObjects/ObjectTypes/CreateGeometry.js"></script>
<script type="text/javascript" src="../Word/Editor/GraphicObjects/ObjectTypes/Geometry.js"></script>
<script type="text/javascript" src="../Word/Editor/GraphicObjects/ObjectTypes/Path.js"></script>
<script type="text/javascript" src="../Word/Editor/GraphicObjects/Math.js"></script>
<script type="text/javascript" src="../Word/Drawing/ShapeDrawer.js"></script>
<script type="text/javascript" src="../Word/Drawing/ArcTo.js"></script>
<script type="text/javascript" src="../Word/Drawing/Hit.js"></script>
<script type="text/javascript" src="../Word/apiCommon.js"></script>
<!--for chart--> <!--for chart-->
<script type="text/javascript" src="../Common/SerializeCommonWordExcel.js"></script> <script type="text/javascript" src="../Common/SerializeCommonWordExcel.js"></script>
...@@ -142,7 +153,7 @@ ...@@ -142,7 +153,7 @@
<script src="model/DrawingObjects/Tracks/ResizeTracks.js"></script> <script src="model/DrawingObjects/Tracks/ResizeTracks.js"></script>
<script src="model/DrawingObjects/Tracks/RotateTracks.js"></script> <script src="model/DrawingObjects/Tracks/RotateTracks.js"></script>
<script src="model/DrawingObjects/Tracks/NewShapeTracks.js"></script>
<style type="text/css"> <style type="text/css">
#teamlab-title { #teamlab-title {
......
...@@ -171,7 +171,7 @@ CImage.prototype = ...@@ -171,7 +171,7 @@ CImage.prototype =
if(this.flipV) if(this.flipV)
global_MatrixTransformer.ScaleAppend(this.transform, 1, -1); global_MatrixTransformer.ScaleAppend(this.transform, 1, -1);
global_MatrixTransformer.RotateAppend(this.transform, -this.rot); global_MatrixTransformer.RotateRadAppend(this.transform, -this.rot);
global_MatrixTransformer.TranslateAppend(this.transform, this.x + hc, this.y + vc); global_MatrixTransformer.TranslateAppend(this.transform, this.x + hc, this.y + vc);
if(isRealObject(this.group)) if(isRealObject(this.group))
{ {
......
...@@ -31,7 +31,7 @@ function CShape(drawingBase) ...@@ -31,7 +31,7 @@ function CShape(drawingBase)
this.rot = null; this.rot = null;
this.flipH = null; this.flipH = null;
this.flipV = null; this.flipV = null;
this.transform = null; this.transform = new CMatrix();
this.invertTransform = null; this.invertTransform = null;
this.transformText = null; this.transformText = null;
this.invertTransformText = null; this.invertTransformText = null;
...@@ -126,6 +126,7 @@ CShape.prototype = ...@@ -126,6 +126,7 @@ CShape.prototype =
setPresetGeometry: function(presetGeom) setPresetGeometry: function(presetGeom)
{ {
this.spPr.geometry = CreateGeometry(presetGeom); this.spPr.geometry = CreateGeometry(presetGeom);
this.spPr.geometry.Init(5, 5);
}, },
setStyle: function(style) setStyle: function(style)
...@@ -203,6 +204,8 @@ CShape.prototype = ...@@ -203,6 +204,8 @@ CShape.prototype =
this.flipH = xfrm.flipH === true; this.flipH = xfrm.flipH === true;
this.flipV = xfrm.flipV === true; this.flipV = xfrm.flipV === true;
} }
if(isRealObject(this.spPr.geometry))
this.spPr.geometry.Recalculate(this.extX, this.extY);
this.transform.Reset(); this.transform.Reset();
var hc, vc; var hc, vc;
hc = this.extX*0.5; hc = this.extX*0.5;
...@@ -213,12 +216,13 @@ CShape.prototype = ...@@ -213,12 +216,13 @@ CShape.prototype =
if(this.flipV) if(this.flipV)
global_MatrixTransformer.ScaleAppend(this.transform, 1, -1); global_MatrixTransformer.ScaleAppend(this.transform, 1, -1);
global_MatrixTransformer.RotateAppend(this.transform, -this.rot); global_MatrixTransformer.RotateRadAppend(this.transform, -this.rot);
global_MatrixTransformer.TranslateAppend(this.transform, this.x + hc, this.y + vc); global_MatrixTransformer.TranslateAppend(this.transform, this.x + hc, this.y + vc);
if(isRealObject(this.group)) if(isRealObject(this.group))
{ {
global_MatrixTransformer.MultiplyAppend(t, this.group.getTransform()); global_MatrixTransformer.MultiplyAppend(this.transform, this.group.getTransform());
} }
this.invertTransform = global_MatrixTransformer.Invert(this.transform);
}, },
recalculateBrush: function() recalculateBrush: function()
...@@ -463,7 +467,7 @@ CShape.prototype = ...@@ -463,7 +467,7 @@ CShape.prototype =
var x_t = invert_transform.TransformPointX(x, y); var x_t = invert_transform.TransformPointX(x, y);
var y_t = invert_transform.TransformPointY(x, y); var y_t = invert_transform.TransformPointY(x, y);
if(isRealObject(this.spPr.geometry)) if(isRealObject(this.spPr.geometry))
return this.spPr.geometry.hitInPath({}, x_t, y_t); return this.spPr.geometry.hitInPath(this.drawingBase.getCanvasContext(), x_t, y_t);
return false; return false;
}, },
...@@ -473,7 +477,7 @@ CShape.prototype = ...@@ -473,7 +477,7 @@ CShape.prototype =
var x_t = invert_transform.TransformPointX(x, y); var x_t = invert_transform.TransformPointX(x, y);
var y_t = invert_transform.TransformPointY(x, y); var y_t = invert_transform.TransformPointY(x, y);
if(isRealObject(this.spPr.geometry)) if(isRealObject(this.spPr.geometry))
return this.spPr.geometry.hitInInnerArea({}, x_t, y_t); return this.spPr.geometry.hitInInnerArea(this.drawingBase.getCanvasContext(), x_t, y_t);
return x_t > 0 && x_t < this.extX && y_t > 0 && y_t < this.extY; return x_t > 0 && x_t < this.extX && y_t > 0 && y_t < this.extY;
}, },
...@@ -488,13 +492,13 @@ CShape.prototype = ...@@ -488,13 +492,13 @@ CShape.prototype =
var x_t = invert_transform.TransformPointX(x, y); var x_t = invert_transform.TransformPointX(x, y);
var y_t = invert_transform.TransformPointY(x, y); var y_t = invert_transform.TransformPointY(x, y);
var _hit_context = this.drawingDocument.CanvasHitContext; var _hit_context = his.drawingBase.getCanvasContext();
return (HitInLine(_hit_context, x_t, y_t, 0, 0, this.extX, 0) || return (HitInLine(_hit_context, x_t, y_t, 0, 0, this.extX, 0) ||
HitInLine(_hit_context, x_t, y_t, this.extX, 0, this.extX, this.extY)|| HitInLine(_hit_context, x_t, y_t, this.extX, 0, this.extX, this.extY)||
HitInLine(_hit_context, x_t, y_t, this.extX, this.extY, 0, this.extY)|| HitInLine(_hit_context, x_t, y_t, this.extX, this.extY, 0, this.extY)||
HitInLine(_hit_context, x_t, y_t, 0, this.extY, 0, 0) || HitInLine(_hit_context, x_t, y_t, 0, this.extY, 0, 0) /*||
HitInLine(_hit_context, x_t, y_t, this.extX*0.5, 0, this.extX*0.5, -this.drawingDocument.GetMMPerDot(TRACK_DISTANCE_ROTATE))); HitInLine(_hit_context, x_t, y_t, this.extX*0.5, 0, this.extX*0.5, -this.drawingDocument.GetMMPerDot(TRACK_DISTANCE_ROTATE))*/);
}, },
canRotate: function() canRotate: function()
......
...@@ -19,7 +19,7 @@ function NewShapeTrack(drawingObjects, presetGeom, startX, startY) ...@@ -19,7 +19,7 @@ function NewShapeTrack(drawingObjects, presetGeom, startX, startY)
this.transform = new CMatrix(); this.transform = new CMatrix();
var geometry = CreateGeometry(presetGeom); var geometry = CreateGeometry(presetGeom);
geometry.init(5, 5); geometry.Init(5, 5);
var brush = new CUniFill(); var brush = new CUniFill();
brush.fill = new CSolidFill(); brush.fill = new CSolidFill();
brush.fill.color.color = new CRGBColor(); brush.fill.color.color = new CRGBColor();
...@@ -77,6 +77,6 @@ function NewShapeTrack(drawingObjects, presetGeom, startX, startY) ...@@ -77,6 +77,6 @@ function NewShapeTrack(drawingObjects, presetGeom, startX, startY)
this.trackEnd = function() this.trackEnd = function()
{ {
this.drawingOjects.addGraphicObject(this.x, this.y, this.extX, this.extY, false, false, this.presetGeom)
}; };
} }
\ No newline at end of file
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