Line data Source code
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 :
10 : #ifndef CHART2_OPENGL_SHAPE_FACTORY
11 : #define CHART2_OPENGL_SHAPE_FACTORY
12 :
13 : #include "AbstractShapeFactory.hxx"
14 :
15 : namespace chart {
16 :
17 : namespace opengl {
18 :
19 : // This class is stateless!!!!!
20 : // Don't add member variables
21 0 : class OpenglShapeFactory : public chart::AbstractShapeFactory
22 : {
23 : public:
24 :
25 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >
26 : createGroup2D(
27 : const ::com::sun::star::uno::Reference<
28 : ::com::sun::star::drawing::XShapes >& xTarget
29 : , const OUString& aName = OUString() ) SAL_OVERRIDE;
30 :
31 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >
32 : createGroup3D(
33 : const ::com::sun::star::uno::Reference<
34 : ::com::sun::star::drawing::XShapes >& xTarget
35 : , const OUString& aName = OUString() ) SAL_OVERRIDE;
36 :
37 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
38 : createCube( const ::com::sun::star::uno::Reference<
39 : ::com::sun::star::drawing::XShapes >& xTarget
40 : , const ::com::sun::star::drawing::Position3D& rPosition
41 : , const ::com::sun::star::drawing::Direction3D& rSize
42 : , sal_Int32 nRotateZAngleHundredthDegree
43 : , const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xSourceProp
44 : , const tPropertyNameMap& rPropertyNameMap
45 : , bool bRounded = false) SAL_OVERRIDE;
46 :
47 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
48 : createCylinder( const ::com::sun::star::uno::Reference<
49 : ::com::sun::star::drawing::XShapes >& xTarget
50 : , const ::com::sun::star::drawing::Position3D& rPosition
51 : , const ::com::sun::star::drawing::Direction3D& rSize
52 : , sal_Int32 nRotateZAngleHundredthDegree ) SAL_OVERRIDE;
53 :
54 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
55 : createPyramid( const ::com::sun::star::uno::Reference<
56 : ::com::sun::star::drawing::XShapes >& xTarget
57 : , const ::com::sun::star::drawing::Position3D& rPosition
58 : , const ::com::sun::star::drawing::Direction3D& rSize
59 : , double fTopHeight
60 : , bool bRotateZ
61 : , const ::com::sun::star::uno::Reference<
62 : ::com::sun::star::beans::XPropertySet >& xSourceProp
63 : , const tPropertyNameMap& rPropertyNameMap) SAL_OVERRIDE;
64 :
65 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
66 : createCone( const ::com::sun::star::uno::Reference<
67 : ::com::sun::star::drawing::XShapes >& xTarget
68 : , const ::com::sun::star::drawing::Position3D& rPosition
69 : , const ::com::sun::star::drawing::Direction3D& rSize
70 : , double fTopHeight, sal_Int32 nRotateZAngleHundredthDegree ) SAL_OVERRIDE;
71 :
72 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
73 : createPieSegment2D( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget
74 : , double fUnitCircleStartAngleDegree, double fUnitCircleWidthAngleDegree
75 : , double fUnitCircleInnerRadius, double fUnitCircleOuterRadius
76 : , const ::com::sun::star::drawing::Direction3D& rOffset
77 : , const ::com::sun::star::drawing::HomogenMatrix& rUnitCircleToScene ) SAL_OVERRIDE;
78 :
79 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
80 : createPieSegment( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget
81 : , double fUnitCircleStartAngleDegree, double fUnitCircleWidthAngleDegree
82 : , double fUnitCircleInnerRadius, double fUnitCircleOuterRadius
83 : , const ::com::sun::star::drawing::Direction3D& rOffset
84 : , const ::com::sun::star::drawing::HomogenMatrix& rUnitCircleToScene
85 : , double fDepth ) SAL_OVERRIDE;
86 :
87 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
88 : createStripe( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget
89 : , const Stripe& rStripe
90 : , const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xSourceProp
91 : , const tPropertyNameMap& rPropertyNameMap
92 : , sal_Bool bDoubleSided = true
93 : , short nRotatedTexture = 0 //0 to 7 are the different possibilities
94 : , bool bFlatNormals=true ) SAL_OVERRIDE;
95 :
96 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
97 : createArea3D( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget
98 : , const ::com::sun::star::drawing::PolyPolygonShape3D& rPolyPolygon
99 : , double fDepth) SAL_OVERRIDE;
100 :
101 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
102 : createArea2D( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget
103 : , const ::com::sun::star::drawing::PolyPolygonShape3D& rPolyPolygon) SAL_OVERRIDE;
104 :
105 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
106 : createSymbol2D( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget
107 : , const ::com::sun::star::drawing::Position3D& rPos
108 : , const ::com::sun::star::drawing::Direction3D& rSize
109 : , sal_Int32 nStandardSymbol
110 : , sal_Int32 nBorderColor=0
111 : , sal_Int32 nFillColor=0 ) SAL_OVERRIDE;
112 :
113 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
114 : createGraphic2D( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget
115 : , const ::com::sun::star::drawing::Position3D& rPos
116 : , const ::com::sun::star::drawing::Direction3D& rSize
117 : , const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >& xGraphic ) SAL_OVERRIDE;
118 :
119 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
120 : createLine2D( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget
121 : , const ::com::sun::star::drawing::PointSequenceSequence& rPoints
122 : , const VLineProperties* pLineProperties = NULL ) SAL_OVERRIDE;
123 :
124 : virtual com::sun::star::uno::Reference< com::sun::star::drawing::XShape >
125 : createLine ( const ::com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& xTarget,
126 : const com::sun::star::awt::Size& rSize, const com::sun::star::awt::Point& rPosition ) SAL_OVERRIDE;
127 :
128 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
129 : createLine3D( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget
130 : , const ::com::sun::star::drawing::PolyPolygonShape3D& rPoints
131 : , const VLineProperties& rLineProperties ) SAL_OVERRIDE;
132 :
133 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
134 : createCircle2D( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget
135 : , const ::com::sun::star::drawing::Position3D& rPos
136 : , const ::com::sun::star::drawing::Direction3D& rSize ) SAL_OVERRIDE;
137 :
138 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
139 : createCircle( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget
140 : , const ::com::sun::star::awt::Size& rSize
141 : , const ::com::sun::star::awt::Point& rPosition ) SAL_OVERRIDE;
142 :
143 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
144 : createText( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget2D
145 : , const OUString& rText
146 : , const tNameSequence& rPropNames
147 : , const tAnySequence& rPropValues
148 : , const ::com::sun::star::uno::Any& rATransformation
149 : ) SAL_OVERRIDE;
150 :
151 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
152 : createText( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget2D,
153 : const com::sun::star::awt::Size& rSize,
154 : const com::sun::star::awt::Point& rPosition,
155 : com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::chart2::XFormattedString > >& xFormattedString,
156 : const com::sun::star::uno::Reference<
157 : com::sun::star::beans::XPropertySet > & xTextProperties,
158 : double nRotation, const OUString& aName ) SAL_OVERRIDE;
159 :
160 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
161 : createInvisibleRectangle(
162 : const ::com::sun::star::uno::Reference<
163 : ::com::sun::star::drawing::XShapes >& xTarget
164 : , const ::com::sun::star::awt::Size& rSize ) SAL_OVERRIDE;
165 :
166 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
167 : createRectangle(
168 : const com::sun::star::uno::Reference<
169 : com::sun::star::drawing::XShapes >& xTarget,
170 : const com::sun::star::awt::Size& rSize,
171 : const com::sun::star::awt::Point& rPosition,
172 : const tNameSequence& rPropNames,
173 : const tAnySequence& rPropValues,
174 : StackPosition ePos = Top ) SAL_OVERRIDE;
175 :
176 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
177 : createRectangle(
178 : const ::com::sun::star::uno::Reference<
179 : ::com::sun::star::drawing::XShapes >& xTarget ) SAL_OVERRIDE;
180 :
181 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >
182 : getOrCreateChartRootShape( const ::com::sun::star::uno::Reference<
183 : ::com::sun::star::drawing::XDrawPage>& xPage ) SAL_OVERRIDE;
184 :
185 : virtual void setPageSize( com::sun::star::uno::Reference < com::sun::star::drawing::XShapes > xChartShapes, const com::sun::star::awt::Size& rSize ) SAL_OVERRIDE;
186 :
187 : virtual void render(com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > xRootShape) SAL_OVERRIDE;
188 :
189 : virtual void clearPage(com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > xRootShape) SAL_OVERRIDE;
190 : };
191 :
192 : }
193 :
194 : }
195 :
196 : #endif
197 :
198 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|