Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3262)

Unified Diff: chrome/browser/resources/file_manager/js/image_editor/image_buffer.js

Issue 7828044: [filebrowser] First step to image editor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Removed commented code. Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/file_manager/js/image_editor/image_buffer.js
===================================================================
--- chrome/browser/resources/file_manager/js/image_editor/image_buffer.js (revision 100141)
+++ chrome/browser/resources/file_manager/js/image_editor/image_buffer.js (working copy)
@@ -20,7 +20,7 @@
this.overlays_ = [];
this.addOverlay(new ImageBuffer.Margin(this.viewport_));
this.addOverlay(this.content_);
- this.addOverlay(new ImageBuffer.Overview(this.viewport_, this.content_));
+ // TODO(dgozman): consider adding overview in v2.
}
ImageBuffer.prototype.getViewport = function() { return this.viewport_ };
@@ -186,7 +186,7 @@
ImageBuffer.Margin.prototype.draw = function(context) {
context.save();
- context.fillStyle = '#F0F0F0';
+ context.fillStyle = '#000000';
context.strokeStyle = '#000000';
Rect.fillBetween(context,
this.viewport_.getImageBoundsOnScreen(),
@@ -302,6 +302,7 @@
this.canvas_.width = image.width;
this.canvas_.height = image.height;
+ this.clear();
Rect.drawImage(this.canvas_.getContext("2d"), image);
this.invalidateCaches();
@@ -309,6 +310,13 @@
this.viewport_.fitImage();
};
+ImageBuffer.Content.prototype.clear = function() {
+ var context = this.canvas_.getContext("2d");
+ context.globalAlpha = 1;
+ context.fillStyle = '#FFFFFF';
+ Rect.fill(context, new Rect(this.canvas_));
+};
+
/**
* @param {ImageData} imageData
*/

Powered by Google App Engine
This is Rietveld 408576698