vcl: 'horizontically'
[LibreOffice.git] / include / vcl / gradient.hxx
blobf2336d7977039bafd1bd8084e22d5aea967b0ba7
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_VCL_GRADIENT_HXX
21 #define INCLUDED_VCL_GRADIENT_HXX
23 #include <sal/types.h>
24 #include <vcl/dllapi.h>
25 #include <tools/color.hxx>
26 #include <tools/degree.hxx>
28 #include <vcl/vclenum.hxx>
29 #include <o3tl/cow_wrapper.hxx>
32 namespace tools { class Rectangle; }
34 class Point;
35 class SvStream;
37 class VCL_DLLPUBLIC Gradient
39 private:
40 class Impl;
41 ::o3tl::cow_wrapper<Impl> mpImplGradient;
43 public:
44 Gradient();
45 Gradient( const Gradient& rGradient );
46 Gradient( Gradient&& rGradient );
47 Gradient( GradientStyle eStyle,
48 const Color& rStartColor,
49 const Color& rEndColor );
50 ~Gradient();
52 void SetStyle( GradientStyle eStyle );
53 GradientStyle GetStyle() const;
55 void SetStartColor( const Color& rColor );
56 const Color& GetStartColor() const;
57 void SetEndColor( const Color& rColor );
58 const Color& GetEndColor() const;
60 void SetAngle( Degree10 nAngle );
61 Degree10 GetAngle() const;
63 void SetBorder( sal_uInt16 nBorder );
64 sal_uInt16 GetBorder() const;
65 void SetOfsX( sal_uInt16 nOfsX );
66 sal_uInt16 GetOfsX() const;
67 void SetOfsY( sal_uInt16 nOfsY );
68 sal_uInt16 GetOfsY() const;
70 void SetStartIntensity( sal_uInt16 nIntens );
71 sal_uInt16 GetStartIntensity() const;
72 void SetEndIntensity( sal_uInt16 nIntens );
73 sal_uInt16 GetEndIntensity() const;
75 void SetSteps( sal_uInt16 nSteps );
76 sal_uInt16 GetSteps() const;
78 void GetBoundRect( const tools::Rectangle& rRect, tools::Rectangle &rBoundRect, Point& rCenter ) const;
80 Gradient& operator=( const Gradient& rGradient );
81 Gradient& operator=( Gradient&& rGradient );
82 bool operator==( const Gradient& rGradient ) const;
83 bool operator!=( const Gradient& rGradient ) const
84 { return !(Gradient::operator==( rGradient )); }
87 #endif // INCLUDED_VCL_GRADIENT_HXX
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */