TPicture derives from MGraphic and represents a picture of both 2-D and 3-D geometries and images composited together. The picture, once created, can be edited only by adding more geometries and images to it. It cannot be edited in any other respect, such as removing old geometries or modifying the geometries which are already part of this picture. Users wanting to edit the picture must destroy one TPicture and create another.
TPicture is similar to TImage: both classes represent a scene made of primitive geometries. However, TImage renders the primitives onto a device-dependent pixel buffer and does not retain the geometries from which it is constructed. TPicture keeps a pure state of each geometry and its attributes as rendered onto the TGrafPort. TPicture renders its geometries in the same order (first come, first drawn) that they were originally rendered to the TGrafPort, concatenating the geometry's state with that of the picture.
Because 3-D geometries can also be rendered, a SceneBundle is needed in the constructor of TPicture so that the 3-D objects can be projected onto the picture's 2-D plane. Once projected, the projection plane is not modified when the images are rendered. TPicture is a 2-D representation of 3-D and 2-D objects.
Draws the picture to the specified TGrafPort. TPicture renders its geometries in the same order (first come, first drawn) that they were originally rendered to the grafport, concatenating the geometry's state with that of the picture.
Calling Context:
Call this function directly.
Parameters:
TGrafPort & port -The grafport into which to draw the picture.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Returns the TGrafPort associated with the picture. The port is created in the constructor. This function does not return a const pointer because the port is modified when the picture is drawn into it.
Calling Context:
Call this function directly.
Parameters:
Takes no parameters.
Return Value:
The grafport currently associated with the picture.
Exceptions:
Throws no exceptions, passes all exceptions through.