/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include #include #include #include #include #include #include #include namespace cairo { Qt5SvpSurface::Qt5SvpSurface(const CairoSurfaceSharedPtr& pSurface) : m_pGraphics(nullptr) , m_pCairoContext(nullptr) , m_pSurface(pSurface) { } Qt5SvpSurface::Qt5SvpSurface(const Qt5SvpGraphics* pGraphics, int x, int y, int width, int height) : m_pGraphics(pGraphics) , m_pCairoContext(pGraphics->getCairoContext(false)) { cairo_surface_t* surface = cairo_get_target(m_pCairoContext); m_pSurface.reset(cairo_surface_create_for_rectangle(surface, x, y, width, height), &cairo_surface_destroy); } Qt5SvpSurface::~Qt5SvpSurface() { if (m_pCairoContext) cairo_destroy(m_pCairoContext); } CairoSharedPtr Qt5SvpSurface::getCairo() const { return CairoSharedPtr(cairo_create(m_pSurface.get()), &cairo_destroy); } SurfaceSharedPtr Qt5SvpSurface::getSimilar(int cairo_content_type, int width, int height) const { return SurfaceSharedPtr(new Qt5SvpSurface(CairoSurfaceSharedPtr( cairo_surface_create_similar( m_pSurface.get(), static_cast(cairo_content_type), width, height), &cairo_surface_destroy))); } void Qt5SvpSurface::flush() const { cairo_surface_flush(m_pSurface.get()); if (m_pGraphics) m_pGraphics->updateQWidget(); } VclPtr Qt5SvpSurface::createVirtualDevice() const { return VclPtrInstance(nullptr, Size(1, 1), DeviceFormat::DEFAULT); } } // namespace cairo /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ on> LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2017-10-27Use LocaleDataWrapper::stringToDouble() in ShadowPropertyPanel, tdf#81671Eike Rathke
2017-10-23loplugin:includeform: svxStephan Bergmann
2017-07-21migrate to boost::gettextCaolán McNamara
2017-04-13Removed duplicated includesAndrea Gelmini
2016-11-07Revert "Reverts a commit series that cripple windows ci."Caolán McNamara
2016-11-05Reverts a commit series that cripple windows ci.Norbert Thiebaud
2016-11-04unify color selectorsCaolán McNamara
2016-10-27loplugin:expandablemethods in svxNoel Grandin
2016-10-06drop now unused sfx2/sidebar/ResourceDefinitions.hrcCaolán McNamara
2016-10-05Remove _TYPED suffix from tools/link.hxx macrosStephan Bergmann
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
2016-04-18clean-up: unused using declarations and includesJochen Nitschke
2016-03-31sfx2: make SfxDispatcher::Execute() less variadic ...Michael Stahl
2016-02-09Remove excess newlinesChris Sherlock
2016-02-04svx: replace boost::bind with C++11 lambdaMichael Stahl
2015-12-21loplugin:unusedfields in store,svtools,svxNoel Grandin
2015-11-12Namespace cleanup and disambiguationAshod Nakashian
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
2015-10-17afl-eventtesting: first discovered impress crash via event fuzzingCaolán McNamara
2015-10-16convert Link<> to typedNoel Grandin
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
2015-10-12convert Link<> to typedNoel Grandin
2015-09-18boost->stdCaolán McNamara
2015-09-17revert for mac and win unit case crashes after boost->stdCaolán McNamara
2015-09-17unused headersCaolán McNamara
2015-09-04convert Link<> to typedNoel Grandin
2015-08-26Convert vcl Button Link<> click handler to typed Link<Button*,void>Noel Grandin
2015-07-26remove unused propertyMarkus Mohrhard
2015-07-24Move spinbox limit definition to .ui fileKatarina Behrens
2015-07-12coverity#1311655 Uninitialized scalar fieldCaolán McNamara
2015-07-08various warningsStephan Bergmann
2015-07-08tdf#87702: Addition of Shadow sidebar tabRishabh Kumar