Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Any way to speed up drawing of tiny patch object?
Date: Thu, 13 Nov 2008 16:07:01 +0000 (UTC)
Organization: Universtity of Groningen
Lines: 24
Message-ID: <gfhjb5$g9d$1@fred.mathworks.com>
References: <c99b0c35-4eca-4087-981d-ac5489bd7849@p25g2000hsf.googlegroups.com>  <c5f6b0dc-116b-4ce5-8153-ee33925804d6@a70g2000hsh.googlegroups.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1226592421 16685 172.30.248.37 (13 Nov 2008 16:07:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 13 Nov 2008 16:07:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 732365
Xref: news.mathworks.com comp.soft-sys.matlab:500648


"Chris P." <chris.peressotti@gmail.com> wrote in message <c5f6b0dc-116b-4ce5-8153-ee33925804d6@a70g2000hsh.googlegroups.com>...
> > I had _not_ thought to write my own callback... and I've got a little
> > bit of experience with that stuff, already.  Thanks for the
> > suggestion!
> 
> I gave it a go and it doesn't seem to be any faster, somehow.  Would
> anyone looking at this thread care to have a look at my code to see
> what I might be doing wrong?
> 
> - Chris

I had the same problem and worked around it like this. I copied ginput and commented out the lines with uisuspend and uirestore in them and put those calls in my own code surrounding the ginput. Something like this:

state = uisuspend(gcf);
while(loop)
 [x y] = ginput_noui(1); % modified version which doesn't use uisuspend or uirestore
 loop = do_something(x,y);
end
uirestore(state);

this solved my problems, just make sure the uirestore gets called everytime or your gui will stop behaving properly.
Hope this works for you too,

Dirkjan Krijnders