KoBrush.cpp
1/* This file is part of the KDE project
2 Copyright (C) 2005-2006 Thorsten Zachmann <zachmann@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#include "KoBrush.h"
21
22#include <KoGenStyles.h>
23#include <KoXmlNS.h>
24
25KoBrush::KoBrush()
26: m_gColor1( TQt::red )
27, m_gColor2( TQt::green )
28, m_gType( BCT_GHORZ )
29, m_fillType( FT_BRUSH )
30, m_unbalanced( false )
31, m_xfactor( 100 )
32, m_yfactor( 100 )
33{
34}
35
36
37KoBrush::KoBrush( const TQBrush &brush, const TQColor &gColor1, const TQColor &gColor2,
38 BCType gType, FillType fillType, bool unbalanced,
39 int xfactor, int yfactor )
40: m_brush( brush )
41, m_gColor1( gColor1 )
42, m_gColor2( gColor2 )
43, m_gType( gType )
44, m_fillType( fillType )
45, m_unbalanced( unbalanced )
46, m_xfactor( xfactor )
47, m_yfactor( yfactor )
48{
49}
50
51
52KoBrush & KoBrush::operator=( const KoBrush &brush )
53{
54 m_brush = brush.m_brush;
55 m_gColor1 = brush.m_gColor1;
56 m_gColor2 = brush.m_gColor2;
57 m_gType = brush.m_gType;
58 m_fillType = brush.m_fillType;
59 m_unbalanced = brush.m_unbalanced;
60 m_xfactor = brush.m_xfactor;
61 m_yfactor = brush.m_yfactor;
62 return *this;
63}