1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/polypolygon.hxx>
27 #include <cppcanvas/bitmap.hxx>
28 #include <cppcanvas/renderer.hxx>
29 #include <cppcanvas/sprite.hxx>
31 #include <cppcanvas/cppcanvasdllapi.h>
33 namespace vcl
{ class Window
; }
37 namespace tools
{ class PolyPolygon
; }
43 namespace com
{ namespace sun
{ namespace star
{ namespace rendering
50 /* Definition of VCLFactory class */
54 /** The VCLFactory creates Canvas objects for various VCL
55 OutputDevice primitives, such as windows, polygons, bitmaps
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
65 static CanvasSharedPtr
createCanvas( const ::com::sun::star::uno::Reference
<
66 ::com::sun::star::rendering::XCanvas
>& xCanvas
);
67 static BitmapCanvasSharedPtr
createBitmapCanvas( const ::com::sun::star::uno::Reference
<
68 ::com::sun::star::rendering::XBitmapCanvas
>& xCanvas
);
70 static SpriteCanvasSharedPtr
createSpriteCanvas( const vcl::Window
& rVCLWindow
);
71 static SpriteCanvasSharedPtr
createSpriteCanvas( const ::com::sun::star::uno::Reference
<
72 ::com::sun::star::rendering::XSpriteCanvas
>& xCanvas
);
74 /** Create a bitmap from a VCL Bitmap
76 static BitmapSharedPtr
createBitmap( const CanvasSharedPtr
&, const ::BitmapEx
& rBmpEx
);
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 static RendererSharedPtr
createRenderer( const CanvasSharedPtr
& rCanvas
,
84 const ::GDIMetaFile
& rMtf
,
85 const Renderer::Parameters
& rParms
);
88 VCLFactory() SAL_DELETED_FUNCTION
;
89 VCLFactory(const VCLFactory
&) SAL_DELETED_FUNCTION
;
90 VCLFactory
& operator=( const VCLFactory
& ) SAL_DELETED_FUNCTION
;
95 #endif // INCLUDED_CPPCANVAS_VCLFACTORY_HXX
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */