1%USING_HG2 Determine
if the HG2 graphics engine is used
6% fig - handle to the figure in question.
9% tf -
boolean indicating whether the HG2 graphics engine is being used
10% (
true) or not (
false).
12% 19/06/2015 - Suppress warning in R2015b; cache result
for improved performance
13% 06/06/2016 - Fixed issue #156 (bad
return value in R2016b)
19 if nargin < 1, fig = figure(
'visible',
'off'); end
20 oldWarn = warning(
'off',
'MATLAB:graphicsversion:GraphicsVersionRemoval');
22 % This generates a [supressed] warning in R2015b:
23 tf = ~graphicsversion(fig,
'handlegraphics');
25 tf = ~verLessThan(
'matlab',
'8.4'); % =R2014b
31 if nargin < 1,
delete(fig); end
function using_hg2(in fig)