I added rgb_colours to the statement as above. The graphs all went back to blue on black - the previous 'no colour' problem. I took rgb_colours out again and the colour returned. So, not quite sorted yet ...
Graphics - loss of colour
I have replaced rgb_colours by vga_colurs and have the colours back again. I Do you think this may be the solution?
Catherine,
You have probably hit it on the head. John_Silver suggested this, and I dismissed it because I thought that you'd tried it.
But you still haven't got the user-supplied handle for your graphics area, which goes between the callback and the sizes.
Paul may wish to comment that the user-supplied handle is optional if you only have one graphics area, but I certainly didn't get that from reading the documentation, although I would have thought there would be a runtime error. You certainly will struggle without a handle (even if Clearwin+ lets you get away with it) if you want to have more than one %gr.
Eddie
Eddie,
That is where I have put the vga_colurs, following your advice. I now have
I = WINIO@('%pv%^gr[black,vga_colours,user_resize]&
& ',IWIDTH,IHIGHT,RESIZE)
So I first tried rgb_colours, as you suggested. When this didn't work I changed it to vga_colours.
Catherine.
Catherine, taking your code, I think it should look like this:
iHANDLE = 99
I = WINIO@('%pv%^gr[black,vga_colours,user_resize]&
& ',IWIDTH,IHIGHT,iHANDLE,RESIZE)
The point of iHANDLE (which can take any integer value you care to give it) is that you can have multiple %gr objects, including several on different windows and printer objects, and you can switch between them using, for example:
i=SELECT_GRAPHICS_OBJECT@ (99)
would select the object defined above.
On another matter, as your graphic is made up of lines, you must be using the line drawing routines such as
SUBROUTINE DRAW_LINE_BETWEEN@(IX1,IY1,IX2,IY2,ICOL)
and what has been going wrong for you is that your ICOL values which were OK for VGA_COLOURS have not been OK for RGB_COLOURS. It's just a guess, but your colour values are perhaps named colours such as BLUE, RED etc? In which case if you wanted to use RGB_COLOURS then you would need to master the RGB@ function where you give the 3 colour indices Red, Green and Blue each in the range 0..255. I bet that some of your colour values in VGA mode were effectively invisible or wrong in RGB mode.
Eddie