|
| 1 | +# OpenPHIGS |
| 2 | + |
| 3 | +This repository is based on OpenPHIGS from |
| 4 | + |
| 5 | +https://sourceforge.net/projects/phigs/files/ |
| 6 | + |
| 7 | +which is based on |
| 8 | + |
| 9 | +https://www.x.org/archive/unsupported/lib/PHIGS |
| 10 | + |
| 11 | +This distribution contains modifications and extensions which are needed for the purpose of data preservation in high energy physics. |
| 12 | +The code maturity level is pre-alpha, since it does not implement the full standard, neither for the C bindings, nor for Fortran. |
| 13 | + |
| 14 | +## Building |
| 15 | + |
| 16 | +Run |
| 17 | +``` |
| 18 | +make |
| 19 | +``` |
| 20 | +which will create and install the OpenPHIGS library, headers and tests in a new subdirectory called distrib. |
| 21 | + |
| 22 | +### Switching between GLEW and Epoxy |
| 23 | +Openphigs uses by default GLEW. Switching between GLEW and Epoxy is supported by configuring with -DUSE_GLEW=0. The Makefile checks for the environment variable NO_GLEW. If defined, it will use Epoxy, else GLEW. To switch to Epoxy, do |
| 24 | +``` |
| 25 | +NO_GLEW=1 make |
| 26 | +``` |
| 27 | + |
| 28 | +### Switching between Xaw and Motif Widgets |
| 29 | +By default, widgets will use Motif. To switch to Xaw, make sure that cmake is configure without the -DMotif switch. Take a look at the top level CMakeLists.txt file |
| 30 | + |
| 31 | +## Extensions |
| 32 | +Some extensions have been implemented, specifically for the Fortran bindings, to support the DELPHI and OPAL event displays. |
| 33 | + |
| 34 | +### New Work station types 4 and 5 |
| 35 | +Work station types 4 (without double buffering) and 5 (with double buffering) take a screen shot when closed and write the screen shot as targa file to a file name. |
| 36 | + |
| 37 | +#### Fortran bindings: |
| 38 | +The second argument of popwk expects a non-zero integer which will be passed on as LUN. |
| 39 | + |
| 40 | +* If a file name has been defined in the configuration file as %wf <filename>, the targa file will be created with this name in the current folder. |
| 41 | +* If no file name has been defined in the configuration file as %wf <filename> fort.<LUN> will be used. |
| 42 | +* After opening the work station, the output file name can be set with a call to CALL PSFNAME(WKD, <filename>) where filename can be the full path to the output |
| 43 | + |
| 44 | +#### C bindings |
| 45 | + |
| 46 | +* If a file name has been defined in the configuration file as %wf <filename>, the targa file will be created with this name in the current folder. |
| 47 | +* If no file name has been defined in the configuraiton file, it defaults to "output.tga" and is created in the current directory. |
| 48 | + |
| 49 | +## Transparency |
| 50 | +The ALPHA channel in a structure can be set with |
| 51 | + |
| 52 | +CALL PSALCH(X) |
| 53 | + |
| 54 | +where X is a floating point number between 0. (fully transparent) and 1. (fully opaque). |
| 55 | + |
| 56 | +## Migration notes and extensions |
| 57 | +Some notes on differences with respect to other implementations. |
| 58 | + |
| 59 | +### Workstation types |
| 60 | +* 0 PWST_OUTPUT_TRUE Output only on GL display |
| 61 | +* 1 PWST_OUTIN_TRUE Input/Output on GL display |
| 62 | +* 2 PWST_OUTPUT_TRUE_DB Output only on GL, buffered |
| 63 | +* 3 PWST_OUTIN_TRUE_DB Input/Output on GL display, buffered |
| 64 | +* 4 PWST_HCOPY_TRUE Hardcopy to file as TGA |
| 65 | +* 5 PWST_HCOPY_TRUE_DB Hardcopy to file as TGA |
| 66 | +* 6 PWST_HCOPY_TRUE_RGB_PNG Hardcopy to file as PNG RGB only |
| 67 | +* 7 PWST_HCOPY_TRUE_RGB_PNG_DB Hardcopy to file as PNG RGB only |
| 68 | +* 8 PWST_HCOPY_TRUE_RGBA_PNG Hardcopy to file as PNG with Alpha channel |
| 69 | +* 9 PWST_HCOPY_TRUE_RGBA_PNG_DB Hardcopy to file as PNG with Alpha channel |
| 70 | + |
| 71 | +Notes: |
| 72 | + * There is no support for PostScript at the moment. |
| 73 | + * The hardcopy types are available in Fortran. C-Bindings have not been tested with them |
| 74 | + |
| 75 | +### (Extension) Display/Color |
| 76 | +There is some support for transparency. |
| 77 | +* PSALCH(REAL VALUE): set ALPHA channel to Value. Value is between 0(fully transparent) and 1 (opaque). Added to the current structure. |
| 78 | +* pset_alpha_channel(float value): C-Binding for PSALCH. Added to the current structure. |
| 79 | + |
| 80 | +### Input devices |
| 81 | +Openphigs behaviour on echo modes is summarized below. |
| 82 | + |
| 83 | +#### String echo modes |
| 84 | +* echo mode 1 |
| 85 | + * opens a new window |
| 86 | + * echo area given in NC coordinates for the root window |
| 87 | +* echo mode -1 |
| 88 | + * echo area given in % relative to the main window |
| 89 | + |
| 90 | +#### Valuator echo modes |
| 91 | +* echo mode 1: |
| 92 | + * uses default strings for label, format low label and high label |
| 93 | + * opens a new window |
| 94 | + * echo area given in NC coordinates for the root window |
| 95 | +* echo mode -1: As mode 1 but expects additional parameters as string, namely |
| 96 | + * label |
| 97 | + * format |
| 98 | + * low label |
| 99 | + * high label |
| 100 | + These should be encoded |
| 101 | +Extensions: |
| 102 | +* echo mode 2: |
| 103 | + * as echo mode 1 but places the window on top of the main window |
| 104 | + * echo area given as a fraction of the main window |
| 105 | +* echo mode -2: |
| 106 | + * as echo mode -1 but places the window on top of the main window |
| 107 | + * echo area given as a fraction of the main window |
| 108 | +* echo mode 3, -3: |
| 109 | + * as echo mode 2 but places the window on top of the main window |
| 110 | + * echo area given as a fraction of the main window |
| 111 | + * boxes the valuators up in one Window. |
| 112 | + (!) PPREC expects one integer for this echo mode which is the number of valuators to be boxed up |
| 113 | + |
| 114 | +#### Choice echo modes |
| 115 | +* echo mode 1: |
| 116 | + * opens a new window |
| 117 | + * echo area given in NC coordinates for the root window |
| 118 | +* echo mode -1: |
| 119 | + * displays window on top of the root window |
| 120 | + * echo area is given as a fraction of the root window |
| 121 | +* echo mode 3: |
| 122 | + * opens a new window |
| 123 | + * echo area given in NC coordinates for the root window |
| 124 | + * expects titels as strings |
| 125 | +* echo mode -3: |
| 126 | + * as 3 but |
| 127 | + * echo area is given as a fraction of the root window |
| 128 | +* echo mode 4: |
| 129 | + * as 3 but expects one more string |
| 130 | + * last string will be used as title |
| 131 | +* echo mode -4: |
| 132 | + * as 4 but |
| 133 | + * echo area is given as a fraction of the root window |
| 134 | + |
| 135 | +## Contributors |
| 136 | +* Alexander von Knorring |
| 137 | +* Ulrich Schwickerath |
| 138 | +* Matthias Schroeder |
0 commit comments