s/ol3/ol/

This commit is contained in:
Tom Payne
2012-09-24 14:21:41 +02:00
parent 6737220b83
commit f8c31ba45c
112 changed files with 3755 additions and 3755 deletions

56
src/ol/color.js Normal file
View File

@@ -0,0 +1,56 @@
goog.provide('ol.Color');
goog.require('goog.color');
/**
* @constructor
* @param {number} r Red.
* @param {number} g Green.
* @param {number} b Blue.
* @param {number} a Alpha.
*/
ol.Color = function(r, g, b, a) {
/**
* @type {number}
*/
this.r = r;
/**
* @type {number}
*/
this.g = g;
/**
* @type {number}
*/
this.b = b;
/**
* @type {number}
*/
this.a = a;
};
/**
* @param {string} str String.
* @param {number=} opt_a Alpha.
* @return {ol.Color} Color.
*/
ol.Color.createFromString = function(str, opt_a) {
var rgb = goog.color.hexToRgb(goog.color.parse(str).hex);
var a = opt_a || 255;
return new ol.Color(rgb[0], rgb[1], rgb[2], a);
};
/**
* @return {ol.Color} Clone.
*/
ol.Color.prototype.clone = function() {
return new ol.Color(this.r, this.g, this.b, this.a);
};