OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * The base class for simple filters that only modify the image content | 6 * The base class for simple filters that only modify the image content |
7 * but do not modify the image dimensions. | 7 * but do not modify the image dimensions. |
8 * @constructor | 8 * @constructor |
9 */ | 9 */ |
10 ImageEditor.Mode.Adjust = function(displayName) { | 10 ImageEditor.Mode.Adjust = function(displayName) { |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 * Blur filter. | 318 * Blur filter. |
319 * @constructor | 319 * @constructor |
320 */ | 320 */ |
321 ImageEditor.Mode.Blur = function() { | 321 ImageEditor.Mode.Blur = function() { |
322 ImageEditor.Mode.Adjust.call(this, 'Blur'); | 322 ImageEditor.Mode.Adjust.call(this, 'Blur'); |
323 }; | 323 }; |
324 | 324 |
325 ImageEditor.Mode.Blur.prototype = | 325 ImageEditor.Mode.Blur.prototype = |
326 {__proto__: ImageEditor.Mode.Adjust.prototype}; | 326 {__proto__: ImageEditor.Mode.Adjust.prototype}; |
327 | 327 |
328 ImageEditor.Mode.register(ImageEditor.Mode.Blur); | 328 // TODO(dgozman): register Mode.Blur in v2. |
329 | 329 |
330 ImageEditor.Mode.Blur.prototype.createTools = function(toolbar) { | 330 ImageEditor.Mode.Blur.prototype.createTools = function(toolbar) { |
331 toolbar.addRange('strength', 0, 0, 1, 100); | 331 toolbar.addRange('strength', 0, 0, 1, 100); |
332 toolbar.addRange('radius', 1, 1, 3); | 332 toolbar.addRange('radius', 1, 1, 3); |
333 }; | 333 }; |
334 | 334 |
335 /** | 335 /** |
336 * Sharpen filter. | 336 * Sharpen filter. |
337 * @constructor | 337 * @constructor |
338 */ | 338 */ |
339 ImageEditor.Mode.Sharpen = function() { | 339 ImageEditor.Mode.Sharpen = function() { |
340 ImageEditor.Mode.Adjust.call(this, 'Sharpen'); | 340 ImageEditor.Mode.Adjust.call(this, 'Sharpen'); |
341 }; | 341 }; |
342 | 342 |
343 ImageEditor.Mode.Sharpen.prototype = | 343 ImageEditor.Mode.Sharpen.prototype = |
344 {__proto__: ImageEditor.Mode.Adjust.prototype}; | 344 {__proto__: ImageEditor.Mode.Adjust.prototype}; |
345 | 345 |
346 ImageEditor.Mode.register(ImageEditor.Mode.Sharpen); | 346 // TODO(dgozman): register Mode.Sharpen in v2. |
347 | 347 |
348 ImageEditor.Mode.Sharpen.prototype.createTools = function(toolbar) { | 348 ImageEditor.Mode.Sharpen.prototype.createTools = function(toolbar) { |
349 toolbar.addRange('strength', 0, 0, 1, 100); | 349 toolbar.addRange('strength', 0, 0, 1, 100); |
350 toolbar.addRange('radius', 1, 1, 3); | 350 toolbar.addRange('radius', 1, 1, 3); |
351 }; | 351 }; |
OLD | NEW |