LCOV - code coverage report
Current view: top level - include/drawinglayer/primitive3d - polygontubeprimitive3d.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 8 8 100.0 %
Date: 2014-11-03 Functions: 9 9 100.0 %
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_POLYGONTUBEPRIMITIVE3D_HXX
      21             : #define INCLUDED_DRAWINGLAYER_PRIMITIVE3D_POLYGONTUBEPRIMITIVE3D_HXX
      22             : 
      23             : #include <drawinglayer/drawinglayerdllapi.h>
      24             : 
      25             : #include <drawinglayer/primitive3d/polygonprimitive3d.hxx>
      26             : 
      27             : 
      28             : // predefines
      29             : 
      30             : namespace basegfx {
      31             :     class B3DPolyPolygon;
      32             :     class B3DHomMatrix;
      33             : }
      34             : 
      35             : 
      36             : 
      37             : namespace drawinglayer
      38             : {
      39             :     namespace primitive3d
      40             :     {
      41             :         /** PolygonStrokePrimitive3D class
      42             : 
      43             :             This 3D primitive extends a 3D hairline to a 3D tube which is
      44             :             e.g. used for fat lines in 3D. It's decomposition will create all
      45             :             3D objects needed for the line tubes and the edge roundings
      46             :             in full 3D.
      47             :          */
      48        1796 :         class DRAWINGLAYER_DLLPUBLIC PolygonTubePrimitive3D : public PolygonHairlinePrimitive3D
      49             :         {
      50             :         private:
      51             :             /// hold the last decompositon since it's expensive
      52             :             Primitive3DSequence                         maLast3DDecomposition;
      53             : 
      54             :             /// visualisation parameters
      55             :             double                                      mfRadius;
      56             :             double                                      mfDegreeStepWidth;
      57             :             double                                      mfMiterMinimumAngle;
      58             :             basegfx::B2DLineJoin                        maLineJoin;
      59             :             com::sun::star::drawing::LineCap            maLineCap;
      60             : 
      61             :         protected:
      62             :             /** access methods to maLast3DDecomposition. The usage of this methods may allow
      63             :                 later thread-safe stuff to be added if needed. Only to be used by getDecomposition()
      64             :                 implementations for buffering the last decomposition.
      65             :              */
      66        2196 :             const Primitive3DSequence& getLast3DDecomposition() const { return maLast3DDecomposition; }
      67         898 :             void setLast3DDecomposition(const Primitive3DSequence& rNew) { maLast3DDecomposition = rNew; }
      68             : 
      69             :             /// local decomposition.
      70             :             Primitive3DSequence impCreate3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
      71             : 
      72             :         public:
      73             :             /// constructor
      74             :             PolygonTubePrimitive3D(
      75             :                 const basegfx::B3DPolygon& rPolygon,
      76             :                 const basegfx::BColor& rBColor,
      77             :                 double fRadius,
      78             :                 basegfx::B2DLineJoin aLineJoin,
      79             :                 com::sun::star::drawing::LineCap aLineCap,
      80             :                 double fDegreeStepWidth = 10.0 * F_PI180,
      81             :                 double fMiterMinimumAngle = 15.0 * F_PI180);
      82             : 
      83             :             /// data read access
      84       80114 :             double getRadius() const { return mfRadius; }
      85        9484 :             double getDegreeStepWidth() const { return mfDegreeStepWidth; }
      86        9484 :             double getMiterMinimumAngle() const { return mfMiterMinimumAngle; }
      87       10382 :             basegfx::B2DLineJoin getLineJoin() const { return maLineJoin; }
      88        1288 :             com::sun::star::drawing::LineCap getLineCap() const { return maLineCap; }
      89             : 
      90             :             /// compare operator
      91             :             virtual bool operator==(const BasePrimitive3D& rPrimitive) const SAL_OVERRIDE;
      92             : 
      93             :             /** local decomposition. Use own buffering since we are not derived from
      94             :                 BufferedDecompositionPrimitive3D
      95             :              */
      96             :             virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const SAL_OVERRIDE;
      97             : 
      98             :             /// provide unique ID
      99             :             DeclPrimitive3DIDBlock()
     100             :         };
     101             :     } // end of namespace primitive3d
     102             : } // end of namespace drawinglayer
     103             : 
     104             : 
     105             : 
     106             : #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE3D_POLYGONTUBEPRIMITIVE3D_HXX
     107             : 
     108             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10