defaultprocessor3d.cxx (464702f4) defaultprocessor3d.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

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

36#include <drawinglayer/primitive3d/polypolygonprimitive3d.hxx>
37#include <basegfx/polygon/b3dpolypolygontools.hxx>
38#include <com/sun/star/drawing/ShadeMode.hpp>
39#include <drawinglayer/primitive3d/transformprimitive3d.hxx>
40#include <drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx>
41#include <vcl/bitmapex.hxx>
42#include <drawinglayer/attribute/sdrsceneattribute3d.hxx>
43#include <drawinglayer/attribute/sdrlightingattribute3d.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

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

36#include <drawinglayer/primitive3d/polypolygonprimitive3d.hxx>
37#include <basegfx/polygon/b3dpolypolygontools.hxx>
38#include <com/sun/star/drawing/ShadeMode.hpp>
39#include <drawinglayer/primitive3d/transformprimitive3d.hxx>
40#include <drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx>
41#include <vcl/bitmapex.hxx>
42#include <drawinglayer/attribute/sdrsceneattribute3d.hxx>
43#include <drawinglayer/attribute/sdrlightingattribute3d.hxx>
44#include <vcl/graph.hxx>
45#include <basegfx/matrix/b2dhommatrixtools.hxx>
44
45//////////////////////////////////////////////////////////////////////////////
46
47using namespace com::sun::star;
48
49//////////////////////////////////////////////////////////////////////////////
50
51namespace drawinglayer

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

212 if(rSubSequence.hasElements())
213 {
214 // rescue values
215 const bool bOldModulate(getModulate()); mbModulate = rPrimitive.getModulate();
216 const bool bOldFilter(getFilter()); mbFilter = rPrimitive.getFilter();
217 boost::shared_ptr< texture::GeoTexSvx > pOldTex = mpGeoTexSvx;
218
219 // create texture
46
47//////////////////////////////////////////////////////////////////////////////
48
49using namespace com::sun::star;
50
51//////////////////////////////////////////////////////////////////////////////
52
53namespace drawinglayer

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

214 if(rSubSequence.hasElements())
215 {
216 // rescue values
217 const bool bOldModulate(getModulate()); mbModulate = rPrimitive.getModulate();
218 const bool bOldFilter(getFilter()); mbFilter = rPrimitive.getFilter();
219 boost::shared_ptr< texture::GeoTexSvx > pOldTex = mpGeoTexSvx;
220
221 // create texture
220 const attribute::FillBitmapAttribute& rFillBitmapAttribute = rPrimitive.getFillBitmapAttribute();
222 const attribute::FillGraphicAttribute& rFillGraphicAttribute = rPrimitive.getFillGraphicAttribute();
223
224 // #121194# For 3D texture we will use the BitmapRex representation
225 const BitmapEx aBitmapEx(rFillGraphicAttribute.getGraphic().GetBitmapEx());
226
227 // create range scaled by texture size
228 basegfx::B2DRange aGraphicRange(rFillGraphicAttribute.getGraphicRange());
229
230 aGraphicRange.transform(
231 basegfx::tools::createScaleB2DHomMatrix(
232 rPrimitive.getTextureSize()));
221
233
222 if(rFillBitmapAttribute.getTiling())
234 if(rFillGraphicAttribute.getTiling())
223 {
235 {
224 mpGeoTexSvx.reset(new texture::GeoTexSvxBitmapTiled(
225 rFillBitmapAttribute.getBitmapEx().GetBitmap(),
226 rFillBitmapAttribute.getTopLeft() * rPrimitive.getTextureSize(),
227 rFillBitmapAttribute.getSize() * rPrimitive.getTextureSize()));
236 mpGeoTexSvx.reset(
237 new texture::GeoTexSvxBitmapExTiled(
238 aBitmapEx,
239 aGraphicRange,
240 rFillGraphicAttribute.getOffsetX(),
241 rFillGraphicAttribute.getOffsetY()));
228 }
229 else
230 {
242 }
243 else
244 {
231 mpGeoTexSvx.reset(new texture::GeoTexSvxBitmap(
232 rFillBitmapAttribute.getBitmapEx().GetBitmap(),
233 rFillBitmapAttribute.getTopLeft() * rPrimitive.getTextureSize(),
234 rFillBitmapAttribute.getSize() * rPrimitive.getTextureSize()));
245 mpGeoTexSvx.reset(
246 new texture::GeoTexSvxBitmapEx(
247 aBitmapEx,
248 aGraphicRange));
235 }
236
237 // process sub-list
238 process(rSubSequence);
239
240 // restore values
241 mbModulate = bOldModulate;
242 mbFilter = bOldFilter;

--- 320 unchanged lines hidden ---
249 }
250
251 // process sub-list
252 process(rSubSequence);
253
254 // restore values
255 mbModulate = bOldModulate;
256 mbFilter = bOldFilter;

--- 320 unchanged lines hidden ---