Path: news.mathworks.com!not-for-mail
From: "Darik " <dgambleDEL@uwaterlooDEL.caDEL>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Any way to speed up drawing of tiny patch object?
Date: Fri, 13 Jun 2008 16:44:02 +0000 (UTC)
Organization: Waterloo
Lines: 22
Message-ID: <g2u84i$a4m$1@fred.mathworks.com>
References: <c99b0c35-4eca-4087-981d-ac5489bd7849@p25g2000hsf.googlegroups.com>  <77d1cc7e-35a5-4f8f-8baa-dde45491f432@w7g2000hsa.googlegroups.com>
Reply-To: "Darik " <dgambleDEL@uwaterlooDEL.caDEL>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1213375442 10390 172.30.248.38 (13 Jun 2008 16:44:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 13 Jun 2008 16:44:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 895526
Xref: news.mathworks.com comp.soft-sys.matlab:473685



"Chris P." <chris.peressotti@gmail.com> wrote in message
<77d1cc7e-35a5-4f8f-8baa-dde45491f432@w7g2000hsa.googlegroups.com>...
> > SO, the problem is somewhere in ginput itself, yes? 
Does anyone have any ideas?
> > (I'm going to go through ginput with a fine-toothed comb
> > right now, but I thought I'd give this update in case
anyone has a
> > quick answer.)
> 
> So I've traced the problem to a call to
"waitforbuttonpress", which is
> a built-in function, so I think that my optimization stops
here (so
> long as I want to use the mouse as the tool to select the
cells, and I
> don't see a better option).  C'est la vie.
> 
> - Chris

It's atrocious that ginput takes so long. Use the
ButtonDownFcn property of the image to define your own
callback to select a cell.