summaryrefslogtreecommitdiffstats
path: root/printing/emf_win.cc
diff options
context:
space:
mode:
Diffstat (limited to 'printing/emf_win.cc')
-rw-r--r--printing/emf_win.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/printing/emf_win.cc b/printing/emf_win.cc
index de3b7db..b7c6198 100644
--- a/printing/emf_win.cc
+++ b/printing/emf_win.cc
@@ -54,6 +54,14 @@ Emf::~Emf() {
DCHECK(!emf_ && !hdc_);
}
+bool Emf::Init(const void* src_buffer, uint32 src_buffer_size) {
+ DCHECK(!emf_ && !hdc_);
+ emf_ = SetEnhMetaFileBits(src_buffer_size,
+ reinterpret_cast<const BYTE*>(src_buffer));
+ DCHECK(emf_);
+ return emf_ != NULL;
+}
+
bool Emf::CreateDc(HDC sibling, const RECT* rect) {
DCHECK(!emf_ && !hdc_);
hdc_ = CreateEnhMetaFile(sibling, NULL, rect, NULL);
@@ -70,14 +78,6 @@ bool Emf::CreateFileBackedDc(HDC sibling, const RECT* rect,
return hdc_ != NULL;
}
-
-bool Emf::CreateFromData(const void* buffer, uint32 size) {
- DCHECK(!emf_ && !hdc_);
- emf_ = SetEnhMetaFileBits(size, reinterpret_cast<const BYTE*>(buffer));
- DCHECK(emf_);
- return emf_ != NULL;
-}
-
bool Emf::CreateFromFile(const FilePath& metafile_path) {
DCHECK(!emf_ && !hdc_);
emf_ = GetEnhMetaFile(metafile_path.value().c_str());