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