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

Unified Diff: printing/emf_win.h

Issue 10836330: Rasterize page before printing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
Index: printing/emf_win.h
diff --git a/printing/emf_win.h b/printing/emf_win.h
index b593e24f357ea51234bf24cc512248e86a477781..ca59c8e1730a6a0bb72fff49682b9113b2d3072c 100644
--- a/printing/emf_win.h
+++ b/printing/emf_win.h
@@ -23,6 +23,11 @@ class Size;
namespace printing {
+// http://msdn2.microsoft.com/en-us/library/ms535522.aspx
+// Windows 2000/XP: When a page in a spooled file exceeds approximately 350
+// MB, it can fail to print and not send an error message.
+const size_t kMetafileMaxSize = 350*1024*1024;
+
// Simple wrapper class that manage an EMF data stream and its virtual HDC.
class PRINTING_EXPORT Emf : public Metafile {
public:
@@ -184,6 +189,14 @@ class PRINTING_EXPORT Emf::Enumerator {
DISALLOW_COPY_AND_ASSIGN(Enumerator);
};
+// Returns true if metafile contains alpha blend.
+PRINTING_EXPORT bool IsAlphaBlendUsed(const Emf& metafile);
+
+// Returns new metafile with only bitmap created by playback of the current
+// metafile. Returns NULL if fails.
+PRINTING_EXPORT Emf* RasterizeMetafile(const Emf& metafile,
+ int raster_area_in_pixels);
+
} // namespace printing
#endif // PRINTING_EMF_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698