LibreOffice Module vcl (master)  1
gradient.hxx
Go to the documentation of this file.
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_GRADIENT_HXX
21 #define INCLUDED_VCL_GRADIENT_HXX
22 
23 #include <sal/types.h>
24 #include <vcl/dllapi.h>
25 #include <tools/color.hxx>
26 
27 #include <vcl/vclenum.hxx>
28 #include <o3tl/cow_wrapper.hxx>
29 
30 
31 namespace tools { class Rectangle; }
32 
33 class Point;
34 class SvStream;
35 
37 {
38 private:
39  class Impl;
41 
42 public:
43  Gradient();
44  Gradient( const Gradient& rGradient );
45  Gradient( Gradient&& rGradient );
46  Gradient( GradientStyle eStyle,
47  const Color& rStartColor,
48  const Color& rEndColor );
49  ~Gradient();
50 
51  void SetStyle( GradientStyle eStyle );
52  GradientStyle GetStyle() const;
53 
54  void SetStartColor( const Color& rColor );
55  const Color& GetStartColor() const;
56  void SetEndColor( const Color& rColor );
57  const Color& GetEndColor() const;
58 
59  void SetAngle( sal_uInt16 nAngle );
60  sal_uInt16 GetAngle() const;
61 
62  void SetBorder( sal_uInt16 nBorder );
63  sal_uInt16 GetBorder() const;
64  void SetOfsX( sal_uInt16 nOfsX );
65  sal_uInt16 GetOfsX() const;
66  void SetOfsY( sal_uInt16 nOfsY );
67  sal_uInt16 GetOfsY() const;
68 
69  void SetStartIntensity( sal_uInt16 nIntens );
70  sal_uInt16 GetStartIntensity() const;
71  void SetEndIntensity( sal_uInt16 nIntens );
72  sal_uInt16 GetEndIntensity() const;
73 
74  void SetSteps( sal_uInt16 nSteps );
75  sal_uInt16 GetSteps() const;
76 
77  void GetBoundRect( const tools::Rectangle& rRect, tools::Rectangle &rBoundRect, Point& rCenter ) const;
78 
79  Gradient& operator=( const Gradient& rGradient );
80  Gradient& operator=( Gradient&& rGradient );
81  bool operator==( const Gradient& rGradient ) const;
82  bool operator!=( const Gradient& rGradient ) const
83  { return !(Gradient::operator==( rGradient )); }
84 };
85 
86 #endif // INCLUDED_VCL_GRADIENT_HXX
87 
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
bool operator!=(const Gradient &rGradient) const
Definition: gradient.hxx:82
GradientStyle
bool operator==(const ItalicMatrix &a, const ItalicMatrix &b)
Definition: vclenum.hxx:206
bool operator==(const Gradient &rGradient) const
::o3tl::cow_wrapper< Impl > mpImplGradient
Definition: gradient.hxx:39
long GetAngle(const Point &rPnt)