Geant4-11
Macros | Functions
SbPainterPS.cc File Reference
#include <HEPVis/SbPainterPS.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#include <time.h>
#include <locale.h>

Go to the source code of this file.

Macros

#define MAX_STR   2048
 
#define METAFILE_DEFAULT   "out.ps"
 
#define METAFILE_SCALE   1.
 
#define STRDEL(str)   {if((str)!=NULL) {::free(str);str=NULL;}}
 
#define STRDUP(str)   ((str) != NULL ? (::strcpy((char*)::malloc((unsigned)::strlen(str) + 1), str)) : (char*)NULL)
 

Functions

static double ConvertRGB_ToGrey (double a_red,double a_green,double a_blue)
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// More...
 
static char * GetDate ()
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// More...
 

Macro Definition Documentation

◆ MAX_STR

#define MAX_STR   2048

◆ METAFILE_DEFAULT

#define METAFILE_DEFAULT   "out.ps"

Definition at line 47 of file SbPainterPS.cc.

◆ METAFILE_SCALE

#define METAFILE_SCALE   1.

Definition at line 48 of file SbPainterPS.cc.

◆ STRDEL

#define STRDEL (   str)    {if((str)!=NULL) {::free(str);str=NULL;}}

Definition at line 37 of file SbPainterPS.cc.

◆ STRDUP

#define STRDUP (   str)    ((str) != NULL ? (::strcpy((char*)::malloc((unsigned)::strlen(str) + 1), str)) : (char*)NULL)

Definition at line 36 of file SbPainterPS.cc.

Function Documentation

◆ ConvertRGB_ToGrey()

double ConvertRGB_ToGrey ( double  a_red,
double  a_green,
double  a_blue 
)
static

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//

Definition at line 1042 of file SbPainterPS.cc.

1049{
1050 return (0.30 * a_red + 0.59 * a_green + 0.11 * a_blue);
1051}

Referenced by SbPainterPS::putImageInStream().

◆ GetDate()

char * GetDate ( )
static

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//

Definition at line 1029 of file SbPainterPS.cc.

1034{
1035 time_t d;
1036 time(&d);
1037 char* string = ctime(&d);
1038 string[24] = '\0';
1039 return string;
1040}

Referenced by SbPainterPS::openFileForWriting().