|
From: Jim E. <jim...@al...> - 2001-08-07 14:47:30
|
Jaakko,
THANKS I=B4m glad to here someone out there is using the CVS version. =
I=B4ve applied your patch to
gl_to_ppm.c and cleaned up the work.c (the patch failed because i had a=
lready made another
change) By the way defining USE_SYSTEM_FONTS causes your contour labe=
ls to be plotted using a
font loaded from the system rather than the one generated within vis5d. =
This makes for a much
more readable contour label. In the lui5 interface there is
only one font defined for the 3D window and it uses that one. However th=
e gtk interface will
allow for the definition of different fonts for the various objects you m=
ight want to label...
Jim
Jaakko Hyv=E4tti wrote:
> Hi!
>
> In all versions of vis5d, the ifdefs in saving images into files are
> incorrect, file formats are fixed and do not depend on endianess. The
> patch below removes the ifdef.
>
> In the current vis5d CVS, without gnome, compilation failed on my Lin=
ux
> redhat 7.1, because USE_SYSTEM_FONTS was not set and there were some
> missing ifdefs around hslice.labels which does not exist unless
> USE_SYSTEM_FONTS is defined. The patch below fixes that.
>
> Could you apply these to the CVS?
>
> Jaakko
>
> --- src/gl_to_ppm.c 2001/07/12 14:27:23 1.3
> +++ src/gl_to_ppm.c 2001/08/07 12:31:41
> @@ -339,19 +339,11 @@
> /* tranfer data from dataR, dataG, dataB */
> /* to file */
> /*****************************************/
> -#ifndef WORDS_BIGENDIAN
> for (i=3D0; i<big_x * big_y; i++){
> - fputc(dataB[i], f);
> - fputc(dataG[i], f);
> - fputc(dataR[i], f);
> - }
> -#else
> - for (i=3D0; i<big_x * big_y; i++){
> fputc(dataR[i], f);
> fputc(dataG[i], f);
> fputc(dataB[i], f);
> }
> -#endif
> fputc(EOF, f);
> if (fclose(f)=3D=3DEOF){
> printf("Could not close output ppm file\n");
> --- src/work.c 2001/08/06 13:42:41 1.13
> +++ src/work.c 2001/08/07 12:31:41
> @@ -2037,9 +2037,11 @@
> base =3D low;
>
> /* call contouring routine */
> +#ifdef USE_SYSTEM_FONTS
> if(slice->labels)
> free(slice->labels);
> slice->labels =3D (char *) malloc(10*sizeof(char)*max_cont_vert=
s/2);
> +#endif
>
> contour_ok =3D
> contour( ctx, slicedata, dtx->Nr, dtx->Nc, interval, low, high, b=
ase,
> @@ -2310,9 +2312,11 @@
> else
> base =3D low;
> /* call contouring routine */
> +#ifdef USE_SYSTEM_FONTS
> if(ctx->VSliceTable[var][time].labels)
> free(ctx->VSliceTable[var][time].labels);
> ctx->VSliceTable[var][time].labels =3D (char *) malloc(10*sizeo=
f(char)*max_cont_verts/2);
> +#endif
> contour_ok =3D contour( ctx, slice, rows, cols, interval, lo=
w, high, base,
> vr1, vc1, max_cont_verts, &num1,
> vr2, vc2, max_cont_verts/2, &num2,
>
> --
> Foreca Ltd Jaakko.Hyvatti@for=
eca.com
> Pursimiehenkatu 29-31 B, FIN-00150 Helsinki, Finland http://www.for=
eca.com
|