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

Unified Diff: Source/platform/DragImage.h

Issue 1290133002: SkImage-ify DragImage (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: expectations Created 5 years, 4 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
« no previous file with comments | « Source/core/page/DragController.cpp ('k') | Source/platform/DragImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/DragImage.h
diff --git a/Source/platform/DragImage.h b/Source/platform/DragImage.h
index 8579e303ae526bc66676c13e1d37b3b51b993ec0..6c3acfa7ff33bb1cb15fbbbbb19f19f764e76c32 100644
--- a/Source/platform/DragImage.h
+++ b/Source/platform/DragImage.h
@@ -26,6 +26,7 @@
#ifndef DragImage_h
#define DragImage_h
+#include "platform/geometry/FloatSize.h"
#include "platform/geometry/IntSize.h"
#include "platform/graphics/GraphicsTypes.h"
#include "platform/graphics/ImageOrientation.h"
@@ -41,17 +42,21 @@ class KURL;
class PLATFORM_EXPORT DragImage {
public:
- static PassOwnPtr<DragImage> create(Image*, RespectImageOrientationEnum = DoNotRespectImageOrientation, float deviceScaleFactor = 1, InterpolationQuality = InterpolationHigh);
+ static PassOwnPtr<DragImage> create(Image*,
+ RespectImageOrientationEnum = DoNotRespectImageOrientation, float deviceScaleFactor = 1,
+ InterpolationQuality = InterpolationHigh, float opacity = 1,
+ const FloatSize& imageScale = FloatSize(1, 1));
+
static PassOwnPtr<DragImage> create(const KURL&, const String& label, const FontDescription& systemFont, float deviceScaleFactor);
~DragImage();
+ static FloatSize clampedImageScale(const Image&, const IntSize&, const IntSize& maxSize);
+
const SkBitmap& bitmap() { return m_bitmap; }
float resolutionScale() const { return m_resolutionScale; }
IntSize size() const { return IntSize(m_bitmap.width(), m_bitmap.height()); }
- void fitToMaxSize(const IntSize& srcSize, const IntSize& maxSize);
void scale(float scaleX, float scaleY);
- void dissolveToFraction(float fraction);
private:
DragImage(const SkBitmap&, float resolutionScale, InterpolationQuality);
« no previous file with comments | « Source/core/page/DragController.cpp ('k') | Source/platform/DragImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698