Syntax
fullview([wid])
Input Parameter
wid : | | optional width in pixels or percent or [mincol maxcol] |
Examples
SGfigure; fullview; shg; pause(1)
SGfigure; fullview(2000); shg; pause(1)
fullview(0.3);shg; pause(1)
fullview([0.3 0.5]);shg; pause(1)
Copyright 2019-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)
The function fullview
is designed to maximize the current figure window to the maximum height of the screen, with an optional width adjustment. It is part of the SolidGeometry library and was introduced in version 4.5.
Input Parameters
- wid: An optional parameter that specifies the width of the figure window. It can be provided in pixels, as a percentage of the screen width, or as a range [mincol maxcol].
Algorithm Steps
- Retrieve the screen size using
get(get(gcf,'Parent'),'ScreenSize')
.
- Get the current position of the figure window with
get(gcf,'Position')
.
- Determine the width parameter using
getfuncparams
. If wid
is a single value, convert it to a range [0 wid].
- If
wid(2)
is less than 1, interpret it as a percentage and convert it to pixels by multiplying with the screen width ss(3)
.
- If
wid(1)
is less than 1, set it to a minimum of 1 plus the percentage of the screen width.
- Calculate the full screen size
fs
based on the width and screen height ss(4)
.
- Adjust the default position
defpos
to ensure it is within screen bounds, using max
and min
functions.
- Set the new position of the figure window using
set(gcf,'Position',defpos)
.
Algorithm explaination created using ChatGPT on 2025-08-19 00:53. (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