2017-02-23 03:10:48 +00:00
|
|
|
var ScaleModes = require('../renderer/ScaleModes');
|
|
|
|
|
|
|
|
// ScaleMode Component
|
|
|
|
|
|
|
|
var ScaleMode = {
|
|
|
|
|
2017-02-24 01:45:15 +00:00
|
|
|
_scaleMode: ScaleModes.DEFAULT,
|
|
|
|
|
2017-02-23 03:10:48 +00:00
|
|
|
scaleMode: {
|
|
|
|
|
|
|
|
get: function ()
|
|
|
|
{
|
2017-02-24 01:45:15 +00:00
|
|
|
return this._scaleMode;
|
2017-02-23 03:10:48 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
set: function (value)
|
|
|
|
{
|
|
|
|
if (value === ScaleModes.LINEAR || value === ScaleModes.NEAREST)
|
|
|
|
{
|
2017-02-24 01:45:15 +00:00
|
|
|
this._scaleMode = value;
|
2017-02-23 03:10:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-04-21 02:12:25 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
setScaleMode: function (value)
|
|
|
|
{
|
|
|
|
this.scaleMode = value;
|
|
|
|
|
|
|
|
return this;
|
2017-02-23 03:10:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = ScaleMode;
|