/* -*- 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/.
*/
/** Class that creates (and destroys) a compatible Device Context.
This is to be used for GDI drawing into a DIB that we later use for a different drawing method, such as a texture for OpenGL drawing or surface for Skia drawing.
*/ class SkiaCompatibleDC
{ /// The compatible DC that we create for our purposes.
HDC mhCompatibleDC;
/// Mapping between the GDI position and OpenGL, to use for OpenGL drawing.
SalTwoRect maRects;
/// DIBSection that we use for the GDI drawing, and later obtain.
HBITMAP mhBitmap;
/// Return the previous bitmap to undo the SelectObject.
HBITMAP mhOrigBitmap;
/// DIBSection data.
sal_uInt32* mpData;
/// The SalGraphicsImpl where we will draw. If null, we ignore the drawing, it means it happened directly to the DC...
WinSalGraphicsImplBase* mpImpl;
public:
SkiaCompatibleDC(WinSalGraphics& rGraphics, int x, int y, int width, int height);
~SkiaCompatibleDC();
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.