go to www.geomview.org home page
 
Home

Overview
FAQ
Documentation

Download

Mailing List

Geomview For Windows?

Support
Users
Development

Bug Reporting
Contributing
Contact Us

Sponsors

 

Site Search

 

Advanced
Search

 
About the software@geom archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Closed REQ 5655]: modifying Geomview


  • To: software@geom.umn.edu
  • Subject: Re: [Closed REQ 5655]: modifying Geomview
  • From: daemon
  • Date: Mon, 27 Nov 1995 09:58:10 -0600 (CST)

> 
> Date: Sun, 26 Nov 1995 19:23:02 GMT
> From: root at ness.psychol.ucl.ac.uk (0000-Admin\(0000\))
> Message-Id: <9511261923.AA02164 at ness.psychol>
> To: software@geom.umn.edu
> Subject: modifying Geomview
> 
> Hi
> 
> I recently installed a copy of Geomview.  I hope you don't mind my seeking some advice from you regarding modifying the code.  I've installed Geomview on a SunOs workstation (release 5.4) with open windows (release 3.4).  I have been attemppting to modify>  the code to allow the rgb sliders in the color panel to always have the same value (ie: when one of the color sliders is changed, the other two sliders change simultaneously and take on the same values).  I have made numerous changes in number of files (> most of which are listed below), but no matter what I do the program is unaffected!  I've spent two weeks on the problem and I am beginning to run out of ideas.  I will be extremely grateful for any advice you have to offer, or if you could just point me > to the appropriate files.  
> 
> 
> A list of files I have modified without any noticeable effect on the program.
. 
. 
> ~Geomview/src/bin/geomview/x11/gvcolor.c 
. 
. 

The gvcolor.c file is the only one you need to touch. Just look for
the function rgb_sliders() and replace it with the following code:

static void rgb_sliders(Widget w, XtPointer data, XmScaleCallbackStruct *cbs)
{

  rgb.r = rgb.g = rgb.b = ((float)cbs->value)/255.0;
  XmScaleSetValue(SliderR, (int)(255.0 * rgb.r));
  XmScaleSetValue(SliderG, (int)(255.0 * rgb.g));
  XmScaleSetValue(SliderB, (int)(255.0 * rgb.b));

  set_rgbtext();

}

This will result in all the sliders being locked to the same value.
Change any one slider and the others will stay right along with it. Of
course this can only give you shades of gray. Don't know why you'd
want that.

enjoy,
Daeron


 
Home | Overview | FAQ | Documentation | Support | Download | Mailing List
Windows? | Development | Bug Reporting | Contributing | Contact Us | Sponsors
 
site hosted by
SourceForge Logo