forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Graphics - loss of colour
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
Catherine



Joined: 16 May 2014
Posts: 16

PostPosted: Fri Aug 08, 2014 12:06 pm    Post subject: Graphics - loss of colour Reply with quote

I have aprogram that produces run-time grphics, plotting variable values as the run progresses. It has been in use for many years, linked into several different codes.

When I last compiled the codes (mid-Jiuly) the graphs were coming out in many different colours, as expected.
Since yesterday. when I recompiled, all the lines come out blue.
The old executables still produce coloured lines.
These results are repeatable when I run the executables on another machine.

I have used the debugger to check the colour code being passed to the line plotting routine and it takes all the expected values.

Any ideas on what may have happeneed?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Fri Aug 08, 2014 12:13 pm    Post subject: Reply with quote

The default colour mode for %gr has been changed from vga_colours to rgb_colours so you may need to add vga_colours to your %gr options.
Back to top
View user's profile Send private message AIM Address
Catherine



Joined: 16 May 2014
Posts: 16

PostPosted: Wed Aug 20, 2014 1:23 pm    Post subject: Reply with quote

The program I am running does not use %gr

I have tried adding CALL set_rgb_colours_default@(0) to the first graphics routine called, but the routine cannot be found.

I have not changed the compiler since May. The problem arose in July. Wouldn't this change in default colour system have affected thing from May?

Can anything have been changed on the computer that could cause this problem? Mid-July executables still plot in colour.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Wed Aug 20, 2014 1:34 pm    Post subject: Reply with quote

The change to the default colour mode is reflected in salflibc.dll. So if you have not changed this DLL (nor inadvertedly accessed a different one) then there should be no change in this respect.

SET_RGB_COLOURS_DEFAULT@ can be found (for example) in the INCLUDE file clearwin.ins.
Back to top
View user's profile Send private message AIM Address
Catherine



Joined: 16 May 2014
Posts: 16

PostPosted: Tue Aug 26, 2014 11:00 am    Post subject: Reply with quote

I have had an earlier version of the compiler on my computer, so there is potential for the wrong dll to be picked up (although I don't know why this should suddenly happen). I have uninstalled and reinstalled the compiler, but I still have the problem.

The dll sits in C:\Program Files(x86)\Silverfrost\FTN95
Is there anywhere else it should be?
What is the search heirarchy?

The dll is required when the program runs. So is it the version it fiinds at run time that affectrs the colours or is it the version that is picked up during compilattion?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Tue Aug 26, 2014 3:55 pm    Post subject: Reply with quote

The supplied application called SALDIAG.EXE can be used to search for the DLL.

For testing purposes you could copy the DLL to the local folder and run your exe from there.
Back to top
View user's profile Send private message AIM Address
Catherine



Joined: 16 May 2014
Posts: 16

PostPosted: Tue Aug 26, 2014 4:44 pm    Post subject: Reply with quote

I added some code that I found on the forum.
It reports that my program is accessing the latest dll from the location I gave above.

I had already tried copying the dll to the working directory, but ithe program still gave the reported problem.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Wed Aug 27, 2014 6:57 am    Post subject: Reply with quote

Is it possible to reproduce the problem in a small program for us to look at?
Back to top
View user's profile Send private message AIM Address
Catherine



Joined: 16 May 2014
Posts: 16

PostPosted: Wed Aug 27, 2014 10:08 am    Post subject: Reply with quote

I'm not sure whether I could split it apart easily. The graphics is embedded in code that I am not very familiar with. I'll think about this.

A colleague installed the compiler tempoarily on another machine that had not had any previous versions on it. The same problen occurred so it can't be to do with oicking up a previous dll. It also rules out me havung inadvertantly changed some compiler settings.
Back to top
View user's profile Send private message
Catherine



Joined: 16 May 2014
Posts: 16

PostPosted: Wed Aug 27, 2014 2:40 pm    Post subject: Reply with quote

It eems that I don't even have to recompile a program to get the problem - relinking is enough.

I have created a new executable from an old (May 2014) set of object modules. The May executable gives coloured gphics and the new one only blue.

As I reported above the problem began in the lattr half of July with no change in compiler.
Back to top
View user's profile Send private message
rogerheal



Joined: 08 Jan 2015
Posts: 2
Location: Cheshire

PostPosted: Thu Jan 08, 2015 5:25 pm    Post subject: Colour Graphics Reply with quote

I have had exactly the same problem as Catherine
What had been coloured graphs suddenly came out as all black.
I inserted:
use_rgb_colours@(handle,BOOL)
with handle=0 and BOOL=1 immediately after calling %gr to create a graphics box
All lines and symbols reverted to colours as before.
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Sat Jan 10, 2015 8:12 am    Post subject: Reply with quote

I was wondering why it's necessary to put 'USE RGBCOLOURS' if it's now the default ? Sounds like the program is referencing RGB colours but the Clearwin program is still default somewhere in VGA mode ?
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Tue Jan 13, 2015 12:55 am    Post subject: Reply with quote

If Catherine isn't using %gr, then she must be using %og or %dw. If she used %og, then she isn't using the GDI, is she, so she should be unaffected by whether VGA or RGB is the default.

My bet is that the change to RGB as the default is at the root of this for %dw windows. (Or maybe simpleplot ones).
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Tue Jan 13, 2015 7:50 am    Post subject: Reply with quote

If Catherine's using the same version compiler end of July(and now) as she was in May (as it seems to be the case) then the change to RGB has nothing to do with the problem, has it ?

(By the way Paul, in the clearwin on-line documentation it says that the change to RGB occurred in July 2013 !!! ... shouldn't that be 2014 ?)
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Tue Jan 13, 2015 8:54 am    Post subject: Reply with quote

The date looks right to me. Is it item 345 in the ClearWin+ enhancements file and the item comes before the release of FTN95 7.0 that is documented in the file.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group