pushgcf

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Visualization
Introduced first in SolidGeometry 5.1, Creation date: 2021-12-05, Last change: 2025-08-18

remembers all graphics object in the current figure;

Description

..useful if the recording of all handles is not possible

See Also: copyfig , copygo , pastego , popgcf

Example Illustration

 missing image of pushgcf

Syntax

pushgcf

Examples


SGfigure; SGbox; pushgcf; CPSplot(PLcircle(30)); pause(1); popgcf;




Copyright 2021-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Algorithm (Workflow)

This function, pushgcf, is part of the SG-Library and is used to remember all graphics objects in the current figure. It is particularly useful when recording all handles is not possible.

Input Parameters

The function pushgcf does not take any input parameters.

Global Variables

Algorithm Steps

  1. Use the findobj function to find all graphics objects in the current figure (gcf) and assign them to the global variable pushgcfhandle.
  2. Use the getgcatitle function to retrieve the title of the current figure and assign it to the global variable pushgcftitle.

Example Usage

The function can be used in a sequence of commands to save the state of a figure, perform operations, and then restore the figure:

SGfigure; 
SGbox; 
pushgcf; 
CPSplot(PLcircle(30)); 
pause(1); 
popgcf;

In this example, a figure is created and a box is drawn. The state of the figure is saved using pushgcf. A circle is plotted, and after a pause, the original state of the figure is restored using popgcf.

Algorithm explaination created using ChatGPT on 2025-08-18 22:10. (Please note: No guarantee for the correctness of this explanation)

Last html export of this page out of FM database by TL: 2025-09-21