Thanks a lot! Now I have another problem of minos stoping working when I
include gsl.fs. BTW what is the most appropriate place to include files
when I write a MINOS program?
In addition to your comment about create-mipmap{3,4}. I have used this
method previously with success, but I had to make one modification in my
repository for it to work. That is, making these methods public. Can you
do that in the main bigforth tree?
the code example where I use it (may be worth adding to bigforth
examples ? :) can be downloaded from here:
the code (14Kb):
http://www-bcl.cs.unm.edu/~pliz/slice-view.tar.bz2
sample data (1.3M):
http://www-bcl.cs.unm.edu/~pliz/brainsmall.dat
It does exactly what you have suggested with OpenGL canvas but I'd
rather have the regular canvas class have the feature too.
Thanks again!
--
Sergey
Bernd Paysan wrote:
On Thursday 25 October 2007 04:05, Sergey Plis wrote:
Hi,
What it takes to implement a method in canvas class that would allow
drawing from memory. Suppose I have a 2D array of RGB (or RGBA)
values. I want to display this array on canvas object (I align their
dimensions). Do I use mask method of display class? Do I have to go
down to using X11 functions or I can get along with what's already
implemented?
The create-pixmap word is your friend. It takes
( data size w h bits dpy -- pixmap w h )
You probably want to make a derived class of icon-pixmap which takes a
memory array instead a file name to initialize, since canvas can easily
draw an icon-pixmap object.
I'll try to implement this for you, as it seems to be fairly trivial,
and indeed useful.
If you like to, you can also achieve this with the 3D turtle graphics
object, since this has a create-mipmap3 and create-mipmap4 method which
takes a RGB (3) or RGBA (4) array in memory and makes a texture from
it. Then you can use that texture to draw a rectangle with it.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]