Perhaps this is too simple or has side effects I haven't encountered, but it
seems to work for me
open'viewmat'
change
NB. =========================================================
vmrun=: 4 : 0
...
wd 'pmovex ',": 0 >. fx,fy,dif + fw,fh
wd 'pshow'
to
NB. =========================================================
vmrun=: 4 : 0
...
wd 'pmovex ',": 0 >. fx,fy,dif + fw,fh
jvm_show '' NB. DM 2008 12 16
wd 'pshow'
Save and load viewmat.ijs .
Run test_viewmat'' . On Vista 32, for me, Viewmat now displays correctly and
saves a good BMP.
--
Regards,
David Mitchell
Roelof K Brouwer wrote:
> Sorry I don't have much of an idea of what you are talking about. That is
> because I use J mainly as a calculation server for expressing algorithms that
> I develop and execute. Graphic output has been outside my domain so far and I
> was looking for a simple working way to produce black/white/grey graphs of
> matrices and then saving them in files, without my intervention, at several
> locations in my verb. The displays saved should be easily portable into a
> word document where I can resize if necessarily. I can do this with displays
> produced with plot ( density graphs ) but viewmat seemed so much nicer. If I
> used clipboard I would be restricted to one save unless I intervened.
>
> cheers
>
>
> Roelof
>
> "Have a cool mind and a warm heart" - Ajahn Sona
> "Like ......(hamsters on a wheel), (ambitious people) still climb and climb,
> with great labor, and incessant anxiety, but never reach the top." Robert
> Browning
> "We shall not cease from exploration. And at the end of all our exploring
> Will be to arrive were we started and know the place for the first time" - T.
> S. Eliot
>
>
> Dr. Roelof K. Brouwer PH.D. P.Eng.
> Professor Emeritus
> Dept. of Computing Science
> School of Advanced Technologies and Mathematics
> Thompson Rivers University
> 900 McGill Road
> Kamloops, BC
> Canada, V2C 5N3
>
> email : [email protected]
> www.tru.ca/advtech/compsci/faculty/rbrouwer
>
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of bill lam
> Sent: December-15-08 10:43 PM
> To: [email protected]
> Subject: Re: [Jprogramming] savemat_jviewmat_
>
> On Sun, 14 Dec 2008, Roelof K Brouwer wrote:
>> ( 1 4 14 {". COLOR16) viewmat i.4 4
>>
>> savemat_jviewmat_ 'C:\Temp\garbage.bmp'
>
> The root of problem is that viewmat is implemented by J gl2 verbs and
> gl2 can only render itself when J is idle. A possible solution is to
> re-implement viewmat with other libraries. For example, in the recent
> plot, Chris wrote cover verbs using gtk to emulate some J gl2 and the
> plot itself does not need major modification to incorporate gtk
> backend. Parallel to this, cover verbs using gdiplus can be added to
> viewmat to make it work without gl2 under m$ window. The gdiplus
> addon is a good starting point. For linux jconsole, I suggest using
> gtk instead.
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm