bump product version to 4.1.6.2
[LibreOffice.git] / include / cppcanvas / vclfactory.hxx
blobb5d2f9612be947805a3a003660a94aea51def66c
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 _CPPCANVAS_VCLFACTORY_HXX
21 #define _CPPCANVAS_VCLFACTORY_HXX
23 #include <cppcanvas/canvas.hxx>
24 #include <cppcanvas/bitmapcanvas.hxx>
25 #include <cppcanvas/spritecanvas.hxx>
26 #include <cppcanvas/polypolygon.hxx>
27 #include <cppcanvas/bitmap.hxx>
28 #include <cppcanvas/renderer.hxx>
29 #include <cppcanvas/text.hxx>
30 #include <cppcanvas/sprite.hxx>
32 #include <cppcanvas/cppcanvasdllapi.h>
34 class Window;
35 class Bitmap;
36 class BitmapEx;
37 class Polygon;
38 class PolyPolygon;
39 class Size;
40 class Graphic;
41 class GDIMetaFile;
42 class Animation;
44 namespace com { namespace sun { namespace star { namespace rendering
46 class XBitmapCanvas;
47 class XSpriteCanvas;
48 } } } }
50 /* Definition of VCLFactory class */
52 namespace cppcanvas
54 /** The VCLFactory creates Canvas objects for various VCL
55 OutputDevice primitives, such as windows, polygons, bitmaps
56 and metafiles.
58 Please note that the objects created for a specific Canvas can
59 only be drawn on exactly that canvas. You have to regenerate
60 them for different canvases.
62 class CPPCANVAS_DLLPUBLIC VCLFactory
64 public:
65 static VCLFactory& getInstance();
67 BitmapCanvasSharedPtr createCanvas( const ::com::sun::star::uno::Reference<
68 ::com::sun::star::rendering::XBitmapCanvas >& xCanvas );
70 SpriteCanvasSharedPtr createSpriteCanvas( const ::Window& rVCLWindow ) const;
71 SpriteCanvasSharedPtr createSpriteCanvas( const ::com::sun::star::uno::Reference<
72 ::com::sun::star::rendering::XSpriteCanvas >& xCanvas ) const;
74 /** Create a bitmap from a VCL Bitmap
76 BitmapSharedPtr createBitmap( const CanvasSharedPtr&, const ::BitmapEx& rBmpEx ) const;
78 /** Create a renderer object from a Metafile
80 The created renderer initially draws the metafile
81 one-by-one units large, in user coordinate space
83 RendererSharedPtr createRenderer( const CanvasSharedPtr& rCanvas,
84 const ::GDIMetaFile& rMtf,
85 const Renderer::Parameters& rParms ) const;
87 private:
88 friend struct InitInstance;
90 // singleton
91 VCLFactory();
93 // default: disabled copy/assignment
94 VCLFactory(const VCLFactory&);
95 VCLFactory& operator=( const VCLFactory& );
100 #endif /* _CPPCANVAS_VCLFACTORY_HXX */
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */