~ubuntu-branches/debian/sid/pyx/sid

« back to all changes in this revision

Viewing changes to manual/connector.tex

  • Committer: Bazaar Package Importer
  • Author(s): Stuart Prescott
  • Date: 2011-05-20 00:13:52 UTC
  • mto: (9.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20110520001352-odcuqpdezuusbbw1
Tags: upstream-0.11.1
ImportĀ upstreamĀ versionĀ 0.11.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
\chapter{Module \module{connector}}
2
 
\label{connector}
3
 
 
4
 
This module provides classes for connecting two \class{box}-instances with
5
 
lines, arcs or curves. All constructors of the following connector-classes take
6
 
two \class{box}-instances as the two first arguments. They return a connecting
7
 
path from the first to the second box. The overall geometry of the path is such
8
 
that is starts/ends at the boxes' centers. It is then cut by the boxes'
9
 
outlines. The resulting \class{connector} will additionally be shortened by
10
 
lengths given in the \keyword{boxdists}-keyword (a list of two lengths, default
11
 
\code{[0,0]}).
12
 
 
13
 
Angle keywords can be either absolute or relative. The absolute angles refer to
14
 
the angle between x-axis and the running tangent of the connector, while the
15
 
relative angles are between the direct connecting line of the box-centers and
16
 
the running tangent (see figure.~\ref{fig:connector}).
17
 
 
18
 
The bulge-keywords parameterize the deviation of the connector from the
19
 
connecting line. It has different meanings for different connectors (see
20
 
figure.~\ref{fig:connector}).
21
 
 
22
 
\section{Class \class{line}}
23
 
 
24
 
The constructor of the \class{line} class accepts only boxes and the
25
 
\keyword{boxdists}-keyword.
26
 
 
27
 
\section{Class \class{arc}}
28
 
 
29
 
The constructor takes either the \keyword{relangle}-keyword or a
30
 
combination of \keyword{relbulge} and \keyword{absbulge}. The ``bulge'' is
31
 
meant to be a hint for the greatest distance between the connecting arc and the
32
 
straight connection between the box-centers. (Default: \code{relangle=45},
33
 
\code{relbulge=None}, \code{absbulge=None})\smallskip
34
 
 
35
 
Note that the bulge-keywords override the angle-keyword.
36
 
 
37
 
If both \keyword{relbulge} and \keyword{absbulge} are given, they will be
38
 
added.
39
 
 
40
 
\section{Class \class{curve}}
41
 
 
42
 
The constructor takes both angle- and bulge-keywords. Here, the bulges are
43
 
used as distances between the control points of the cubic Bezi\'er-curve.
44
 
For the signs of the angle- and bulge-keywords refer to figure~\ref{fig:connector}.
45
 
 
46
 
\keyword{absangle1} or \keyword{relangle1}\\
47
 
\keyword{absangle2} or \keyword{relangle2}, where the absolute angle overrides the
48
 
relative if both are given. (Default: \code{relangle1=45},
49
 
\code{relangle2=45}, \code{absangle1=None}, \code{absangle2=None})\medskip
50
 
 
51
 
\keyword{absbulge} and \keyword{relbulge}, where they will be added if both are
52
 
given.\\ (Default: \code{absbulge=None}, \code{relbulge=0.39}; these default
53
 
values produce output similar to the defaults of \class{arc}.)\medskip
54
 
 
55
 
 
56
 
\begin{figure}[hbt]
57
 
\centerline{
58
 
\includegraphics{connector}
59
 
}
60
 
\caption{The angle-parameters of the connector.arc (left panel) and the
61
 
connector.curve (right panel) classes.}
62
 
\label{fig:connector}
63
 
\end{figure}
64
 
 
65
 
\section{Class \class{twolines}}
66
 
 
67
 
This class returns two connected straight lines. There is a vast variety of
68
 
combinations for angle- and length-keywords. The user has to make sure to
69
 
provide a non-ambiguous set of keywords:\medskip
70
 
 
71
 
\keyword{absangle1} or \keyword{relangle1} for the first angle,\\
72
 
\keyword{relangleM} for the middle angle and\\
73
 
\keyword{absangle2} or \keyword{relangle2} for the ending angle.
74
 
Again, the absolute angle overrides the relative if both are given. (Default:
75
 
all five angles are \code{None})\medskip
76
 
 
77
 
\keyword{length1} and \keyword{length2} for the lengths of the connecting lines.
78
 
(Default: \code{None})
79
 
 
80