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_FILTER_SOURCE_GRAPHICFILTER_ICGM_OUTACT_HXX
21 #define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_OUTACT_HXX
23 #include <com/sun/star/awt/Gradient.hpp>
24 #include <com/sun/star/document/XActionLockable.hpp>
25 #include <com/sun/star/drawing/XDrawPages.hpp>
26 #include <com/sun/star/drawing/XDrawPage.hpp>
27 #include <com/sun/star/drawing/XShape.hpp>
28 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
29 #include <com/sun/star/beans/XPropertySet.hpp>
32 #define CGM_OUTACT_MAX_GROUP_LEVEL 64
35 #include <tools/poly.hxx>
40 class CGMBitmapDescriptor
;
42 class CGMImpressOutAct
44 sal_uInt16 mnCurrentPage
; // defaulted to zero
46 sal_uInt32 mnGroupActCount
; // grouping
47 sal_uInt32 mnGroupLevel
;
48 std::array
<sal_uInt32
, CGM_OUTACT_MAX_GROUP_LEVEL
>
51 std::vector
<PolyFlags
> maFlags
;
52 std::vector
<Point
> maPoints
;
53 tools::PolyPolygon maPolyPolygon
;
54 std::unique_ptr
<css::awt::Gradient
>
59 css::uno::Reference
< css::drawing::XDrawPages
> maXDrawPages
;
60 css::uno::Reference
< css::drawing::XDrawPage
> maXDrawPage
;
62 css::uno::Reference
< css::lang::XMultiServiceFactory
> maXMultiServiceFactory
;
63 css::uno::Reference
< css::drawing::XShape
> maXShape
;
65 css::uno::Reference
< css::beans::XPropertySet
> maXPropSet
;
66 css::uno::Reference
< css::drawing::XShapes
> maXShapes
;
67 std::vector
<css::uno::Reference
<css::document::XActionLockable
>> maLockedNewXShapes
;
69 sal_uInt32 nFinalTextCount
;
71 bool ImplCreateShape( const OUString
& rType
);
73 void ImplSetOrientation( FloatPoint
const & RefPoint
, double Orientation
);
74 void ImplSetLineBundle();
75 void ImplSetFillBundle();
76 void ImplSetTextBundle( const css::uno::Reference
< css::beans::XPropertySet
> & );
78 CGMImpressOutAct( CGM
&, const css::uno::Reference
< css::frame::XModel
> & );
84 void DrawRectangle( FloatRect
const & );
85 void DrawEllipse( FloatPoint
const & center
, FloatPoint
const &, double& Orientation
);
86 void DrawEllipticalArc( FloatPoint
const & center
, FloatPoint
const & size
, double& orientation
,
87 sal_uInt32 etype
, double& startangle
, double& endangle
);
88 void DrawBitmap( CGMBitmapDescriptor
* );
89 void DrawPolygon( tools::Polygon
& );
90 void DrawPolyLine( tools::Polygon
& );
91 void DrawPolybezier( tools::Polygon
& );
92 void DrawPolyPolygon( tools::PolyPolygon
const & );
93 void DrawText(css::awt::Point
const & TextRectPos
, css::awt::Size
const & TextRectSize
, const OUString
& rString
, FinalFlag
);
94 void AppendText( const char* String
);
96 void FirstOutPut() { mpCGM
->mbFirstOutPut
= false; } ;
101 void RegPolyLine( tools::Polygon
const &, bool bReverse
= false );
102 void SetGradientOffset( tools::Long nHorzOfs
, tools::Long nVertOfs
);
103 void SetGradientAngle( tools::Long nAngle
);
104 void SetGradientDescriptor( sal_uInt32 nColorFrom
, sal_uInt32 nColorTo
);
105 void SetGradientStyle( sal_uInt32 nStyle
);
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */