diff options
| author | George Hazan <george.hazan@gmail.com> | 2024-03-31 12:29:36 +0300 |
|---|---|---|
| committer | George Hazan <george.hazan@gmail.com> | 2024-03-31 12:29:36 +0300 |
| commit | 482709434f32ea4e476a477a534e5baa048f2886 (patch) | |
| tree | 94647f06756b5c22645fc0654b6a1131c13941ea /libs/litehtml/containers/windows/win32/win32_container.cpp | |
| parent | c96a3b3959b6e618311e5c5157d9af0bf3439dd2 (diff) | |
NewStory: fix for image drawing
Diffstat (limited to 'libs/litehtml/containers/windows/win32/win32_container.cpp')
| -rw-r--r-- | libs/litehtml/containers/windows/win32/win32_container.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/libs/litehtml/containers/windows/win32/win32_container.cpp b/libs/litehtml/containers/windows/win32/win32_container.cpp index e028c986fb..117db3748b 100644 --- a/libs/litehtml/containers/windows/win32/win32_container.cpp +++ b/libs/litehtml/containers/windows/win32/win32_container.cpp @@ -148,10 +148,6 @@ int win32_container::pt_to_px( int pt ) const return MulDiv(pt, GetDeviceCaps(m_tmp_hdc, LOGPIXELSY), 72); } -void win32_container::draw_image(litehtml::uint_ptr, const litehtml::background_layer &, const std::string &, const std::string &) -{ -} - void win32_container::draw_solid_fill(litehtml::uint_ptr _hdc, const litehtml::background_layer &bg, const litehtml::web_color &color) { HDC hdc = (HDC)_hdc; @@ -213,6 +209,19 @@ void win32_container::make_url_utf8(const char* url, const char* basepath, std:: make_url(Utf2T(url), Utf2T(basepath), out); } +litehtml::uint_ptr win32_container::find_image(const std::wstring &url) +{ + uint_ptr ret = 0; + + lock_images_cache(); + images_map::iterator img = m_images.find(url); + if (img != m_images.end() && img->second) + ret = img->second; + + unlock_images_cache(); + return ret; +} + void win32_container::load_image( const char* src, const char* baseurl, bool redraw_on_ready ) { std::wstring url; |
