rastermagic.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <math.h>
#include "rastermagic.h"
#include "global.h"
#include "cmdline.h"
#include "font_8x16.c"

Include dependency graph for rastermagic.c:

Go to the source code of this file.

Defines

#define PAINT_LINE(a, fc, bc)
#define PAINT_LINE(a, fc, bc)
#define exp10(a)   exp(M_LN10*(a))

Functions

void * do_alloc (long a, long b)
RGBPicmake_RGBPic (int width, int height)
void free_RGBPic (RGBPic *p)
void RGBPic_vprintf (RGBPic *p, int x, int y, int fg_color, int bg_color, const char *format, va_list ap)
void RGBPic_printf (RGBPic *p, int x, int y, int fg_color, int bg_color, const char *format,...)
void RGBPic_vprintf_v (RGBPic *p, int x, int y, int fg_color, int bg_color, const char *format, va_list ap)
void RGBPic_printf_v (RGBPic *p, int x, int y, int fg_color, int bg_color, const char *format,...)
void RGBPic_dump_ppm (char *filename, RGBPic *p)
void RGBPic_clear_area (RGBPic *p, int color, int x1, int y1, int x2, int y2)
void RGBPic_draw_line (RGBPic *p, int color, int x1, int y1, int x2, int y2)
PLOTmake_plot (int width, int height)
void free_plot (PLOT *plot)
void adjust_plot_limits_f (PLOT *plot, float *x, float *y, int count, int step_x, int step_y, int replace)
void adjust_plot_limits_d (PLOT *plot, double *x, double *y, int count, int step_x, int step_y, int replace)
void draw_grid (RGBPic *p, PLOT *plot, int x, int y)
void draw_points_f (RGBPic *p, PLOT *plot, int color, float *xx, float *yy, int count, int step_x, int step_y)
void draw_points_d (RGBPic *p, PLOT *plot, int color, double *xx, double *yy, int count, int step_x, int step_y)
PALETTEmake_hue_palette (int ncolors)
void free_palette (PALETTE *p)
DENSITY_MAPmake_density_map (int x_ppp, int y_ppp, int nbands)
void free_density_map (DENSITY_MAP *dm)
void adjust_density_map_limits_f (DENSITY_MAP *dm, float *z, int count, int step, int replace)
void adjust_density_map_limits_d (DENSITY_MAP *dm, double *z, int count, int step, int replace)
void adjust_masked_density_map_limits_f (DENSITY_MAP *dm, float *z, int *mask, int count, int step, int replace)
void adjust_masked_density_map_limits_d (DENSITY_MAP *dm, double *z, int *mask, int count, int step, int replace)
void draw_density_map_key (RGBPic *p, DENSITY_MAP *dm, int x, int y)
void draw_density_map_f (RGBPic *p, int x, int y, DENSITY_MAP *dm, float *z, int x_count, int y_count, int step_x, int step_y)
void layout_density_map_plot (RGBPic *p, DENSITY_MAP *dm, int max_x_count, int max_y_count)
void plot_single_density_map_f (RGBPic *p, DENSITY_MAP *dm, float *z, int x_count, int y_count, int step_x, int step_y)
void draw_density_map_d (RGBPic *p, int x, int y, DENSITY_MAP *dm, double *z, int x_count, int y_count, int step_x, int step_y)
void plot_single_density_map_d (RGBPic *p, DENSITY_MAP *dm, double *z, int x_count, int y_count, int step_x, int step_y)
void plot_grid_xy_d (RGBPic *p, int x, int y, DENSITY_MAP *dm, SKY_GRID *grid, double *z, int step)
void plot_grid_d (RGBPic *p, SKY_GRID *grid, double *z, int step)
void plot_grid_xy_f (RGBPic *p, int x, int y, DENSITY_MAP *dm, SKY_GRID *grid, float *z, int step)
void plot_grid_f (RGBPic *p, SKY_GRID *grid, float *z, int step)

Variables

char * output_dir
gengetopt_args_info args_info


Define Documentation

#define PAINT_LINE ( a,
fc,
bc   ) 

Value:

{                        line2=line;                         /* get first pixel to paint */                         dst=p->a+(y+i)*p->stride+z*p->step;                         /* get background and foreground colors */                         c1=fc;                         c2=bc;                         for(j=0;j<8;j++){                                 if(line2 & 0x80){                                         *dst=c1;                                         } else {                                         *dst=c2;                                         }                                 dst+=step;                                 line2<<=1;                                 }                         }

#define PAINT_LINE ( a,
fc,
bc   ) 

Value:

{                        line2=line;                         /* get first pixel to paint */                                   dst=p->a+(z)*p->stride+(x+i)*p->step;                         /* get background and foreground colors */                         c1=fc;                         c2=bc;                         for(j=0;j<8;j++){                                 if(line2 & 0x80){                                         *dst=c1;                                         } else {                                         *dst=c2;                                         }                                 dst-=p->stride;                                 line2<<=1;                                 }                         }

#define exp10 ( a   )     exp(M_LN10*(a))

Definition at line 448 of file rastermagic.c.


Function Documentation

void* do_alloc ( long  a,
long  b 
)

Definition at line 39 of file dat2skymap.c.

RGBPic* make_RGBPic ( int  width,
int  height 
)

Definition at line 37 of file rastermagic.c.

void free_RGBPic ( RGBPic p  ) 

Definition at line 54 of file rastermagic.c.

void RGBPic_vprintf ( RGBPic p,
int  x,
int  y,
int  fg_color,
int  bg_color,
const char *  format,
va_list  ap 
)

Definition at line 71 of file rastermagic.c.

void RGBPic_printf ( RGBPic p,
int  x,
int  y,
int  fg_color,
int  bg_color,
const char *  format,
  ... 
)

