Node: Appending to Paths, Next: , Previous: Path Operators, Up: Path Reference



Appending

Path append (const Path& pa, [string connector = "--", [bool assign = true]]) Function
Appends pa to *this using connector to join them and returns the resulting Path. If assign == true, then the return value is assigned to *this, otherwise, *this remains unchanged.

If necessary, a const version could be added, for const Paths.

          Point A(-2, 2);
          Point B(-2, -2);
          Point C(2, -2);
          Point D(2, 2);
          Path q("--", false, &A, &B, &C, &D, 0);
          Point E(1, 2);
          Point F(0, 4);
          Point G(-.5, 3);
          Path r("..", false, &E, &F, &G, 0);
          q.append(r, "..", true);
          q += "..";
          q += "--";
          q.set_cycle();
          q.show("q:");
          -| q:
             (-2, 2, 0) -- (-2, -2, 0) --
             (2, -2, 0) -- (2, 2, 0) ..
             (1, 2, 0) .. (0, 4, 0) ..
             (-0.5, 3, 0) -- cycle;
          


[Figure 114. Not displayed.]

Fig. 114.