This change adds a stability value to the api annotation, with 'experimental' as default value. enum, typedef and event annotations are never exportable, but api annotations are needed there to make them appear in the docs. Nested typedefs are no longer inlined recursively, because the resulting tables get too wide with the current template.
106 lines
1.7 KiB
JavaScript
106 lines
1.7 KiB
JavaScript
goog.provide('ol.style.Stroke');
|
|
|
|
goog.require('ol.color');
|
|
|
|
|
|
|
|
/**
|
|
* @constructor
|
|
* @param {olx.style.StrokeOptions=} opt_options Options.
|
|
* @todo api
|
|
*/
|
|
ol.style.Stroke = function(opt_options) {
|
|
|
|
var options = goog.isDef(opt_options) ? opt_options : {};
|
|
|
|
/**
|
|
* @private
|
|
* @type {ol.Color|string}
|
|
*/
|
|
this.color_ = goog.isDef(options.color) ? options.color : null;
|
|
|
|
/**
|
|
* @private
|
|
* @type {string|undefined}
|
|
*/
|
|
this.lineCap_ = options.lineCap;
|
|
|
|
/**
|
|
* @private
|
|
* @type {Array.<number>}
|
|
*/
|
|
this.lineDash_ = goog.isDef(options.lineDash) ? options.lineDash : null;
|
|
|
|
/**
|
|
* @private
|
|
* @type {string|undefined}
|
|
*/
|
|
this.lineJoin_ = options.lineJoin;
|
|
|
|
/**
|
|
* @private
|
|
* @type {number|undefined}
|
|
*/
|
|
this.miterLimit_ = options.miterLimit;
|
|
|
|
/**
|
|
* @private
|
|
* @type {number|undefined}
|
|
*/
|
|
this.width_ = options.width;
|
|
};
|
|
|
|
|
|
/**
|
|
* @return {ol.Color|string} Color.
|
|
* @todo api
|
|
*/
|
|
ol.style.Stroke.prototype.getColor = function() {
|
|
return this.color_;
|
|
};
|
|
|
|
|
|
/**
|
|
* @return {string|undefined} Line cap.
|
|
* @todo api
|
|
*/
|
|
ol.style.Stroke.prototype.getLineCap = function() {
|
|
return this.lineCap_;
|
|
};
|
|
|
|
|
|
/**
|
|
* @return {Array.<number>} Line dash.
|
|
* @todo api
|
|
*/
|
|
ol.style.Stroke.prototype.getLineDash = function() {
|
|
return this.lineDash_;
|
|
};
|
|
|
|
|
|
/**
|
|
* @return {string|undefined} Line join.
|
|
* @todo api
|
|
*/
|
|
ol.style.Stroke.prototype.getLineJoin = function() {
|
|
return this.lineJoin_;
|
|
};
|
|
|
|
|
|
/**
|
|
* @return {number|undefined} Miter limit.
|
|
* @todo api
|
|
*/
|
|
ol.style.Stroke.prototype.getMiterLimit = function() {
|
|
return this.miterLimit_;
|
|
};
|
|
|
|
|
|
/**
|
|
* @return {number|undefined} Width.
|
|
* @todo api
|
|
*/
|
|
ol.style.Stroke.prototype.getWidth = function() {
|
|
return this.width_;
|
|
};
|