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

updateRect у graphics

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56406 954022d7-b5bf-4e40-9824-e11837661b57
parent a9bf5f3b
This diff is collapsed.
...@@ -784,6 +784,16 @@ CImageShape.prototype = ...@@ -784,6 +784,16 @@ CImageShape.prototype =
draw: function(graphics, transform) draw: function(graphics, transform)
{ {
if(graphics.updatedRect)
{
var rect = graphics.updatedRect;
var bounds = this.bounds;
if(bounds.x > rect.x + rect.w
|| bounds.y > rect.y + rect.h
|| bounds.x + bounds.w < rect.x
|| bounds.y + bounds.h < rect.y)
return;
}
var _transform = transform ? transform :this.transform; var _transform = transform ? transform :this.transform;
graphics.SetIntegerGrid(false); graphics.SetIntegerGrid(false);
graphics.transform3(_transform, false); graphics.transform3(_transform, false);
......
...@@ -1884,6 +1884,9 @@ CShape.prototype = ...@@ -1884,6 +1884,9 @@ CShape.prototype =
recalculateTextStyles: function (level) recalculateTextStyles: function (level)
{ {
return ExecuteNoHistory(function()
{
var parent_objects = this.getParentObjects(); var parent_objects = this.getParentObjects();
var default_style = new CStyle("defaultStyle", null, null, null); var default_style = new CStyle("defaultStyle", null, null, null);
default_style.ParaPr.Spacing.LineRule = linerule_Auto; default_style.ParaPr.Spacing.LineRule = linerule_Auto;
...@@ -2038,6 +2041,7 @@ CShape.prototype = ...@@ -2038,6 +2041,7 @@ CShape.prototype =
this.compiledStyles[level] = {styles: Styles, lastId: last_style_id}; this.compiledStyles[level] = {styles: Styles, lastId: last_style_id};
return this.compiledStyles[level]; return this.compiledStyles[level];
}, this, []);
}, },
recalculateBrush: function () { recalculateBrush: function () {
...@@ -3080,6 +3084,16 @@ CShape.prototype = ...@@ -3080,6 +3084,16 @@ CShape.prototype =
draw: function (graphics, transform, transformText, pageIndex) { draw: function (graphics, transform, transformText, pageIndex) {
if(graphics.updatedRect)
{
var rect = graphics.updatedRect;
var bounds = this.bounds;
if(bounds.x > rect.x + rect.w
|| bounds.y > rect.y + rect.h
|| bounds.x + bounds.w < rect.x
|| bounds.y + bounds.h < rect.y)
return;
}
var _transform = transform ? transform : this.transform; var _transform = transform ? transform : this.transform;
var _transform_text = transformText ? transformText : this.transformText; var _transform_text = transformText ? transformText : this.transformText;
if (graphics.IsSlideBoundsCheckerType === true) { if (graphics.IsSlideBoundsCheckerType === true) {
...@@ -3686,12 +3700,12 @@ CShape.prototype = ...@@ -3686,12 +3700,12 @@ CShape.prototype =
}, },
hitInInnerArea: function (x, y) { hitInInnerArea: function (x, y) {
if (this.brush != null && this.brush.fill != null if ((this.getObjectType && this.getObjectType() === historyitem_type_ChartSpace) || this.brush != null && this.brush.fill != null
&& this.brush.fill.type != FILL_TYPE_NOFILL) { && this.brush.fill.type != FILL_TYPE_NOFILL) {
var invert_transform = this.getInvertTransform(); var invert_transform = this.getInvertTransform();
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) && isRealObject(this.spPr.geometry)) if (isRealObject(this.spPr) && isRealObject(this.spPr.geometry) && !(this.getObjectType && this.getObjectType() === historyitem_type_ChartSpace))
return this.spPr.geometry.hitInInnerArea(this.getCanvasContext(), x_t, y_t); return this.spPr.geometry.hitInInnerArea(this.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;
} }
......
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