Function GraSegLoad() Foundation
Load a graphic segment from disk
GraSegLoad( [oPS], <cFileName>, [<nMode>] ) --> nSegId
GraSegLoad( [oPS], <aSegBuf>, [<nMode>] ) --> aSegIds
If an individual segment is loaded using GraSegLoad(), the function returns a numeric value by which the graphic segment is later identified. If an array is passed in parameter <aSegBuf>, return is an array of the same size as <aSegBuf>. Each element of the return array contains the identifier of the corresponding graphical segment. If the constant GRA_SEG_NIL is used for <nMode>, the value 0 is returned for each segment loaded.
The function GraSegLoad() loads graphic segments from disk. The function can be operated in two modes. In single segment-mode, the file to load the graphic segment from is specified in parameter <cFileName>. In this mode, only one graphic segment can be loaded at a time. If used in array mode, GraSegLoad() can be used to load several segments simultaneously. For that, an array with segment data must be passed in parameter <aSegBuf>. In this mode, the segments are loaded from memory instead of from a file, allowing the application to take full control over the way graphic segments are stored.
Saving graphic segments is accomplished by using the function GraSegSave(). Saving and loading allows the reuse of existing segments without having to reexecute the graphical primitives which define the image. In a print preview application, for example, this mechanism can be used to save the segments which contain the pages already prepared, and to reload them later as needed.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.