Definition at line 138 of file rastermagic.c.

void RGBPic_vprintf_v ( RGBPic p,
int  x,
int  y,
int  fg_color,
int  bg_color,
const char *  format,
va_list  ap 
)

Definition at line 150 of file rastermagic.c.

void RGBPic_printf_v ( RGBPic p,
int  x,
int  y,
int  fg_color,
int  bg_color,
const char *  format,
  ... 
)

Definition at line 216 of file rastermagic.c.

void RGBPic_dump_ppm ( char *  filename,
RGBPic p 
)

Definition at line 228 of file rastermagic.c.

void RGBPic_clear_area ( RGBPic p,
int  color,
int  x1,
int  y1,
int  x2,
int  y2 
)

Definition at line 270 of file rastermagic.c.

void RGBPic_draw_line ( RGBPic p,
int  color,
int  x1,
int  y1,
int  x2,
int  y2 
)

Definition at line 301 of file rastermagic.c.

PLOT* make_plot ( int  width,
int  height 
)

Definition at line 371 of file rastermagic.c.

void free_plot ( PLOT plot  ) 

Definition at line 385 of file rastermagic.c.

void adjust_plot_limits_f ( PLOT plot,
float *  x,
float *  y,
int  count,
int  step_x,
int  step_y,
int  replace 
)

Definition at line 390 of file rastermagic.c.

void adjust_plot_limits_d ( PLOT plot,
double *  x,
double *  y,
int  count,
int  step_x,
int  step_y,
int  replace 
)

Definition at line 419 of file rastermagic.c.

void draw_grid ( RGBPic p,
PLOT plot,
int  x,
int  y 
)

Definition at line 450 of file rastermagic.c.

void draw_points_f ( RGBPic p,
PLOT plot,
int  color,
float *  xx,
float *  yy,
int  count,
int  step_x,
int  step_y 
)

Definition at line 546 of file rastermagic.c.

void draw_points_d ( RGBPic p,
PLOT plot,
int  color,
double *  xx,
double *  yy,
int  count,
int  step_x,
int  step_y 
)

Definition at line 578 of file rastermagic.c.

PALETTE* make_hue_palette ( int  ncolors  ) 

Definition at line 649 of file rastermagic.c.

void free_palette ( PALETTE p  ) 

Definition at line 663 of file rastermagic.c.

DENSITY_MAP* make_density_map ( int  x_ppp,
int  y_ppp,
int  nbands 
)

Definition at line 669 of file rastermagic.c.

void free_density_map ( DENSITY_MAP dm  ) 

Definition at line 687 of file rastermagic.c.

void adjust_density_map_limits_f ( DENSITY_MAP dm,
float *  z,
int  count,
int  step,
int  replace 
)

Definition at line 693 of file rastermagic.c.

void adjust_density_map_limits_d ( DENSITY_MAP dm,
double *  z,
int  count,
int  step,
int  replace 
)

Definition at line 714 of file rastermagic.c.

void adjust_masked_density_map_limits_f ( DENSITY_MAP dm,
float *  z,
int *  mask,
int  count,
int  step,
int  replace 
)

Definition at line 735 of file rastermagic.c.

void adjust_masked_density_map_limits_d ( DENSITY_MAP dm,
double *  z,
int *  mask,
int  count,
int  step,
int  replace 
)

Definition at line 761 of file rastermagic.c.

void draw_density_map_key ( RGBPic p,
DENSITY_MAP dm,
int  x,
int  y 
)

Definition at line 802 of file rastermagic.c.

void draw_density_map_f ( RGBPic p,
int  x,
int  y,
DENSITY_MAP dm,
float *  z,
int  x_count,
int  y_count,
int  step_x,
int  step_y 
)

Definition at line 824 of file rastermagic.c.

void layout_density_map_plot ( RGBPic p,
DENSITY_MAP dm,
int  max_x_count,
int  max_y_count 
)

Definition at line 908 of file rastermagic.c.

void plot_single_density_map_f ( RGBPic p,
DENSITY_MAP dm,
float *  z,
int  x_count,
int  y_count,
int  step_x,
int  step_y 
)

Definition at line 933 of file rastermagic.c.

void draw_density_map_d ( RGBPic p,
int  x,
int  y,
DENSITY_MAP dm,
double *  z,
int  x_count,
int  y_count,
int  step_x,
int  step_y 
)

Definition at line 940 of file rastermagic.c.

void plot_single_density_map_d ( RGBPic p,
DENSITY_MAP dm,
double *  z,
int  x_count,
int  y_count,
int  step_x,
int  step_y 
)

Definition at line 1009 of file rastermagic.c.

void plot_grid_xy_d ( RGBPic p,
int  x,
int  y,
DENSITY_MAP dm,
SKY_GRID grid,
double *  z,
int  step 
)

Definition at line 1016 of file rastermagic.c.

void plot_grid_d ( RGBPic p,
SKY_GRID grid,
double *  z,
int  step 
)

Definition at line 1073 of file rastermagic.c.

void plot_grid_xy_f ( RGBPic p,
int  x,
int  y,
DENSITY_MAP dm,
SKY_GRID grid,
float *  z,
int  step 
)

Definition at line 1083 of file rastermagic.c.

void plot_grid_f ( RGBPic p,
SKY_GRID grid,
float *  z,
int  step 
)

Definition at line 1140 of file rastermagic.c.


Variable Documentation

char* output_dir

Definition at line 36 of file dat2skymap.c.

struct gengetopt_args_info args_info

Definition at line 40 of file bar_response.c.


Generated on Sat Sep 6 03:08:25 2008 for LAL by  doxygen 1.5.2