postgresql: upgrade to release 13.8
[LibreOffice.git] / include / cppcanvas / vclfactory.hxx
blob73867626d3c03cbd042bcef6a9202cf609c06b78
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_CPPCANVAS_VCLFACTORY_HXX
21 #define INCLUDED_CPPCANVAS_VCLFACTORY_HXX
23 #include <cppcanvas/canvas.hxx>
24 #include <cppcanvas/bitmapcanvas.hxx>
25 #include <cppcanvas/spritecanvas.hxx>
26 #include <cppcanvas/bitmap.hxx>
27 #include <cppcanvas/renderer.hxx>
29 #include <cppcanvas/cppcanvasdllapi.h>
31 namespace vcl { class Window; }
32 class BitmapEx;
34 class GDIMetaFile;
36 namespace com::sun::star::rendering
38 class XCanvas;
39 class XBitmapCanvas;
40 class XSpriteCanvas;
43 /* Definition of VCLFactory class */
45 namespace cppcanvas
47 /** The VCLFactory creates Canvas objects for various VCL
48 OutputDevice primitives, such as windows, polygons, bitmaps
49 and metafiles.
51 Please note that the objects created for a specific Canvas can
52 only be drawn on exactly that canvas. You have to regenerate
53 them for different canvases.
55 class CPPCANVAS_DLLPUBLIC VCLFactory
57 public:
58 static CanvasSharedPtr createCanvas( const css::uno::Reference< css::rendering::XCanvas >& xCanvas );
59 static BitmapCanvasSharedPtr createBitmapCanvas( const css::uno::Reference< css::rendering::XBitmapCanvas >& xCanvas );
61 static SpriteCanvasSharedPtr createSpriteCanvas( const vcl::Window& rVCLWindow );
62 static SpriteCanvasSharedPtr createSpriteCanvas( const css::uno::Reference< css::rendering::XSpriteCanvas >& xCanvas );
64 /** Create a bitmap from a VCL Bitmap
66 static BitmapSharedPtr createBitmap( const CanvasSharedPtr&, const ::BitmapEx& rBmpEx );
68 /** Create a renderer object from a Metafile
70 The created renderer initially draws the metafile
71 one-by-one units large, in user coordinate space
73 static RendererSharedPtr createRenderer( const CanvasSharedPtr& rCanvas,
74 const ::GDIMetaFile& rMtf,
75 const Renderer::Parameters& rParms );
77 private:
78 VCLFactory() = delete;
79 VCLFactory(const VCLFactory&) = delete;
80 VCLFactory& operator=( const VCLFactory& ) = delete;
85 #endif // INCLUDED_CPPCANVAS_VCLFACTORY_HXX
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */