-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathRenderer.js
More file actions
745 lines (598 loc) · 21.8 KB
/
Renderer.js
File metadata and controls
745 lines (598 loc) · 21.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
goog.provide('acgraph.vector.Renderer');
goog.require('goog.dom');
goog.require('goog.math.Rect');
goog.require('goog.net.ImageLoader');
/**
* Renderer base class (SVG, VML).
* This class defines common properties of SVG and VML renderers.
* @constructor
*/
acgraph.vector.Renderer = function() {
/** @type {Object.<string, Object.<string, goog.math.Rect>>} **/
this.textBoundsCache = {};
/** @type {Array.<string>} */
this.settingsAffectingSize = ['fontStyle', 'fontVariant', 'fontFamily', 'fontSize', 'fontWeight', 'letterSpacing', 'decoration'];
};
goog.addSingletonGetter(acgraph.vector.Renderer);
//region --- Section Utils ---
//----------------------------------------------------------------------------------------------------------------------
//
// Utils.
//
//----------------------------------------------------------------------------------------------------------------------
/**
* @param {Object} style The style of text.
* @return {goog.math.Rect} The width of space.
*/
acgraph.vector.Renderer.prototype.getSpaceBounds = function(style) {
var bounds;
if (this.isInBoundsCache(' ', style)) {
bounds = this.textBounds(' ', style);
} else {
var boundsStringWithSpace = this.measure('a a', style);
var boundsStringWithoutSpace = this.measure('aa', style);
var width = boundsStringWithSpace.width - boundsStringWithoutSpace.width;
bounds = new goog.math.Rect(0, boundsStringWithSpace.top, width, boundsStringWithSpace.height);
this.textBounds(' ', style, bounds);
}
return bounds;
};
/**
* @param {Object} style The style of text.
* @return {goog.math.Rect} The width of space.
*/
acgraph.vector.Renderer.prototype.getEmptyStringBounds = function(style) {
var bounds;
if (this.isInBoundsCache('', style)) {
bounds = this.textBounds('', style);
} else {
var boundsStringWithSpace = this.measure('a', style);
bounds = new goog.math.Rect(0, boundsStringWithSpace.top, 0, boundsStringWithSpace.height);
this.textBounds('', style, bounds);
}
return bounds;
};
/**
* Returns simple hash of a passed style object.
* @param {Object} value Style object.
* @return {string} Hash of a style object.
*/
acgraph.vector.Renderer.prototype.getStyleHash = function(value) {
var hash = '';
for (var j = 0, l = this.settingsAffectingSize.length; j < l; j++) {
var prop = value[this.settingsAffectingSize[j]];
if (goog.isDef(prop)) hash += prop + '|';
}
return hash;
};
/**
* Getter/lazy setter for text bounds. All bounds cached.
* If opt_bounds defined then if cache doesn't contain bounds for passed text, opt_bounds will be set. Otherwise
* nothing will be done and will be returned bounds from cache.
* @param {string} text Text for getting bounds.
* @param {Object} style Text style object.
* @param {goog.math.Rect=} opt_bounds Text bounds.
* @return {goog.math.Rect}
*/
acgraph.vector.Renderer.prototype.textBounds = function(text, style, opt_bounds) {
var boundsCache = this.textBoundsCache;
var styleHash = this.getStyleHash(style);
var styleCache = boundsCache[styleHash];
if (!styleCache) styleCache = boundsCache[styleHash] = {};
var textBoundsCache = styleCache[text];
return textBoundsCache ?
textBoundsCache :
styleCache[text] = opt_bounds ? opt_bounds : this.measure(text, style);
};
/**
* Measure DOM text element.
* @param {Element} element .
* @param {string} text .
* @param {Object} style .
* @return {goog.math.Rect} .
*/
acgraph.vector.Renderer.prototype.getBBox = function(element, text, style) {
return this.textBounds(text, style);
};
/**
* Whether the cache contains bounds of passed text and style.
* @param {string} text .
* @param {Object} style .
* @return {boolean} .
*/
acgraph.vector.Renderer.prototype.isInBoundsCache = function(text, style) {
var boundsCache = this.textBoundsCache;
var styleHash = this.getStyleHash(style);
var styleCache = boundsCache[styleHash];
return !!(styleCache && styleCache[text]);
};
/**
* In this mode the result angle will visually correspond the original setting, non regarding browser scaling
* duplication (so, for objects that do not have 1:1 proportion with the original figure, the gradient angle
* will correspond to the initial value due to internal calculations).
* @param {number} sourceAngle Source angle in degrees.
* @param {!goog.math.Rect} bounds Bounds.
* @return {number} Calculated angle in degrees.
*/
acgraph.vector.Renderer.prototype.saveGradientAngle = function(sourceAngle, bounds) {
/** @type {number} */
var largeSide;
/** @type {number} */
var smallerSide;
/** @type {number} */
var sideRatio;
sourceAngle = goog.math.standardAngle(sourceAngle);
// define proportions
if (bounds.height == bounds.width) {
return sourceAngle;
} else if (bounds.height < bounds.width) {
largeSide = bounds.width;
smallerSide = bounds.height;
sideRatio = smallerSide / largeSide;
} else {
largeSide = bounds.height;
smallerSide = bounds.width;
sideRatio = largeSide / smallerSide;
}
/**
* Imagine a square, gradient line goes throigh the center (crossing of diagonal lines),
* drop a perpendicular from the center to one of the sides, so this perpendicular line
* and gradient line have an acute angle between them, so there is a right triangle.
* We know the sourceAngle in this triangle and adjacent cathetus - b, we need to find opposite cathetus - a.
* @type {number}
*/
var b = largeSide / 2;
/** @type {number} */
var a = Math.tan(goog.math.toRadians(sourceAngle)) * b;
/**
* After we find the distance between the crossing of gradient line and side of a square and
* the crossing of perpendicular and this side (greater side of the initial rectangle)
* we extend the cathetus (multiply by sideRatio). In other words:
* if in an initial rectangle the width is lesser than height, we need to extend b cathetus,
* otherwise - a cathetus. And then we find the angle in a new triangle (with the extended side).
* @type {number}
*/
var targetAngle = goog.math.toDegrees(Math.atan(a / b * sideRatio));
// transform angle depending on a quarter
if ((sourceAngle > 90) && (sourceAngle <= 270)) { // 2 and 3 quarter
targetAngle = 180 + targetAngle;
} else if ((sourceAngle > 270) && (sourceAngle <= 360)) { // 4 quarter
targetAngle = 360 + targetAngle;
}
return targetAngle % 360;
};
/**
* Sets ID to DOM element.
* @param {(!acgraph.vector.Element|!acgraph.vector.Stage)} element - Element.
*/
acgraph.vector.Renderer.prototype.setId = function(element) {
this.setIdInternal(element.domElement(), /** @type {string} */(element.id()));
};
/**
* Sets vector effect to DOM element.
* @param {!acgraph.vector.Element} element - Element.
* @param {boolean} disabled - isDisabled.
*/
acgraph.vector.Renderer.prototype.setDisableStrokeScaling = goog.nullFunction;
/**
* Sets visibility to DOM element.
* @param {!acgraph.vector.Element} element Element.
*/
acgraph.vector.Renderer.prototype.setVisible = goog.abstractMethod;
/**
* Sets title to DOM element.
* @param {(!acgraph.vector.Element|!acgraph.vector.Stage)} element - Element.
* @param {?string} title - Title value.
*/
acgraph.vector.Renderer.prototype.setTitle = goog.nullFunction;
/**
* Sets title to DOM element.
* @param {(!acgraph.vector.Element|!acgraph.vector.Stage)} element - Element.
* @param {?string} title - Title value.
*/
acgraph.vector.Renderer.prototype.setDesc = goog.nullFunction;
/**
* Sets attr to DOM element.
* @param {!acgraph.vector.Element} element - Element.
* @param {Object} attrs - Attributes key-value map. If value is null, attribute will be removed.
*/
acgraph.vector.Renderer.prototype.setAttributes = function(element, attrs) {
var domElement = element.domElement();
if (domElement && goog.isObject(attrs)) {
for (var key in attrs) {
var value = attrs[key];
if (goog.isNull(value)) {
this.removeAttr(domElement, key);
} else {
this.setAttr(domElement, key, /** @type {string} */ (value));
}
}
}
};
/**
* Gets attr from DOM element.
* @param {?Element} element - Element or null. If null, must return undefined.
* @param {string} key - Name of attribute.
* @return {*}
*/
acgraph.vector.Renderer.prototype.getAttribute = function(element, key) {
return element ? element.getAttribute(key) : void 0;
};
//endregion
//----------------------------------------------------------------------------------------------------------------------
//
// Root DOM element for vector stage.
//
//----------------------------------------------------------------------------------------------------------------------
/**
* Create root DOM element for stage.
* @return {Element} svg/vml element.
*/
acgraph.vector.Renderer.prototype.createStageElement = goog.abstractMethod;
/**
* Sets DOM element size for stage. TODO:Params will be changed.
* @param {Element} el DOM element.
* @param {number|string} width Width.
* @param {number|string} height Height.
*/
acgraph.vector.Renderer.prototype.setStageSize = goog.abstractMethod;
//----------------------------------------------------------------------------------------------------------------------
//
// Defs.
//
//----------------------------------------------------------------------------------------------------------------------
/**
* Creates DOM element for Defs.
* @return {Element} Defs.
*/
acgraph.vector.Renderer.prototype.createDefsElement = goog.abstractMethod;
/**
* Creates DOM element of linear gradient.
* @return {Element} DOM element.
*/
acgraph.vector.Renderer.prototype.createLinearGradientElement = goog.abstractMethod;
/**
* Creates DOM element of radial gradient.
* @return {Element} DOM element.
*/
acgraph.vector.Renderer.prototype.createRadialGradientElement = goog.abstractMethod;
/**
* Sets attributes to a given element. They are set as a hash array, where each key is a name of a particular attribute.
* @param {Element} el The element.
* @param {Object} attrs The hash array of attributes.
* @protected
*/
acgraph.vector.Renderer.prototype.setAttrs = function(el, attrs) {
for (var key in attrs)
this.setAttr(el, key, attrs[key]);
};
/**
* Sets a given attribute with a given value for a given element.
* @param {Element} el The element.
* @param {string} key The name of the attribute.
* @param {(string|number)} value The value of the attribute.
* @protected
*/
acgraph.vector.Renderer.prototype.setAttr = function(el, key, value) {
el.setAttribute(key, value);
};
/**
* Removes an attribute with a given name from a given element.
* @param {Element} el The element.
* @param {string} key The name of the attribute.
* @protected
*/
acgraph.vector.Renderer.prototype.removeAttr = function(el, key) {
el.removeAttribute(key);
};
/**
* Sets id to element.
* @param {?Element} element - Element.
* @param {string} id - ID to be set.
*/
acgraph.vector.Renderer.prototype.setIdInternal = function(element, id) {
if (element) {
if (id)
this.setAttr(element, 'id', id);
else
this.removeAttr(element, 'id');
}
};
/**
* Serializes a given Path and converts its data to a String which can be used in SVG.
* @param {acgraph.vector.PathBase} path The Path to serialize.
* @param {boolean=} opt_transformed Use transformed instead of original.
* @return {?string} A representation which can be used in SVG.
* @protected
*/
acgraph.vector.Renderer.prototype.getPathString = function(path, opt_transformed) {
if (path.isEmpty()) return null;
/** @type {!Array.<string|number>} */
var list = [];
var segmentNamesMap = this.pathSegmentNamesMap;
var func = opt_transformed ? path.forEachTransformedSegment : path.forEachSegment;
func.call(path, function(segment, args) {
var name = segmentNamesMap[segment];
if (name) {
list.push(name);
if (segment == acgraph.vector.PathBase.Segment.ARCTO) {
this.pushArcToPathString(list, args);
} else if (segment != acgraph.vector.PathBase.Segment.CLOSE) {
this.pushToArgs(list, args);
}
}
}, this);
return list.join(' ');
};
/**
* @param {Array.<string|number>} list
* @param {Array.<number>} args
* @protected
*/
acgraph.vector.Renderer.prototype.pushArcToPathString = function(list, args) {
/** @type {number} */
var extent = args[3];
list.push(args[0], args[1],
0, Math.abs(extent) > 180 ? 1 : 0, extent > 0 ? 1 : 0,
args[4], args[5]);
};
/**
* @param {Array.<string|number>} list
* @param {Array.<number>} args
* @protected
*/
acgraph.vector.Renderer.prototype.pushToArgs = function(list, args) {
acgraph.utils.partialApplyingArgsToFunction(Array.prototype.push, args, list);
};
//----------------------------------------------------------------------------------------------------------------------
//
// DOM elements for primitives.
//
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
// Layer.
//----------------------------------------------------------------------------------------------------------------------
/**
* Creates DOM element of a layer.
* @return {Element} Layer.
*/
acgraph.vector.Renderer.prototype.createLayerElement = goog.abstractMethod;
/**
* Sets size to VML layer. Take layer values and calculate layer size
* and position in parent.
* @param {!acgraph.vector.Layer} layer Layer.
*/
acgraph.vector.Renderer.prototype.setLayerSize = goog.abstractMethod;
//----------------------------------------------------------------------------------------------------------------------could
// Circle.
//----------------------------------------------------------------------------------------------------------------------
/**
* Creates and returns DOM circle.
* @return {Element} DOM circle.
*/
acgraph.vector.Renderer.prototype.createCircleElement = goog.abstractMethod;
/**
* Sets DOM circle parameters.
* @param {!acgraph.vector.Circle} circle Circle.
*/
acgraph.vector.Renderer.prototype.setCircleProperties = goog.abstractMethod;
/**
* Creates svg element - pattern.
* @return {Element} Pattern.
*/
acgraph.vector.Renderer.prototype.createFillPatternElement = goog.abstractMethod;
/**
* Set properties for element of fill pattern.
* @param {!acgraph.vector.PatternFill} fill Fill.
*/
acgraph.vector.Renderer.prototype.setFillPatternProperties = goog.abstractMethod;
/**
* Creates DOM image.
* @return {Element} Image.
*/
acgraph.vector.Renderer.prototype.createImageElement = goog.abstractMethod;
/**
* Set properties for the image DOM element.
* @param {!acgraph.vector.Image} image Image object.
*/
acgraph.vector.Renderer.prototype.setImageProperties = goog.abstractMethod;
/**
* Creates and returns DOM element for Text.
* @return {Element} DOM Element.
*/
acgraph.vector.Renderer.prototype.createTextElement = goog.abstractMethod;
/**
* Creates and returns DOM element for Text Segment.
* @return {Element} Test Segment DOM Element.
*/
acgraph.vector.Renderer.prototype.createTextSegmentElement = goog.abstractMethod;
/**
* Creates and returns DOM element for Text Path Element.
* @return {Element} .
*/
acgraph.vector.Renderer.prototype.createTextPathElement = function() { return null; };
/**
* Creates and returns additional DOM element for the text segment. It contains the text directly.
* @param {string} text Text.
* @return {Element|Text} Text Node DOM Element.
*/
acgraph.vector.Renderer.prototype.createTextNode = goog.abstractMethod;
/**
* Set text position.
* @param {!acgraph.vector.Text} element Text element.
*/
acgraph.vector.Renderer.prototype.setTextPosition = goog.abstractMethod;
/**
* Set the properties of the text.
* @param {!acgraph.vector.Text} element Text element.
*/
acgraph.vector.Renderer.prototype.setTextProperties = goog.abstractMethod;
/**
* Set text segment position.
* @param {!acgraph.vector.TextSegment} element Text element.
*/
acgraph.vector.Renderer.prototype.setTextSegmentPosition = goog.abstractMethod;
/**
* Set the properties of the text segment.
* @param {!acgraph.vector.TextSegment} textSegment Text segment element.
*/
acgraph.vector.Renderer.prototype.setTextSegmentProperties = goog.abstractMethod;
/**
* Sets the cursor properties to the primitive DOM element. If cursor is null - cursor properties will be removed from
* dom element style.
* @param {!acgraph.vector.Element} element - Element.
* @param {?acgraph.vector.Cursor} cursor - Cursor type.
*/
acgraph.vector.Renderer.prototype.setCursorProperties = goog.abstractMethod;
/**
* For VML texts needs some another approach for calc text segments position. It's be notify that need or not
* use another logic.
* @return {boolean} to be or not to be.
*/
acgraph.vector.Renderer.prototype.needsAnotherBehaviourForCalcText = function() {
return false;
};
/**
* Creates and returns DOM path.
* @return {Element} Path.
*/
acgraph.vector.Renderer.prototype.createPathElement = goog.abstractMethod;
/**
* Applies Path properties to DOM path.
* @param {!acgraph.vector.PathBase} path Path.
*/
acgraph.vector.Renderer.prototype.setPathProperties = goog.abstractMethod;
//----------------------------------------------------------------------------------------------------------------------
// Ellipse
//----------------------------------------------------------------------------------------------------------------------
/**
* Creates and returns DOM ellipse.
* @return {Element} Ellipse.
*/
acgraph.vector.Renderer.prototype.createEllipseElement = goog.abstractMethod;
/**
* Sets parameter to DOM ellipse.
* @param {!acgraph.vector.Ellipse} ellipse Ellipse.
*/
acgraph.vector.Renderer.prototype.setEllipseProperties = goog.abstractMethod;
//----------------------------------------------------------------------------------------------------------------------
//
// Coloring.
//
//----------------------------------------------------------------------------------------------------------------------
/**
* Sets fill setting to DOM element.
* @param {!acgraph.vector.Shape} element Element.
*/
acgraph.vector.Renderer.prototype.applyFill = goog.abstractMethod;
/**
* Sets stroke settings to DOM element.
* @param {!acgraph.vector.Shape} element Element.
*/
acgraph.vector.Renderer.prototype.applyStroke = goog.abstractMethod;
/**
* Sets fill and stroke to DOM element.
* @param {!acgraph.vector.Shape} element Element.
*/
acgraph.vector.Renderer.prototype.applyFillAndStroke = goog.abstractMethod;
/**
* Load image state getter.
* @return {boolean} .
*/
acgraph.vector.Renderer.prototype.isImageLoading = function() {
return false;
};
/**
* Image loader getter.
* @return {goog.net.ImageLoader} .
*/
acgraph.vector.Renderer.prototype.getImageLoader = function() {
if (!this.imageLoader_ || this.imageLoader_.isDisposed())
this.imageLoader_ = new goog.net.ImageLoader(/** @type {Element} */(acgraph.window['document']['body']));
return this.imageLoader_;
};
/**
* Whether is image loader.
* @return {boolean}
*/
acgraph.vector.Renderer.prototype.isImageLoader = function() {
return !!(this.imageLoader_ && !this.imageLoader_.isDisposed());
};
//region --- Section Transformations ---
//----------------------------------------------------------------------------------------------------------------------
//
// Transformations
//
//----------------------------------------------------------------------------------------------------------------------
/**
* Sets transformation to DOM element.
* @param {!acgraph.vector.Element} element Element.
*/
acgraph.vector.Renderer.prototype.setTransformation = goog.abstractMethod;
/**
* Sets transformation to DOM path.
* @param {!acgraph.vector.PathBase} element Element.
*/
acgraph.vector.Renderer.prototype.setPathTransformation = goog.abstractMethod;
/**
* Sets transformation to DOM image.
* @param {!acgraph.vector.Image} element Element.
*/
acgraph.vector.Renderer.prototype.setImageTransformation = goog.abstractMethod;
/**
* Sets transformation to DOM Ellipse.
* @param {!acgraph.vector.Ellipse} element Element.
*/
acgraph.vector.Renderer.prototype.setEllipseTransformation = goog.abstractMethod;
/**
* Sets transformation to DOM Layer.
* @param {!acgraph.vector.Layer} element Element.
*/
acgraph.vector.Renderer.prototype.setLayerTransformation = goog.abstractMethod;
/**
* Sets transformation to DOM Text.
* @param {!acgraph.vector.Text} element Element.
*/
acgraph.vector.Renderer.prototype.setTextTransformation = goog.abstractMethod;
/**
* Sets transformation to DOM pattern fill.
* @param {!acgraph.vector.PatternFill} element Element.
*/
acgraph.vector.Renderer.prototype.setPatternTransformation = goog.abstractMethod;
/**
* Tells element if it needs to rerender transformation if parent transformation has changed.
* @return {boolean} Rerender or not.
*/
acgraph.vector.Renderer.prototype.needsReRenderOnParentTransformationChange = function() {
return false;
};
//endregion
//region --- Section Clip ---
//----------------------------------------------------------------------------------------------------------------------
//
// Clip
//
//----------------------------------------------------------------------------------------------------------------------
/**
* Creates clipping rectangle DOM, if it is applicable for this renderer.
* @return {!Element} Clip element.
*/
acgraph.vector.Renderer.prototype.createClipElement = goog.abstractMethod;
/**
* Sets the pointer events property to element.
* @param {!acgraph.vector.Element} element Primitive.
*/
acgraph.vector.Renderer.prototype.setPointerEvents = goog.abstractMethod;
/**
* Sets clipping to element.
* @param {!acgraph.vector.Element} element Element.
*/
acgraph.vector.Renderer.prototype.setClip = goog.abstractMethod;
/**
* Tells element if it needs to rerender clipping if parent bounds has changed.
* @return {boolean} Rerender or not.
*/
acgraph.vector.Renderer.prototype.needsReClipOnBoundsChange = function() {
return false;
};
//endregion