int viewX, viewY;
evas_object_geometry_get(m_pageClient->viewWidget(), &viewX, &viewY, 0, 0);
- IntRect rect(point.x() - viewX - (m_width/2), point.y() -viewY - (m_height/2), m_width, m_height);
+ float zoomLevel = 1.5f;
+ IntRect rect(point.x() - viewX - (ceil(m_width/zoomLevel)/2), point.y() - viewY - (ceil(m_height/zoomLevel)/2), ceil(m_width/zoomLevel), ceil(m_height/zoomLevel));
- RefPtr<WebImage> webImage = m_page->createSnapshot(rect, m_pageClient->scaleFactor());
+ RefPtr<WebImage> webImage = m_page->createSnapshot(rect, zoomLevel);
if (!webImage || !webImage->bitmap())
return;
RefPtr<cairo_surface_t> cairoSurface = webImage->bitmap()->createCairoSurface();
if (m_image)
evas_object_del(m_image);
- m_image = ewk_util_image_from_cairo_surface_add(evas_object_evas_get(m_object), cairoSurface.get());
-
- int magnifierWidth = cairo_image_surface_get_width(cairoSurface.get());
- int magnifierHeight = cairo_image_surface_get_height(cairoSurface.get());
- evas_object_size_hint_min_set(m_image, magnifierWidth, magnifierHeight);
- evas_object_resize(m_image, magnifierWidth, magnifierHeight);
+ m_image = ewk_util_image_from_cairo_surface_add(evas_object_evas_get(m_object), cairoSurface.get());
+ evas_object_size_hint_min_set(m_image, m_width, m_height);
+ evas_object_resize(m_image, m_width, m_height);
evas_object_image_filled_set(m_image, true);