LCOV - code coverage report
Current view: top level - svx/inc/svx - xgrad.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 20 20 100.0 %
Date: 2012-08-25 Functions: 20 20 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     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 _SVX__XGRADIENT_HXX
      21                 :            : #define _SVX__XGRADIENT_HXX
      22                 :            : 
      23                 :            : #include <svx/xenum.hxx>
      24                 :            : #include <tools/color.hxx>
      25                 :            : #include "svx/svxdllapi.h"
      26                 :            : 
      27                 :            : //-----------------
      28                 :            : // class XGradient
      29                 :            : //-----------------
      30                 :            : 
      31                 :            : class SVX_DLLPUBLIC XGradient
      32                 :            : {
      33                 :            : protected:
      34                 :            :     XGradientStyle  eStyle;
      35                 :            :     Color           aStartColor;
      36                 :            :     Color           aEndColor;
      37                 :            :     long            nAngle;
      38                 :            :     sal_uInt16          nBorder;
      39                 :            :     sal_uInt16          nOfsX;
      40                 :            :     sal_uInt16          nOfsY;
      41                 :            :     sal_uInt16          nIntensStart;
      42                 :            :     sal_uInt16          nIntensEnd;
      43                 :            :     sal_uInt16          nStepCount;
      44                 :            : 
      45                 :            : public:
      46                 :            :     XGradient();
      47                 :            :     XGradient( const Color& rStart, const Color& rEnd,
      48                 :            :                XGradientStyle eStyle = XGRAD_LINEAR, long nAngle = 0,
      49                 :            :                sal_uInt16 nXOfs = 50, sal_uInt16 nYOfs = 50, sal_uInt16 nBorder = 0,
      50                 :            :                sal_uInt16 nStartIntens = 100, sal_uInt16 nEndIntens = 100,
      51                 :            :                sal_uInt16 nSteps = 0 );
      52                 :            : 
      53                 :            :     bool operator==(const XGradient& rGradient) const;
      54                 :            : 
      55                 :        317 :     void SetGradientStyle(XGradientStyle eNewStyle) { eStyle = eNewStyle; }
      56                 :        317 :     void SetStartColor(const Color& rColor)         { aStartColor = rColor; }
      57                 :        317 :     void SetEndColor(const Color& rColor)           { aEndColor = rColor; }
      58                 :        317 :     void SetAngle(long nNewAngle)                   { nAngle = nNewAngle; }
      59                 :        317 :     void SetBorder(sal_uInt16 nNewBorder)               { nBorder = nNewBorder; }
      60                 :        317 :     void SetXOffset(sal_uInt16 nNewOffset)              { nOfsX = nNewOffset; }
      61                 :        317 :     void SetYOffset(sal_uInt16 nNewOffset)              { nOfsY = nNewOffset; }
      62                 :        317 :     void SetStartIntens(sal_uInt16 nNewIntens)          { nIntensStart = nNewIntens; }
      63                 :        317 :     void SetEndIntens(sal_uInt16 nNewIntens)            { nIntensEnd = nNewIntens; }
      64                 :        317 :     void SetSteps(sal_uInt16 nSteps)                    { nStepCount = nSteps; }
      65                 :            : 
      66                 :       6797 :     XGradientStyle GetGradientStyle() const         { return eStyle; }
      67                 :       6797 :     Color          GetStartColor() const            { return aStartColor; }
      68                 :       6797 :     Color          GetEndColor() const              { return aEndColor; }
      69                 :       6797 :     long           GetAngle() const                 { return nAngle; }
      70                 :       6797 :     sal_uInt16         GetBorder() const                { return nBorder; }
      71                 :       6797 :     sal_uInt16         GetXOffset() const               { return nOfsX; }
      72                 :       6797 :     sal_uInt16         GetYOffset() const               { return nOfsY; }
      73                 :       1044 :     sal_uInt16         GetStartIntens() const           { return nIntensStart; }
      74                 :       1044 :     sal_uInt16         GetEndIntens() const             { return nIntensEnd; }
      75                 :        582 :     sal_uInt16         GetSteps() const                 { return nStepCount; }
      76                 :            : };
      77                 :            : 
      78                 :            : #endif
      79                 :            : 
      80                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10