| 1 |
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
| 2 |
/* |
| 3 |
* This file is part of the LibreOffice project. |
| 4 |
* |
| 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/. |
| 8 |
* |
| 9 |
* This file incorporates work covered by the following license notice: |
| 10 |
* |
| 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 . |
| 18 |
*/ |
| 19 |
|
| 20 |
#pragma once |
| 21 |
|
| 22 |
#include <action.hxx> |
| 23 |
#include <cppcanvas/canvas.hxx> |
| 24 |
|
| 25 |
|
| 26 |
namespace basegfx { |
| 27 |
class B2DPolyPolygon; |
| 28 |
} |
| 29 |
namespace com::sun::star::rendering |
| 30 |
{ |
| 31 |
struct Texture; |
| 32 |
struct StrokeAttributes; |
| 33 |
} |
| 34 |
|
| 35 |
|
| 36 |
/* Definition of internal::PolyPolyActionFactory */ |
| 37 |
|
| 38 |
namespace cppcanvas::internal |
| 39 |
{ |
| 40 |
struct OutDevState; |
| 41 |
|
| 42 |
/** Creates encapsulated converters between GDIMetaFile and |
| 43 |
XCanvas. The Canvas argument is deliberately placed at the |
| 44 |
constructor, to force reconstruction of this object for a |
| 45 |
new canvas. This considerably eases internal state |
| 46 |
handling, since a lot of the internal state (e.g. fonts, |
| 47 |
text layout) is Canvas-dependent. |
| 48 |
*/ |
| 49 |
namespace PolyPolyActionFactory |
| 50 |
{ |
| 51 |
/// Create polygon, fill/stroke according to state |
| 52 |
std::shared_ptr<Action> createPolyPolyAction( const ::basegfx::B2DPolyPolygon&, |
| 53 |
const CanvasSharedPtr&, |
| 54 |
const OutDevState& ); |
| 55 |
|
| 56 |
/// Create texture-filled polygon |
| 57 |
std::shared_ptr<Action> createPolyPolyAction( const ::basegfx::B2DPolyPolygon&, |
| 58 |
const CanvasSharedPtr&, |
| 59 |
const OutDevState&, |
| 60 |
const css::rendering::Texture& ); |
| 61 |
|
| 62 |
/// Create line polygon (always stroked, not filled) |
| 63 |
std::shared_ptr<Action> createLinePolyPolyAction( const ::basegfx::B2DPolyPolygon&, |
| 64 |
const CanvasSharedPtr&, |
| 65 |
const OutDevState& ); |
| 66 |
|
| 67 |
/// Create stroked polygon |
| 68 |
std::shared_ptr<Action> createPolyPolyAction( const ::basegfx::B2DPolyPolygon&, |
| 69 |
const CanvasSharedPtr&, |
| 70 |
const OutDevState&, |
| 71 |
const css::rendering::StrokeAttributes& ); |
| 72 |
|
| 73 |
/// For transparent painting of the given polygon (normally, we take the colors always opaque) |
| 74 |
std::shared_ptr<Action> createPolyPolyAction( const ::basegfx::B2DPolyPolygon&, |
| 75 |
const CanvasSharedPtr&, |
| 76 |
const OutDevState&, |
| 77 |
int nTransparency ); |
| 78 |
} |
| 79 |
|
| 80 |
} |
| 81 |
|
| 82 |
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |