sdrdecompositiontools3d.cxx (5aaf853b) | sdrdecompositiontools3d.cxx (035a2f44) |
---|---|
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 --- 18 unchanged lines hidden (view full) --- 27#include <drawinglayer/primitive3d/sdrdecompositiontools3d.hxx> 28#include <basegfx/polygon/b3dpolygon.hxx> 29#include <drawinglayer/attribute/strokeattribute.hxx> 30#include <drawinglayer/primitive3d/baseprimitive3d.hxx> 31#include <drawinglayer/primitive3d/polygonprimitive3d.hxx> 32#include <basegfx/polygon/b3dpolypolygon.hxx> 33#include <drawinglayer/primitive3d/polypolygonprimitive3d.hxx> 34#include <vcl/vclenum.hxx> | 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 --- 18 unchanged lines hidden (view full) --- 27#include <drawinglayer/primitive3d/sdrdecompositiontools3d.hxx> 28#include <basegfx/polygon/b3dpolygon.hxx> 29#include <drawinglayer/attribute/strokeattribute.hxx> 30#include <drawinglayer/primitive3d/baseprimitive3d.hxx> 31#include <drawinglayer/primitive3d/polygonprimitive3d.hxx> 32#include <basegfx/polygon/b3dpolypolygon.hxx> 33#include <drawinglayer/primitive3d/polypolygonprimitive3d.hxx> 34#include <vcl/vclenum.hxx> |
35#include <drawinglayer/attribute/fillbitmapattribute.hxx> 36#include <drawinglayer/attribute/sdrfillbitmapattribute.hxx> | 35#include <drawinglayer/attribute/fillgraphicattribute.hxx> 36#include <drawinglayer/attribute/sdrfillgraphicattribute.hxx> |
37#include <vcl/bmpacc.hxx> 38#include <basegfx/polygon/b3dpolypolygontools.hxx> 39#include <drawinglayer/primitive3d/textureprimitive3d.hxx> 40#include <drawinglayer/primitive3d/modifiedcolorprimitive3d.hxx> 41#include <drawinglayer/primitive3d/hatchtextureprimitive3d.hxx> 42#include <drawinglayer/primitive3d/shadowprimitive3d.hxx> 43#include <basegfx/range/b2drange.hxx> 44#include <drawinglayer/attribute/sdrlineattribute.hxx> --- 158 unchanged lines hidden (view full) --- 203 aSdr3DObjectAttribute.getMaterial(), 204 aSdr3DObjectAttribute.getDoubleSided())); 205 aRetval[a] = xRef; 206 } 207 208 // look for and evtl. build texture sub-group primitive 209 if(!rFill.getGradient().isDefault() 210 || !rFill.getHatch().isDefault() | 37#include <vcl/bmpacc.hxx> 38#include <basegfx/polygon/b3dpolypolygontools.hxx> 39#include <drawinglayer/primitive3d/textureprimitive3d.hxx> 40#include <drawinglayer/primitive3d/modifiedcolorprimitive3d.hxx> 41#include <drawinglayer/primitive3d/hatchtextureprimitive3d.hxx> 42#include <drawinglayer/primitive3d/shadowprimitive3d.hxx> 43#include <basegfx/range/b2drange.hxx> 44#include <drawinglayer/attribute/sdrlineattribute.hxx> --- 158 unchanged lines hidden (view full) --- 203 aSdr3DObjectAttribute.getMaterial(), 204 aSdr3DObjectAttribute.getDoubleSided())); 205 aRetval[a] = xRef; 206 } 207 208 // look for and evtl. build texture sub-group primitive 209 if(!rFill.getGradient().isDefault() 210 || !rFill.getHatch().isDefault() |
211 || !rFill.getBitmap().isDefault()) | 211 || !rFill.getFillGraphic().isDefault()) |
212 { 213 bool bModulate(::com::sun::star::drawing::TextureMode_MODULATE == aSdr3DObjectAttribute.getTextureMode()); 214 bool bFilter(aSdr3DObjectAttribute.getTextureFilter()); 215 BasePrimitive3D* pNewTexturePrimitive3D = 0; 216 217 if(!rFill.getGradient().isDefault()) 218 { 219 // create gradientTexture3D with sublist, add to local aRetval --- 9 unchanged lines hidden (view full) --- 229 // create hatchTexture3D with sublist, add to local aRetval 230 pNewTexturePrimitive3D = new HatchTexturePrimitive3D( 231 rFill.getHatch(), 232 aRetval, 233 rTextureSize, 234 bModulate, 235 bFilter); 236 } | 212 { 213 bool bModulate(::com::sun::star::drawing::TextureMode_MODULATE == aSdr3DObjectAttribute.getTextureMode()); 214 bool bFilter(aSdr3DObjectAttribute.getTextureFilter()); 215 BasePrimitive3D* pNewTexturePrimitive3D = 0; 216 217 if(!rFill.getGradient().isDefault()) 218 { 219 // create gradientTexture3D with sublist, add to local aRetval --- 9 unchanged lines hidden (view full) --- 229 // create hatchTexture3D with sublist, add to local aRetval 230 pNewTexturePrimitive3D = new HatchTexturePrimitive3D( 231 rFill.getHatch(), 232 aRetval, 233 rTextureSize, 234 bModulate, 235 bFilter); 236 } |
237 else // if(!rFill.getBitmap().isDefault()) | 237 else // if(!rFill.getFillGraphic().isDefault()) |
238 { 239 // create bitmapTexture3D with sublist, add to local aRetval | 238 { 239 // create bitmapTexture3D with sublist, add to local aRetval |
240 basegfx::B2DRange aTexRange(0.0, 0.0, rTextureSize.getX(), rTextureSize.getY()); | 240 const basegfx::B2DRange aTexRange(0.0, 0.0, rTextureSize.getX(), rTextureSize.getY()); |
241 242 pNewTexturePrimitive3D = new BitmapTexturePrimitive3D( | 241 242 pNewTexturePrimitive3D = new BitmapTexturePrimitive3D( |
243 rFill.getBitmap().getFillBitmapAttribute(aTexRange), | 243 rFill.getFillGraphic().createFillGraphicAttribute(aTexRange), |
244 aRetval, 245 rTextureSize, 246 bModulate, 247 bFilter); 248 } 249 250 // exchange aRetval content with texture group 251 const Primitive3DReference xRef(pNewTexturePrimitive3D); --- 56 unchanged lines hidden (view full) --- 308 { 309 // create hidden sub-geometry which can be used for HitTest 310 // and BoundRect calculations, but will not be visualized 311 const attribute::SdrFillAttribute aSimplifiedFillAttribute( 312 0.0, 313 basegfx::BColor(), 314 attribute::FillGradientAttribute(), 315 attribute::FillHatchAttribute(), | 244 aRetval, 245 rTextureSize, 246 bModulate, 247 bFilter); 248 } 249 250 // exchange aRetval content with texture group 251 const Primitive3DReference xRef(pNewTexturePrimitive3D); --- 56 unchanged lines hidden (view full) --- 308 { 309 // create hidden sub-geometry which can be used for HitTest 310 // and BoundRect calculations, but will not be visualized 311 const attribute::SdrFillAttribute aSimplifiedFillAttribute( 312 0.0, 313 basegfx::BColor(), 314 attribute::FillGradientAttribute(), 315 attribute::FillHatchAttribute(), |
316 attribute::SdrFillBitmapAttribute()); | 316 attribute::SdrFillGraphicAttribute()); |
317 318 const Primitive3DReference aHidden( 319 new HiddenGeometryPrimitive3D( 320 create3DPolyPolygonFillPrimitives( 321 r3DPolyPolygonVector, 322 rObjectTransform, 323 rTextureSize, 324 aSdr3DObjectAttribute, 325 aSimplifiedFillAttribute, 326 attribute::FillGradientAttribute()))); 327 328 return Primitive3DSequence(&aHidden, 1); 329 } 330 331 } // end of namespace primitive3d 332} // end of namespace drawinglayer 333 334////////////////////////////////////////////////////////////////////////////// 335// eof | 317 318 const Primitive3DReference aHidden( 319 new HiddenGeometryPrimitive3D( 320 create3DPolyPolygonFillPrimitives( 321 r3DPolyPolygonVector, 322 rObjectTransform, 323 rTextureSize, 324 aSdr3DObjectAttribute, 325 aSimplifiedFillAttribute, 326 attribute::FillGradientAttribute()))); 327 328 return Primitive3DSequence(&aHidden, 1); 329 } 330 331 } // end of namespace primitive3d 332} // end of namespace drawinglayer 333 334////////////////////////////////////////////////////////////////////////////// 335// eof |