cairo-path-sink.cpp revision 55f2771ba269b0a69fa28689bee6e556bf5e1df7
210N/A * @brief Path sink for Cairo contexts 943N/A * Copyright 2014 Krzysztof KosiĆski 210N/A * This library is free software; you can redistribute it and/or 919N/A * modify it either under the terms of the GNU Lesser General Public 919N/A * License version 2.1 as published by the Free Software Foundation 919N/A * (the "LGPL") or, at your option, under the terms of the Mozilla 919N/A * Public License Version 1.1 (the "MPL"). If you do not alter this 919N/A * notice, a recipient may use your version of this file under either 919N/A * You should have received a copy of the LGPL along with this library 919N/A * in the file COPYING-LGPL-2.1; if not, output to the Free Software 919N/A * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 919N/A * You should have received a copy of the MPL along with this library 919N/A * in the file COPYING-MPL-1.1 919N/A * The contents of this file are subject to the Mozilla Public License 919N/A * Version 1.1 (the "License"); you may not use this file except in 919N/A * compliance with the License. You may obtain a copy of the License at 210N/A * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY 210N/A * OF ANY KIND, either express or implied. See the LGPL or the MPL for 210N/A * the specific language governing rights and limitations. 970N/A // degree-elevate to cubic Bezier, since Cairo doesn't do quad Beziers 970N/A // google "Bezier degree elevation" for more info // Cairo only does circular arcs. // To do elliptical arcs, we must use a temporary transform. // TODO move Cairo-2Geom matrix conversion into a common location /* Note that an extra linear segment will be inserted before the arc * if Cairo considers the current point distinct from the initial point * of the arc; we could partially alleviate this by not emitting * linear segments that are followed by arc segments, but this would require * buffering the input curves. */ c-file-style:"stroustrup" c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :