Commit 62515dfb authored by Dmitry.Vikulov's avatar Dmitry.Vikulov Committed by Alexander.Trofimov

Смена типа автофигуры

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48170 954022d7-b5bf-4e40-9824-e11837661b57
parent daf7959d
...@@ -2101,6 +2101,10 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -2101,6 +2101,10 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
ws.objectRender.unGroupGraphicObjects(); ws.objectRender.unGroupGraphicObjects();
}, },
asc_changeShapeType: function(value) {
this.asc_setGraphicObjectProps(new asc_CImgProperty( {ShapeProperties:{type:value}} ));
},
asc_getGraphicObjectProps: function() { asc_getGraphicObjectProps: function() {
var ws = this.wb.getWorksheet(); var ws = this.wb.getWorksheet();
return ws.objectRender.controller.getGraphicObjectProps(); return ws.objectRender.controller.getGraphicObjectProps();
......
...@@ -1002,6 +1002,56 @@ CShape.prototype = ...@@ -1002,6 +1002,56 @@ CShape.prototype =
} }
}, },
calculateTransformMatrix: function()
{
var _transform = new CMatrix();
var _horizontal_center = this.absExtX*0.5;
var _vertical_center = this.absExtY*0.5;
global_MatrixTransformer.TranslateAppend(_transform, -_horizontal_center, -_vertical_center);
if(this.absFlipH)
{
global_MatrixTransformer.ScaleAppend(_transform, -1, 1);
}
if(this.absFlipV)
{
global_MatrixTransformer.ScaleAppend(_transform, 1, -1);
}
global_MatrixTransformer.RotateRadAppend(_transform, -this.absRot);
global_MatrixTransformer.TranslateAppend(_transform, this.absOffsetX, this.absOffsetY);
global_MatrixTransformer.TranslateAppend(_transform, _horizontal_center, _vertical_center);
if(this.mainGroup !== null)
{
global_MatrixTransformer.MultiplyAppend(_transform, this.mainGroup.getTransform());
}
this.transform = _transform;
this.ownTransform = _transform.CreateDublicate();
},
calculateAfterResize: function()
{
if(this.spPr.geometry !== null)
this.spPr.geometry.Recalculate(this.extX, this.extY);
//this.calculateTransformMatrix();
this.calculateContent();
//this.calculateTransformTextMatrix();
this.calculateLeftTopPoint();
},
calculateLeftTopPoint: function()
{
var _horizontal_center = this.absExtX*0.5;
var _vertical_enter = this.absExtY*0.5;
var _sin = Math.sin(this.absRot);
var _cos = Math.cos(this.absRot);
this.absXLT = -_horizontal_center*_cos + _vertical_enter*_sin +this.absOffsetX + _horizontal_center;
this.absYLT = -_horizontal_center*_sin - _vertical_enter*_cos +this.absOffsetY + _vertical_enter;
},
drawAdjustments: function(drawingDocument) drawAdjustments: function(drawingDocument)
{ {
if(isRealObject(this.spPr.geometry)) if(isRealObject(this.spPr.geometry))
......
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