cairo_surface_set_device_scale is in >= cairo 1.14.0

Change-Id: Iff47499d61dd6eb294d528fa8bfc5baf304ce151
This commit is contained in:
Caolán McNamara
2016-11-24 08:59:48 +00:00
parent 6bfe94a631
commit a250292c5e
2 changed files with 6 additions and 1 deletions

View File

@@ -389,7 +389,9 @@ SvpSalGraphics::~SvpSalGraphics()
void SvpSalGraphics::setSurface(cairo_surface_t* pSurface)
{
m_pSurface = pSurface;
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0)
cairo_surface_get_device_scale(pSurface, &m_fScale, nullptr);
#endif
ResetClipRegion();
}
@@ -991,8 +993,9 @@ void SvpSalGraphics::copyBits( const SalTwoRect& rTR,
aTR.mnSrcWidth * m_fScale,
aTR.mnSrcHeight * m_fScale);
#endif
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0)
cairo_surface_set_device_scale(pCopy, m_fScale, m_fScale);
#endif
cairo_t* cr = cairo_create(pCopy);
cairo_set_source_surface(cr, source, -aTR.mnSrcX, -aTR.mnSrcY);
cairo_rectangle(cr, 0, 0, aTR.mnSrcWidth, aTR.mnSrcHeight);

View File

@@ -89,7 +89,9 @@ bool SvpSalVirtualDevice::SetSizeUsingBuffer( long nNewDX, long nNewDY,
nNewDX, nNewDY);
}
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0)
cairo_surface_set_device_scale(m_pSurface, m_fScale, m_fScale);
#endif
// update device in existing graphics
for( std::list< SvpSalGraphics* >::iterator it = m_aGraphics.begin();