|
1 | | -# svgfig.py copyright (C) 2008 Jim Pivarski <jpivarski@gmail.com> |
2 | | -# |
3 | | -# This program is free software; you can redistribute it and/or |
4 | | -# modify it under the terms of the GNU General Public License |
5 | | -# as published by the Free Software Foundation; either version 2 |
6 | | -# of the License, or (at your option) any later version. |
7 | | -# |
8 | | -# This program 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 |
11 | | -# GNU General Public License for more details. |
12 | | -# |
13 | | -# You should have received a copy of the GNU General Public License |
14 | | -# along with this program; if not, write to the Free Software |
15 | | -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
16 | | -# |
17 | | -# Full licence is in the file COPYING and at http://www.gnu.org/copyleft/gpl.html |
| 1 | +# BSD 3-Clause License |
| 2 | + |
| 3 | +# Copyright (c) 2022, Jim Pivarski |
| 4 | +# All rights reserved. |
| 5 | + |
| 6 | +# Redistribution and use in source and binary forms, with or without |
| 7 | +# modification, are permitted provided that the following conditions are met: |
| 8 | + |
| 9 | +# 1. Redistributions of source code must retain the above copyright notice, this |
| 10 | +# list of conditions and the following disclaimer. |
| 11 | + |
| 12 | +# 2. Redistributions in binary form must reproduce the above copyright notice, |
| 13 | +# this list of conditions and the following disclaimer in the documentation |
| 14 | +# and/or other materials provided with the distribution. |
| 15 | + |
| 16 | +# 3. Neither the name of the copyright holder nor the names of its |
| 17 | +# contributors may be used to endorse or promote products derived from |
| 18 | +# this software without specific prior written permission. |
| 19 | + |
| 20 | +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 21 | +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 22 | +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 23 | +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| 24 | +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 25 | +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 26 | +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 27 | +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 28 | +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 29 | +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
18 | 30 |
|
19 | 31 | import re, codecs, os, platform, copy, itertools, math, cmath, random, sys, copy |
20 | 32 | _epsilon = 1e-5 |
|
45 | 57 | _hacks = {} |
46 | 58 | _hacks["inkscape-text-vertical-shift"] = False |
47 | 59 |
|
| 60 | +__version__ = "1.0.1" |
| 61 | + |
48 | 62 |
|
49 | 63 | def rgb(r, g, b, maximum=1.): |
50 | 64 | """Create an SVG color string "#xxyyzz" from r, g, and b. |
|
0 commit comments