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 .
22 #include <cppcanvas/canvas.hxx>
23 #include <cppcanvas/bitmapcanvas.hxx>
24 #include <cppcanvas/spritecanvas.hxx>
25 #include <cppcanvas/bitmap.hxx>
26 #include <cppcanvas/renderer.hxx>
28 #include <cppcanvas/cppcanvasdllapi.h>
30 namespace vcl
{ class Window
; }
35 namespace com::sun::star::rendering
42 /* Definition of VCLFactory class */
46 /** The VCLFactory creates Canvas objects for various VCL
47 OutputDevice primitives, such as windows, polygons, bitmaps
50 Please note that the objects created for a specific Canvas can
51 only be drawn on exactly that canvas. You have to regenerate
52 them for different canvases.
54 class CPPCANVAS_DLLPUBLIC VCLFactory
57 static CanvasSharedPtr
createCanvas( const css::uno::Reference
< css::rendering::XCanvas
>& xCanvas
);
58 static BitmapCanvasSharedPtr
createBitmapCanvas( const css::uno::Reference
< css::rendering::XBitmapCanvas
>& xCanvas
);
60 static SpriteCanvasSharedPtr
createSpriteCanvas( const vcl::Window
& rVCLWindow
);
61 static SpriteCanvasSharedPtr
createSpriteCanvas( const css::uno::Reference
< css::rendering::XSpriteCanvas
>& xCanvas
);
63 /** Create a bitmap from a VCL Bitmap
65 static BitmapSharedPtr
createBitmap( const CanvasSharedPtr
&, const ::BitmapEx
& rBmpEx
);
67 /** Create a renderer object from a Metafile
69 The created renderer initially draws the metafile
70 one-by-one units large, in user coordinate space
72 static RendererSharedPtr
createRenderer( const CanvasSharedPtr
& rCanvas
,
73 const ::GDIMetaFile
& rMtf
,
74 const Renderer::Parameters
& rParms
);
77 VCLFactory() = delete;
78 VCLFactory(const VCLFactory
&) = delete;
79 VCLFactory
& operator=( const VCLFactory
& ) = delete;
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */