Applied (mostly) as r3203 and r3201
[PyX/mjg.git] / examples / path / addjoin.txt
blobc82af1163ec7a203a7fa9d3e81b964a2d29cdf66
1 Adding and joining paths
3 The result of this example looks the same as the [''pathitem''
4 ../drawing/pathitem.html] example from the ''Basic drawing'' section. However, we
5 are using a different approach to construct the paths in this example: we add
6 and join paths. ... When ''adding'' two paths, the resulting path just contains
7 all the subpaths from the first and the second path as its subpaths. The
8 ''join'' operation between two paths is similar but it combines the last
9 subpath from the first path and continues it by the first subpath of the second
10 path. Thus, ''join'' does not increase the number of subpaths like the ''add''
11 operation.
13 ! A similar result in terms of the line thickness could be achieved by setting a
14 different scale for the linewidth by
16     unit.set(wscale=10)
18 immediately after the import statement. The unit system of PyX is aware of
19 several length types (unscaleable ''true'' coordinates `t`, regular ''user'' coordinates
20 `u`, ''visual'' coordinates `v` for arrows, symbols and other small visual components,
21 line ''widths'' `w` and the ``text`` sizes `x`). The length types can be scaled
22 independent of each other (except for ''true'' coordinates, which cannot be scaled at all).
24 ! Note that joining two paths might insert a line connecting the first and the
25 second path. For example, we could skip the second line when constructing
26 `rect2` in our example above without any change in the result.