Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / cppcanvas / basegfxfactory.hxx
blob8238b502ffbb87ad4fcada0e4a580f89346f1b15
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_BASEGFXFACTORY_HXX
21 #define INCLUDED_CPPCANVAS_BASEGFXFACTORY_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>
30 #include <basegfx/vector/b2isize.hxx>
32 #include <cppcanvas/cppcanvasdllapi.h>
34 namespace basegfx
36 class B2DPolygon;
37 class B2DPolyPolygon;
41 /* Definition of BaseGfxFactory class */
43 namespace cppcanvas
45 /** The BaseGfxFactory creates Canvas objects for various basegfx
46 primitives, such as polygons and bitmaps (not yet
47 implemented).
49 Please note that the objects created for a specific Canvas can
50 only be drawn on exactly that canvas. You have to regenerate
51 them for different canvases.
53 class CPPCANVAS_DLLPUBLIC BaseGfxFactory
55 public:
56 /** Create a polygon from a ::basegfx::B2DPolygon
58 The created polygon initially has the same size in user
59 coordinate space as the source polygon
61 static PolyPolygonSharedPtr createPolyPolygon( const CanvasSharedPtr&, const ::basegfx::B2DPolygon& rPoly );
63 /** Create an uninitialized bitmap with the given size
65 static BitmapSharedPtr createBitmap( const CanvasSharedPtr&, const ::basegfx::B2ISize& rSize );
67 /** Create an uninitialized alpha bitmap with the given size
69 static BitmapSharedPtr createAlphaBitmap( const CanvasSharedPtr&, const ::basegfx::B2ISize& rSize );
71 private:
72 BaseGfxFactory() = delete;
73 BaseGfxFactory(const BaseGfxFactory&) = delete;
74 BaseGfxFactory& operator=( const BaseGfxFactory& ) = delete;
79 #endif // INCLUDED_CPPCANVAS_BASEGFXFACTORY_HXX
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */