Bill - thanks for your reply.  You're probably right but I was hoping to
avoid diving into the viewmat code.  I have been looking at the "platimg"
library to see if that offers any hope but, since the problem apparently has
to do with how events are handled, I'm not too optimistic.  As a workaround,
I have a piece of code to generate statements that I can cut-and-paste into
a session window - this works, it's just klugy.

I'll let you know if I find something else.  In the meantime, you could see
what I've been up to, if you're interested, by taking a look the
"algorithmic art" I've been doing with J at my flickr site:
http://www.flickr.com/photos/photonatic/sets/72157600280547434/ .

Regards,

Devon

On 4/12/08, bill lam <[EMAIL PROTECTED]> wrote:
>
> I think that with or without the setsizeloc_jviewmat_, you won't save the
> intended bmp because it require the paint event to do the actual rendering
> and that event will not happen when J is running a sentence or script. eg.
>  savemat_jviewmat_ 'z:/tmp/SineStripes.bmp' [ viewmat 1 o. +/~i:6j999
>
> There should already some discussions on similar issues in the past. A
> possible workaround is to modify the paint event code of jviewmat and put
> your savemat there.
>
> Devon McCormick wrote:
>
> > Members of the forum -
> >
> > I'm experimenting with saving bitmaps generated by "viewmat".  However,
> > I
> > find my usual method of incremental development gets snagged on some
> > kind of
> > windowing oddness.  My interactive experiment went like this:
> >
> >   viewmat 1 o. +/~i:6j999
> >   setsizeloc_jviewmat_ 0 0 1000 1000
> >   savemat_jviewmat_ pixdir,'SineStripes.bmp'
> >
> > where "pixdir" is the directory where I store my bitmaps
> > and savemat_jviewmat_
> >  sets the size and location of the viewmat window like this:
> > setsizeloc_jviewmat_=: 3 : 0
> >   if. 0=#fms=. hforms'' do.
> >       wdinfo 'viewmat';'No viewmat forms.' return.
> >   end.
> >   wd 'psel ',(<0 1) pick fms
> >   wd 'pmovex ',":y
> > NB.EG setsizeloc 10 10 240 240
> > )
> >
> > I'm resizing it to save a bitmap larger than the default.
> >
> > However, when I put the first three lines into a
> > function, the resulting file saved has only 64K (instead of 2.7MB) and
> > does not display as a valid bitmap.
> > The same thing happens when I put the three lines into a single
> > statement
> > separated by "["s.
> > Something happens, in the timing or otherwise, of returning to immediate
> > execution.  Inserting wait statements doesn't help - in fact this seems
> > to
> > freeze the display of the picture frame, before filling it in, for the
> > wait
> > time.
> >
> > Is there an obvious way to fix this or better way to save viewmats?
> >
> > Thanks,
> >
> > Devon
> >
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to