-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault_attr.c
More file actions
executable file
·63 lines (57 loc) · 2.44 KB
/
default_attr.c
File metadata and controls
executable file
·63 lines (57 loc) · 2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/****************************************************************************
* default_attr.c
* Author Joel Welling
* Copyright 1990, Pittsburgh Supercomputing Center, Carnegie Mellon University
*
* Permission use, copy, and modify this software and its documentation
* without fee for personal use or use within your organization is hereby
* granted, provided that the above copyright notice is preserved in all
* copies and that that copyright and this permission notice appear in
* supporting documentation. Permission to redistribute this software to
* other organizations or individuals is not granted; that must be
* negotiated with the PSC. Neither the PSC nor Carnegie Mellon
* University make any representations about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*****************************************************************************/
/*
This module generates the default attribute list for DrawP3D.
*/
#include <stdio.h>
#include "p3dgen.h"
#include "pgen_objects.h"
#include "ge_error.h"
P_Attrib_List *po_gen_default_attr( VOIDLIST )
/* Generate and return the default attribute list for DrawP3D */
{
static P_Color white= { P3D_RGB, 1.0, 1.0, 1.0, 1.0 };
int false= 0;
int true= 1;
float point_diameter= 0.01;
float line_diameter= 0.01;
float text_height= 1.0;
float text_stroke_width_frac= 0.15;
float text_stroke_thick_frac= 0.1;
P_Attrib_List *result= (P_Attrib_List *)0;
ger_debug("default_attr: po_gen_default_attr");
result= add_attr( result, "material", P3D_MATERIAL,
(P_Void_ptr)p3d_default_material );
result= add_attr( result, "color", P3D_COLOR,
(P_Void_ptr)&white );
result= add_attr( result, "backcull", P3D_BOOLEAN,
(P_Void_ptr)&false );
result= add_attr( result, "point-diameter", P3D_FLOAT,
(P_Void_ptr)&point_diameter );
result= add_attr( result, "line-diameter", P3D_FLOAT,
(P_Void_ptr)&line_diameter );
result= add_attr( result, "text-height", P3D_FLOAT,
(P_Void_ptr)&text_height );
result= add_attr( result, "text-font", P3D_STRING,
(P_Void_ptr)"simplex_roman" );
result= add_attr( result, "text-stroke-width-fraction", P3D_FLOAT,
(P_Void_ptr)&text_stroke_width_frac );
result= add_attr( result, "text-stroke-thickness-fraction", P3D_FLOAT,
(P_Void_ptr)&text_stroke_thick_frac );
result= add_attr( result, "shadows", P3D_BOOLEAN, (P_Void_ptr)&true );
return(result);
}