karbon

vcomposite_iface.cpp
1/* This file is part of the KDE project
2 Copyright (C) 2001, The Karbon Developers
3 Copyright (C) 2002, The Karbon Developers
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19*/
20
21#include "vcomposite_iface.h"
22#include "vcomposite.h"
23
24VPathIface::VPathIface( VPath *composite )
25 : VObjectIface( composite ), m_composite( composite )
26{
27}
28
29bool
30VPathIface::moveTo( double x, double y )
31{
32 return m_composite->moveTo( KoPoint( x, y ) );
33}
34
35bool
36VPathIface::lineTo( double x, double y )
37{
38 return m_composite->lineTo( KoPoint( x, y ) );
39}
40
41bool
42VPathIface::curveTo( double x1, double y1, double x2, double y2, double x3, double y3 )
43{
44 return m_composite->curveTo( KoPoint( x1, y1 ), KoPoint( x2, y2 ), KoPoint( x3, y3 ) );
45}
46
47bool
48VPathIface::curve1To( double x2, double y2, double x3, double y3 )
49{
50 return m_composite->curve1To( KoPoint( x2, y2 ), KoPoint( x3, y3 ) );
51}
52
53bool
54VPathIface::curve2To( double x1, double y1, double x2, double y2 )
55{
56 return m_composite->curve2To( KoPoint( x1, y1 ), KoPoint( x2, y2 ) );
57}
58
59bool
60VPathIface::arcTo( double x1, double y1, double x2, double y2, double r )
61{
62 return m_composite->arcTo( KoPoint( x1, y1 ), KoPoint( x2, y2 ), r );
63}
64
65void
66VPathIface::close()
67{
68 m_composite->close();
69}
70
A composite path consists of one or many subpaths.
Definition vcomposite.h:48