Node: Picture Operators, Next: , Previous: Picture Constructors, Up: Picture Reference



Operators

void operator= (const Picture& p) Assignment operator
Makes *this a copy of p, destroying the old contents of *this.

void operator+= (const Picture& p) Operator
Adds the contents of p to *this. p remains unchanged.

void operator+= (Shape* s) Operator
Puts s onto shapes. Note that the pointer s itself is put onto shapes, so any allocation and copying must be performed first. This is a low-level function that users normally won't need to use directly.

void operator+= (Label* label) Operator
Puts label onto labels. Note that the pointer label itself is put onto labels, so any allocation and copying must be performed first. This is a low-level function that users normally won't need to invoke directly.

Transform operator*= (const Transform& t) Operator
Multiplies transform by t. This has the effect of transforming all of the Shapes on shapes and all of the Points of the Labels on labels by t upon output.
          Transform t;
          t.rotate(0, 0, 180);
          t.shift(3);
          Reg_Polygon pl(origin, 5, 3, 90);
          pl.draw();
          pl.label();
          current_picture.output(Projections::PARALLEL_X_Y);
          current_picture *= t;
          current_picture.output(Projections::PARALLEL_X_Y);
          


[Figure 78. Not displayed.]

Fig. 78.