From 1a447d0985be886eaeed91dfbe46986bc6b5aba7 Mon Sep 17 00:00:00 2001 From: Michael Schindler Date: Tue, 6 Mar 2007 15:46:37 +0000 Subject: [PATCH] a path tangent now defaults to a length of 1 cm -- this fixes bug 1632988 git-svn-id: https://pyx.svn.sourceforge.net/svnroot/pyx/trunk/pyx@2862 069f4177-920e-0410-937b-c2a4a81bcd90 --- manual/path.tex | 6 +++--- pyx/path.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/manual/path.tex b/manual/path.tex index 368d36fa..776d050d 100644 --- a/manual/path.tex +++ b/manual/path.tex @@ -130,11 +130,11 @@ Appends the list \var{pathitems} to the end of the path. \class{normpath} instances.$^\dagger$ \end{methoddesc} -\begin{methoddesc}{tangent}{params, length=None} +\begin{methoddesc}{tangent}{params, length=1} Return (a) \class{line} instance(s) corresponding to the tangent vector(s) to the path at the parameter value(s) - \var{params}.$^\ddagger$ If \var{length} is not \texttt{None}, the - tangent vector will be scaled correspondingly.$^\dagger$ + \var{params}.$^\ddagger$ The tangent vector will be scaled to the length + \var{length}.$^\dagger$ \end{methoddesc} \begin{methoddesc}{trafo}{params} diff --git a/pyx/path.py b/pyx/path.py index 592b5e0f..44d60164 100644 --- a/pyx/path.py +++ b/pyx/path.py @@ -1147,7 +1147,7 @@ class path: """split normpath at param(s) or arc length(s) and return list of normpaths""" return self.normpath().split(params) - def tangent_pt(self, params, length=None): + def tangent_pt(self, params, length): """return tangent vector of path at param(s) or arc length(s) in pts If length in pts is not None, the tangent vector will be scaled to @@ -1155,7 +1155,7 @@ class path: """ return self.normpath().tangent_pt(params, length) - def tangent(self, params, length=None): + def tangent(self, params, length=1): """return tangent vector of path at param(s) or arc length(s) If length is not None, the tangent vector will be scaled to -- 2.11.4.GIT