www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@xregGui/@javaToolbar/pGetCurrentImage.m
function imdata = pGetCurrentImage(obj) %PGETCURRENTIMAGE Return the image data that is currently in java % % IMDATA = PGETCURRENTIMAGE(OBJ) returns the int32 image data that is % currently in the java renderer. % Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc. imdata = obj.hJavaImage.Peer.getImage; if isempty(imdata) % Need to correctly dimension an empty return from java. posRect = obj.hToolbarInterface.Position; imheight = max(0, min(posRect(4)-6, obj.ButtonHeight)); imdata = zeros(imheight, 0, 'int32'); end