App-SeismicUnixGui

 view release on metacpan or  search on metacpan

lib/App/SeismicUnixGui/sunix/plot/xcontour.pm  view on Meta::CPAN

 labelcfont=fixed       font name for contour labels                   

 style=seismic		 normal (axis 1 horizontal, axis 2 vertical) or	

			 seismic (axis 1 vertical, axis 2 horizontal)	





 Notes:								

 For some reason the contour might slight differ from ones generated   

 by pscontour (propably due to the pixel nature of the plot            

 coordinates)                                                          



 The line width of unlabeled contours is designed as a quarter of that	

 of labeled contours. 							





 Author: Morten Wendell Pedersen, Aarhus University 



 All the coding is based on snippets taken from xwigb, ximage and pscontour

 All I have done is put the parts together and put in some bugs ;-)



 So credits should go to the authors of these packages... 



 Caveats and Notes:

 The code has been developed under Linux 1.3.20/Xfree 3.1.2E (X11 6.1)

 with gcc-2.7.0 But hopefully it should work on other platforms as well



 Since all the contours are drawn by Vector plot call's everytime the

 Window is exposed, the exposing can be darn slow 

 OOPS This should be history... Now I keep my window content with backing

 store so I won't have to redraw my window unless I really have to...



 Portability Question: I guess I should check if the display supports

 backingstore and redraw if it doesn't (see DoesBackingStore(3) )

 I have to be able to use CWBackingStore==Always (other values can be

 NonUseful and WhenMapped



 Since I put the contour labels everytime I draw one contour level the area 

 that contains the label will be crossed by the the next contour lines...

 (this bug also seems to be present in pscontour)

 To fix this I have to redraw all the labels after been through all

 the contour calls

 Right now I can't see a way to fix this without actually to through

 the entire label positioning again....Overkill I would say



 

 The relative short length of the contour segments will propably mask the

 cdash settings

 which means it is disposable (but I know how to draw dashed lines :)

 A way of fixing this could be to get all connected point and then use

 XDrawlines or XDrawSegments... just an idea...No idea if it'll work. 



 I think there is a bug in xContour since my plot coordinates increase

 North and west ward instead of south and eastward



   I need to check the Self Doc so if the right parameters are described

   (I have been through it a couple of times but....)



   All functions need a heavy cleanup for unused variables

   I suppose there is a couple of memory leaks due to missing free'ing of

 numerous pointers (especially fonts,GC's & colors could be a problem...



   I have to browse through the internal pscontour call... basically what

 I have done is just putting pscontour instead of pswigb... Instead of

 repositioning the input file  pointer (which doesnt work with pipes) one

 should consider the use of temporary file

   or write your zoombox to pscontour (...how one does that?)



  Wish List:

   The use of cgray's unused until now... I guess I'll need to allocate

 a gray Colormap  -> meaning that the code not will run at other display

 than 8 bit Pseudocolor :( (with the use of present version of the colormap

 library (code in $CWPROOT/src/xplot/lib ) )



  The format of contour label should be open for the user.. 

  

  It could be nice if one could choose to have a pixmap (like ximage )

 underlying  the contours... this should be defined either by the input

 data  or by a seperate file

  eg useful for viewing traveltime contours on top a plot of the velocity

 field



=head2 User's notes (Juan Lorenzo)
untested

=cut


=head2 CHANGES and their DATES

=cut

use Moose;
our $VERSION = '0.0.1';


=head2 Import packages

=cut

use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants';

use App::SeismicUnixGui::misc::SeismicUnix qw($go $in $off $on $out $ps $to $suffix_ascii $suffix_bin $suffix_ps $suffix_segy $suffix_su);
use aliased 'App::SeismicUnixGui::configs::big_streams::Project_config';


=head2 instantiation of packages

=cut

my $get					= L_SU_global_constants->new();
my $Project				= Project_config->new();
my $DATA_SEISMIC_SU		= $Project->DATA_SEISMIC_SU();
my $DATA_SEISMIC_BIN	= $Project->DATA_SEISMIC_BIN();
my $DATA_SEISMIC_TXT	= $Project->DATA_SEISMIC_TXT();

my $PS_SEISMIC      	= $Project->PS_SEISMIC();



( run in 1.794 second using v1.01-cache-2.11-cpan-39bf76dae61 )