diff options
Diffstat (limited to 'printing')
-rw-r--r-- | printing/emf_win.cc | 2 | ||||
-rw-r--r-- | printing/print_settings.cc | 4 | ||||
-rw-r--r-- | printing/print_settings.h | 7 | ||||
-rw-r--r-- | printing/print_settings_initializer_win.cc | 3 |
4 files changed, 15 insertions, 1 deletions
diff --git a/printing/emf_win.cc b/printing/emf_win.cc index 9629bb2..5de962b 100644 --- a/printing/emf_win.cc +++ b/printing/emf_win.cc @@ -396,6 +396,8 @@ bool Emf::Record::SafePlayback(const XFORM* base_matrix) const { } else { res = Play(); } + } else { + res = true; } break; } diff --git a/printing/print_settings.cc b/printing/print_settings.cc index cf8c50a..3f0f842 100644 --- a/printing/print_settings.cc +++ b/printing/print_settings.cc @@ -19,7 +19,8 @@ PrintSettings::PrintSettings() selection_only(false), use_overlays(true), dpi_(0), - landscape_(false) { + landscape_(false), + supports_alpha_blend_(true) { } PrintSettings::~PrintSettings() { @@ -36,6 +37,7 @@ void PrintSettings::Clear() { page_setup_device_units_.Clear(); dpi_ = 0; landscape_ = false; + supports_alpha_blend_ = true; } void PrintSettings::SetPrinterPrintableArea( diff --git a/printing/print_settings.h b/printing/print_settings.h index bc9cbaf..298fcd2 100644 --- a/printing/print_settings.h +++ b/printing/print_settings.h @@ -42,6 +42,10 @@ class PrintSettings { const std::wstring& device_name() const { return device_name_; } void set_dpi(int dpi) { dpi_ = dpi; } int dpi() const { return dpi_; } + void set_supports_alpha_blend(bool supports_alpha_blend) { + supports_alpha_blend_ = supports_alpha_blend; + } + bool supports_alpha_blend() const { return supports_alpha_blend_; } const PageSetup& page_setup_device_units() const { return page_setup_device_units_; } @@ -108,6 +112,9 @@ class PrintSettings { // Is the orientation landscape or portrait. bool landscape_; + + // True if this printer supports AlphaBlend. + bool supports_alpha_blend_; }; } // namespace printing diff --git a/printing/print_settings_initializer_win.cc b/printing/print_settings_initializer_win.cc index f840f4d..065a8db 100644 --- a/printing/print_settings_initializer_win.cc +++ b/printing/print_settings_initializer_win.cc @@ -29,6 +29,9 @@ void PrintSettingsInitializerWin::InitPrintSettings( int dpi = GetDeviceCaps(hdc, LOGPIXELSX); print_settings->set_dpi(dpi); + const int kAlphaCaps = SB_CONST_ALPHA | SB_PIXEL_ALPHA; + print_settings->set_supports_alpha_blend( + (GetDeviceCaps(hdc, SHADEBLENDCAPS) & kAlphaCaps) == kAlphaCaps); // No printer device is known to advertise different dpi in X and Y axis; even // the fax device using the 200x100 dpi setting. It's ought to break so many // applications that it's not even needed to care about. WebKit doesn't |