LCOV - code coverage report
Current view: top level - include/vcl - hatch.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 4 4 100.0 %
Date: 2014-11-03 Functions: 4 4 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_VCL_HATCH_HXX
      21             : #define INCLUDED_VCL_HATCH_HXX
      22             : 
      23             : #include <tools/color.hxx>
      24             : #include <vcl/dllapi.h>
      25             : 
      26             : #include <vcl/vclenum.hxx>
      27             : 
      28             : 
      29             : // - Impl_Hatch -
      30             : 
      31             : 
      32             : class SvStream;
      33             : 
      34             : struct ImplHatch
      35             : {
      36             :     sal_uInt32          mnRefCount;
      37             :     Color               maColor;
      38             :     HatchStyle          meStyle;
      39             :     long                mnDistance;
      40             :     sal_uInt16          mnAngle;
      41             : 
      42             :                         ImplHatch();
      43             :                         ImplHatch( const ImplHatch& rImplHatch );
      44             : 
      45             :     friend SvStream&    ReadImplHatch( SvStream& rIStm, ImplHatch& rImplHatch );
      46             :     friend SvStream&    WriteImplHatch( SvStream& rOStm, const ImplHatch& rImplHatch );
      47             : };
      48             : 
      49             : 
      50             : // - Hatch -
      51             : 
      52             : 
      53             : class VCL_DLLPUBLIC Hatch
      54             : {
      55             : private:
      56             : 
      57             :     ImplHatch*          mpImplHatch;
      58             :     SAL_DLLPRIVATE void ImplMakeUnique();
      59             : 
      60             : public:
      61             : 
      62             :                     Hatch();
      63             :                     Hatch( const Hatch& rHatch );
      64             :                     Hatch( HatchStyle eStyle, const Color& rHatchColor, long nDistance, sal_uInt16 nAngle10 = 0 );
      65             :                     ~Hatch();
      66             : 
      67             :     Hatch&          operator=( const Hatch& rHatch );
      68             :     bool            operator==( const Hatch& rHatch ) const;
      69             :     bool            operator!=( const Hatch& rHatch ) const { return !(Hatch::operator==( rHatch ) ); }
      70             :     bool            IsSameInstance( const Hatch& rHatch ) const { return( mpImplHatch == rHatch.mpImplHatch ); }
      71             : 
      72         384 :     HatchStyle      GetStyle() const { return mpImplHatch->meStyle; }
      73             : 
      74             :     void            SetColor( const Color& rColor  );
      75         192 :     const Color&    GetColor() const { return mpImplHatch->maColor; }
      76             : 
      77             :     void            SetDistance( long nDistance  );
      78         356 :     long            GetDistance() const { return mpImplHatch->mnDistance; }
      79             : 
      80             :     void            SetAngle( sal_uInt16 nAngle10 );
      81         200 :     sal_uInt16          GetAngle() const { return mpImplHatch->mnAngle; }
      82             : 
      83             :     friend VCL_DLLPUBLIC SvStream& ReadHatch( SvStream& rIStm, Hatch& rHatch );
      84             :     friend VCL_DLLPUBLIC SvStream& WriteHatch( SvStream& rOStm, const Hatch& rHatch );
      85             : };
      86             : 
      87             : #endif // INCLUDED_VCL_HATCH_HXX
      88             : 
      89             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10