impltools.hxx (91c99ff4) impltools.hxx (5f27b83c)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 123 unchanged lines hidden (view full) ---

132 ::vos::OGuard aGuard;
133 };
134
135 class OutDevStateKeeper
136 {
137 public:
138 explicit OutDevStateKeeper( OutputDevice& rOutDev ) :
139 mpOutDev( &rOutDev ),
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 123 unchanged lines hidden (view full) ---

132 ::vos::OGuard aGuard;
133 };
134
135 class OutDevStateKeeper
136 {
137 public:
138 explicit OutDevStateKeeper( OutputDevice& rOutDev ) :
139 mpOutDev( &rOutDev ),
140 mbMappingWasEnabled( mpOutDev->IsMapModeEnabled() )
140 mbMappingWasEnabled( mpOutDev->IsMapModeEnabled() ),
141 mnAntiAliasing( mpOutDev->GetAntialiasing() )
141 {
142 init();
143 }
144
145 explicit OutDevStateKeeper( const OutDevProviderSharedPtr& rOutDev ) :
146 mpOutDev( rOutDev.get() ? &(rOutDev->getOutDev()) : NULL ),
142 {
143 init();
144 }
145
146 explicit OutDevStateKeeper( const OutDevProviderSharedPtr& rOutDev ) :
147 mpOutDev( rOutDev.get() ? &(rOutDev->getOutDev()) : NULL ),
147 mbMappingWasEnabled( mpOutDev ? mpOutDev->IsMapModeEnabled() : false )
148 mbMappingWasEnabled( mpOutDev ? mpOutDev->IsMapModeEnabled() : false ),
149 mnAntiAliasing( mpOutDev ? mpOutDev->GetAntialiasing() : 0 )
148 {
149 init();
150 }
151
152 ~OutDevStateKeeper()
153 {
154 if( mpOutDev )
155 {
156 mpOutDev->EnableMapMode( mbMappingWasEnabled );
150 {
151 init();
152 }
153
154 ~OutDevStateKeeper()
155 {
156 if( mpOutDev )
157 {
158 mpOutDev->EnableMapMode( mbMappingWasEnabled );
159 mpOutDev->SetAntialiasing( mnAntiAliasing );
160
157 mpOutDev->Pop();
158 }
159 }
160
161 private:
162 void init()
163 {
164 if( mpOutDev )
165 {
166 mpOutDev->Push();
167 mpOutDev->EnableMapMode(sal_False);
161 mpOutDev->Pop();
162 }
163 }
164
165 private:
166 void init()
167 {
168 if( mpOutDev )
169 {
170 mpOutDev->Push();
171 mpOutDev->EnableMapMode(sal_False);
172 mpOutDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
168 }
169 }
170
173 }
174 }
175
171 OutputDevice* mpOutDev;
172 const bool mbMappingWasEnabled;
176 OutputDevice* mpOutDev;
177 const bool mbMappingWasEnabled;
178 const sal_uInt16 mnAntiAliasing;
173 };
174
175 ::Point mapRealPoint2D( const ::com::sun::star::geometry::RealPoint2D& rPoint,
176 const ::com::sun::star::rendering::ViewState& rViewState,
177 const ::com::sun::star::rendering::RenderState& rRenderState );
178
179 ::PolyPolygon mapPolyPolygon( const ::basegfx::B2DPolyPolygon& rPoly,
180 const ::com::sun::star::rendering::ViewState& rViewState,

--- 17 unchanged lines hidden ---
179 };
180
181 ::Point mapRealPoint2D( const ::com::sun::star::geometry::RealPoint2D& rPoint,
182 const ::com::sun::star::rendering::ViewState& rViewState,
183 const ::com::sun::star::rendering::RenderState& rRenderState );
184
185 ::PolyPolygon mapPolyPolygon( const ::basegfx::B2DPolyPolygon& rPoly,
186 const ::com::sun::star::rendering::ViewState& rViewState,

--- 17 unchanged lines hidden ---