123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228 |
- define([
- '../Core/defaultValue',
- '../Core/defined',
- '../Core/defineProperties',
- '../Core/DeveloperError',
- '../Core/Event',
- './createPropertyDescriptor'
- ], function(
- defaultValue,
- defined,
- defineProperties,
- DeveloperError,
- Event,
- createPropertyDescriptor) {
- "use strict";
-
- var LabelGraphics = function() {
- this._text = undefined;
- this._textSubscription = undefined;
- this._font = undefined;
- this._fontSubscription = undefined;
- this._style = undefined;
- this._styleSubscription = undefined;
- this._fillColor = undefined;
- this._fillColorSubscription = undefined;
- this._outlineColor = undefined;
- this._outlineColorSubscription = undefined;
- this._outlineWidth = undefined;
- this._outlineWidthSubscription = undefined;
- this._horizontalOrigin = undefined;
- this._horizontalOriginSubscription = undefined;
- this._verticalOrigin = undefined;
- this._verticalOriginSubscription = undefined;
- this._eyeOffset = undefined;
- this._eyeOffsetSubscription = undefined;
- this._pixelOffset = undefined;
- this._pixelOffsetSubscription = undefined;
- this._scale = undefined;
- this._scaleSubscription = undefined;
- this._show = undefined;
- this._showSubscription = undefined;
- this._translucencyByDistance = undefined;
- this._translucencyByDistanceSubscription = undefined;
- this._pixelOffsetScaleByDistance = undefined;
- this._pixelOffsetScaleByDistanceSubscription = undefined;
- this._definitionChanged = new Event();
- };
- defineProperties(LabelGraphics.prototype, {
-
- definitionChanged : {
- get : function() {
- return this._definitionChanged;
- }
- },
-
- text : createPropertyDescriptor('text'),
-
- font : createPropertyDescriptor('font'),
-
- style : createPropertyDescriptor('style'),
-
- fillColor : createPropertyDescriptor('fillColor'),
-
- outlineColor : createPropertyDescriptor('outlineColor'),
-
- outlineWidth : createPropertyDescriptor('outlineWidth'),
-
- horizontalOrigin : createPropertyDescriptor('horizontalOrigin'),
-
- verticalOrigin : createPropertyDescriptor('verticalOrigin'),
-
- eyeOffset : createPropertyDescriptor('eyeOffset'),
-
- pixelOffset : createPropertyDescriptor('pixelOffset'),
-
- scale : createPropertyDescriptor('scale'),
-
- show : createPropertyDescriptor('show'),
-
- translucencyByDistance : createPropertyDescriptor('translucencyByDistance'),
-
- pixelOffsetScaleByDistance : createPropertyDescriptor('pixelOffsetScaleByDistance')
- });
-
- LabelGraphics.prototype.clone = function(result) {
- if (!defined(result)) {
- result = new LabelGraphics();
- }
- result.text = this.text;
- result.font = this.font;
- result.show = this.show;
- result.style = this.style;
- result.fillColor = this.fillColor;
- result.outlineColor = this.outlineColor;
- result.outlineWidth = this.outlineWidth;
- result.scale = this.scale;
- result.horizontalOrigin = this.horizontalOrigin;
- result.verticalOrigin = this.verticalOrigin;
- result.eyeOffset = this.eyeOffset;
- result.pixelOffset = this.pixelOffset;
- result.translucencyByDistance = this._translucencyByDistance;
- result.pixelOffsetScaleByDistance = this._pixelOffsetScaleByDistance;
- return result;
- };
-
- LabelGraphics.prototype.merge = function(source) {
-
- if (!defined(source)) {
- throw new DeveloperError('source is required.');
- }
-
- this.text = defaultValue(this.text, source.text);
- this.font = defaultValue(this.font, source.font);
- this.show = defaultValue(this.show, source.show);
- this.style = defaultValue(this.style, source.style);
- this.fillColor = defaultValue(this.fillColor, source.fillColor);
- this.outlineColor = defaultValue(this.outlineColor, source.outlineColor);
- this.outlineWidth = defaultValue(this.outlineWidth, source.outlineWidth);
- this.scale = defaultValue(this.scale, source.scale);
- this.horizontalOrigin = defaultValue(this.horizontalOrigin, source.horizontalOrigin);
- this.verticalOrigin = defaultValue(this.verticalOrigin, source.verticalOrigin);
- this.eyeOffset = defaultValue(this.eyeOffset, source.eyeOffset);
- this.pixelOffset = defaultValue(this.pixelOffset, source.pixelOffset);
- this.translucencyByDistance = defaultValue(this._translucencyByDistance, source._translucencyByDistance);
- this.pixelOffsetScaleByDistance = defaultValue(this._pixelOffsetScaleByDistance, source._pixelOffsetScaleByDistance);
- };
- return LabelGraphics;
- });
|