1 /* Copyright (C) 2005 The cairomm Development Team
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Library General Public
5 * License as published by the Free Software Foundation; either
6 * version 2 of the License, or (at your option) any later version.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Library General Public License for more details.
13 * You should have received a copy of the GNU Library General Public
14 * License along with this library; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 #include <cairomm/path.h>
20 #include <cairomm/private.h>
30 m_cobject = cairo_path_create();
34 Path::Path(cairo_path_t* cobject, bool take_ownership)
41 std::cerr << "cairomm: Path::Path(): copying of the underlying cairo_path_t* is not yet implemented." << std::endl;
42 //m_cobject = cairo_path_copy(cobject);
47 Path::Path(const Path& src)
49 //Reference-counting, instead of copying by value:
53 m_cobject = cairo_path_copy(src.m_cobject);
60 cairo_path_destroy(m_cobject);
64 Path& Path::operator=(const Path& src)
66 //Reference-counting, instead of copying by value:
71 if(m_cobject == src.m_cobject)
76 cairo_path_destroy(m_cobject);
83 m_cobject = cairo_path_copy(src.m_cobject);
90 bool Path::operator==(const Path& src) const
92 return cairo_path_equal(m_cobject, src.cobj());