Home | History | Annotate | Download | only in image_editor

Lines Matching defs:Command

8  * Command queue is the only way to modify images.
10 * Command execution is asynchronous (callback-based).
47 * Attach the UI elements to the command queue.
74 * @return {boolean} True if the command queue is busy.
91 ImageUtil.trace.resetTimer('command-busy');
111 ImageUtil.trace.reportTimer('command-busy');
125 * Internal function to execute the command in a given context.
127 * @param {Command} command The command to execute.
132 CommandQueue.prototype.doExecute_ = function(command, uiContext, callback) {
143 command.execute(
154 * Executes the command.
156 * @param {Command} command Command to execute.
159 CommandQueue.prototype.execute = function(command, opt_keep_redo) {
165 this.undo_.push(command);
167 this.doExecute_(command, this.UIContext_, this.commit_.bind(this));
178 * Undo the most recent command.
186 var command = this.undo_.pop();
187 this.redo_.push(command);
192 var delay = command.revertView(
238 * Repeat the command that was recently un-done.
264 * Command object encapsulates an operation on an image and a way to visualize
267 * @param {string} name Command name.
270 function Command(name) {
275 * @return {string} String representation of the command.
277 Command.prototype.toString = function() {
278 return 'Command ' + this.name_;
282 * Execute the command and visualize its results.
287 * @param {Document} document Document on which to execute command.
293 Command.prototype.execute = function(document, srcCanvas, callback, uiContext) {
294 console.error('Command.prototype.execute not implemented');
304 Command.prototype.revertView = function(canvas, imageView) {
319 Command.prototype.createCanvas_ = function(
329 * Rotate command
332 * @extends {Command}
334 Command.Rotate = function(rotate90) {
335 Command.call(this, 'rotate(' + rotate90 * 90 + 'deg)');
339 Command.Rotate.prototype = { __proto__: Command.prototype };
342 Command.Rotate.prototype.execute = function(
359 Command.Rotate.prototype.revertView = function(canvas, imageView) {
365 * Crop command.
369 * @extends {Command}
371 Command.Crop = function(imageRect) {
372 Command.call(this, 'crop' + imageRect.toString());
376 Command.Crop.prototype = { __proto__: Command.prototype };
379 Command.Crop.prototype.execute = function(
392 Command.Crop.prototype.revertView = function(canvas, imageView) {
398 * Filter command.
400 * @param {string} name Command name.
404 * @extends {Command}
406 Command.Filter = function(name, filter, message) {
407 Command.call(this, name);
412 Command.Filter.prototype = { __proto__: Command.prototype };
415 Command.Filter.prototype.execute = function(