~ubuntu-branches/ubuntu/lucid/graphviz/lucid-updates

« back to all changes in this revision

Viewing changes to lib/utilities/glTexFontColor.c

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2008-06-19 20:23:23 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080619202323-ls23h96ntj9ny94m
Tags: 2.18-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Build depend on liblualib50-dev instead of liblua5.1-0-dev.
  - Drop libttf-dev (libttf-dev is in universe) (LP: #174749).
  - Replace gs-common with ghostscript.
  - Build-depend on python-dev instead of python2.4-dev or python2.5-dev.
  - Mention the correct python version for the python bindings in the
    package description.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (c) 1999 Nate Miller
 
3
    
 
4
    Notice: Usage of any code in this file is subject to the rules
 
5
    described in the LICENSE.TXT file included in this directory.
 
6
    Reading, compiling, or otherwise using this code constitutes
 
7
    automatic acceptance of the rules in said text file.
 
8
 
 
9
    File        -- glTexFontColor.c
 
10
    Date        -- 6/10/99
 
11
    Author      -- Nate 'm|d' Miller
 
12
    Contact     -- vandals1@home.com
 
13
    Web         -- http://members.home.com/vandals1
 
14
*/
 
15
#include "glTexFont.h"
 
16
 
 
17
/* color functions must be defined in texFont.h */
 
18
 
 
19
extern texFont_t font;
 
20
 
 
21
/*
 
22
=============
 
23
fontColor, fontColorA, fontColorp, fontColorAp
 
24
   
 
25
Sets the currect color for the text. 
 
26
=============
 
27
*/
 
28
void fontColor (float r, float g, float b)
 
29
{
 
30
    font.fgColor[0] = r;
 
31
    font.fgColor[1] = g;
 
32
    font.fgColor[2] = b;
 
33
    font.fgColor[3] = 1.0;
 
34
}
 
35
void fontColorA (float r, float g, float b, float a)
 
36
{
 
37
    font.fgColor[0] = r;
 
38
    font.fgColor[1] = g;
 
39
    font.fgColor[2] = b;
 
40
    font.fgColor[3] = a;
 
41
}
 
42
void fontColorp (float *clr)
 
43
{
 
44
    font.fgColor[0] = clr[0];
 
45
    font.fgColor[1] = clr[1];
 
46
    font.fgColor[2] = clr[2];
 
47
    font.fgColor[3] = 1.0;
 
48
}
 
49
void fontColorAp (float *clr)
 
50
{
 
51
    font.fgColor[0] = clr[0];
 
52
    font.fgColor[1] = clr[1];
 
53
    font.fgColor[2] = clr[2];
 
54
    font.fgColor[3] = clr[3];
 
55
}
 
56
/*
 
57
=============
 
58
fontShadow, fontShadowA, fontShadowp, fontShadowAp
 
59
   
 
60
Sets the currect shadow color for the text. 
 
61
=============
 
62
*/
 
63
void fontShadowColor (float r, float g, float b)
 
64
{
 
65
    font.bgColor[0] = r;
 
66
    font.bgColor[1] = g;
 
67
    font.bgColor[2] = b;
 
68
    font.bgColor[3] = 1.0;
 
69
}
 
70
void fontShadowColorA (float r, float g, float b, float a)
 
71
{
 
72
    font.bgColor[0] = r;
 
73
    font.bgColor[1] = g;
 
74
    font.bgColor[2] = b;
 
75
    font.bgColor[3] = a;
 
76
}
 
77
void fontShadowColorp (float *clr)
 
78
{
 
79
    font.bgColor[0] = clr[0];
 
80
    font.bgColor[1] = clr[1];
 
81
    font.bgColor[2] = clr[2];
 
82
    font.bgColor[3] = 1.0;
 
83
}
 
84
void fontShadowColorAp (float *clr)
 
85
{
 
86
    font.bgColor[0] = clr[0];
 
87
    font.bgColor[1] = clr[1];
 
88
    font.bgColor[2] = clr[2];
 
89
    font.bgColor[3] = clr[3];
 
90
}
 
91
/*
 
92
=============
 
93
fontGradientColor, fontGradientColorA, fontGradientColorp, fontGradientColorAp
 
94
   
 
95
Sets the currect gradient color for the text. 
 
96
=============
 
97
*/
 
98
void fontGradientColor (float r, float g, float b)
 
99
{
 
100
    font.gdColor[0] = r;
 
101
    font.gdColor[1] = g;
 
102
    font.gdColor[2] = b;
 
103
    font.gdColor[3] = 1.0;
 
104
}
 
105
void fontGradientColorA (float r, float g, float b, float a)
 
106
{
 
107
    font.gdColor[0] = r;
 
108
    font.gdColor[1] = g;
 
109
    font.gdColor[2] = b;
 
110
    font.gdColor[3] = a;
 
111
}
 
112
void fontGradientColorp (float *clr)
 
113
{
 
114
    font.gdColor[0] = clr[0];
 
115
    font.gdColor[1] = clr[1];
 
116
    font.gdColor[2] = clr[2];
 
117
    font.gdColor[3] = 1.0;
 
118
}
 
119
void fontGradientColorAp (float *clr)
 
120
{
 
121
    font.gdColor[0] = clr[0];
 
122
    font.gdColor[1] = clr[1];
 
123
    font.gdColor[2] = clr[2];
 
124
    font.gdColor[3] = clr[3];
 
125
}