LCOV - code coverage report
Current view: top level - include/drawinglayer/primitive3d - sdrprimitive3d.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 5 5 100.0 %
Date: 2015-06-13 12:38:46 Functions: 5 6 83.3 %
Legend: Lines: hit not hit

          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             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE3D_SDRPRIMITIVE3D_HXX
      21             : #define INCLUDED_DRAWINGLAYER_PRIMITIVE3D_SDRPRIMITIVE3D_HXX
      22             : 
      23             : #include <drawinglayer/drawinglayerdllapi.h>
      24             : 
      25             : #include <drawinglayer/primitive3d/baseprimitive3d.hxx>
      26             : #include <basegfx/matrix/b3dhommatrix.hxx>
      27             : #include <basegfx/vector/b2dvector.hxx>
      28             : #include <drawinglayer/attribute/sdrallattribute3d.hxx>
      29             : #include <drawinglayer/primitive3d/sdrextrudelathetools3d.hxx>
      30             : #include <drawinglayer/attribute/sdrobjectattribute3d.hxx>
      31             : 
      32             : 
      33             : 
      34             : namespace drawinglayer
      35             : {
      36             :     /** SdrPrimitive3D class
      37             : 
      38             :         Base class for the more complicated geometric primitives, so
      39             :         derive from buffered primitive to allow overriding of
      40             :         create3DDecomposition there.
      41             :      */
      42             :     namespace primitive3d
      43             :     {
      44        9601 :         class DRAWINGLAYER_DLLPUBLIC SdrPrimitive3D : public BufferedDecompositionPrimitive3D
      45             :         {
      46             :         private:
      47             :             /// object surface attributes
      48             :             basegfx::B3DHomMatrix                       maTransform;
      49             :             basegfx::B2DVector                          maTextureSize;
      50             :             attribute::SdrLineFillShadowAttribute3D     maSdrLFSAttribute;
      51             :             attribute::Sdr3DObjectAttribute             maSdr3DObjectAttribute;
      52             : 
      53             :         protected:
      54             :             /** Standard implementation for primitive3D which
      55             :                 will use maTransform as range and expand by evtl. line width / 2
      56             :              */
      57             :             basegfx::B3DRange getStandard3DRange() const;
      58             : 
      59             :             /** implementation for primitive3D which
      60             :                 will use given Slice3Ds and expand by evtl. line width / 2
      61             :              */
      62             :             basegfx::B3DRange get3DRangeFromSlices(const Slice3DVector& rSlices) const;
      63             : 
      64             :         public:
      65             :             /// constructor
      66             :             SdrPrimitive3D(
      67             :                 const basegfx::B3DHomMatrix& rTransform,
      68             :                 const basegfx::B2DVector& rTextureSize,
      69             :                 const attribute::SdrLineFillShadowAttribute3D& rSdrLFSAttribute,
      70             :                 const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute);
      71             : 
      72             :             /// data read access
      73       22540 :             const basegfx::B3DHomMatrix& getTransform() const { return maTransform; }
      74       12772 :             const basegfx::B2DVector& getTextureSize() const { return maTextureSize; }
      75       32213 :             const attribute::SdrLineFillShadowAttribute3D& getSdrLFSAttribute() const { return maSdrLFSAttribute; }
      76       13978 :             const attribute::Sdr3DObjectAttribute getSdr3DObjectAttribute() const { return maSdr3DObjectAttribute; }
      77             : 
      78             :             /// compare operator
      79             :             virtual bool operator==(const BasePrimitive3D& rPrimitive) const SAL_OVERRIDE;
      80             :         };
      81             :     } // end of namespace primitive3d
      82             : } // end of namespace drawinglayer
      83             : 
      84             : 
      85             : 
      86             : #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE3D_SDRPRIMITIVE3D_HXX
      87             : 
      88             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11