aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Texture.cc
diff options
context:
space:
mode:
authorrathnor <rathnor>2002-12-01 13:42:15 (GMT)
committerrathnor <rathnor>2002-12-01 13:42:15 (GMT)
commit28b5c604490094e187494dcc566bd3d7a05a2c25 (patch)
tree8f78f5714a5cd055c10b067a2656fe7b2338e71a /src/FbTk/Texture.cc
parentb9134162f9633784d9097df18769a699a62650fe (diff)
downloadfluxbox-28b5c604490094e187494dcc566bd3d7a05a2c25.zip
fluxbox-28b5c604490094e187494dcc566bd3d7a05a2c25.tar.bz2
Indenting from tabs to emacs 4-space
Diffstat (limited to 'src/FbTk/Texture.cc')
-rw-r--r--src/FbTk/Texture.cc108
1 files changed, 54 insertions, 54 deletions
diff --git a/src/FbTk/Texture.cc b/src/FbTk/Texture.cc
index 574a5b3..ae4710d 100644
--- a/src/FbTk/Texture.cc
+++ b/src/FbTk/Texture.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Texture.cc,v 1.4 2002/11/30 20:35:06 fluxgen Exp $ 25// $Id: Texture.cc,v 1.5 2002/12/01 13:42:14 rathnor Exp $
26 26
27#include "Texture.hh" 27#include "Texture.hh"
28 28
@@ -32,66 +32,66 @@
32namespace FbTk { 32namespace FbTk {
33 33
34void Texture::setFromString(const char * const texture_str) { 34void Texture::setFromString(const char * const texture_str) {
35 if (texture_str == 0) 35 if (texture_str == 0)
36 return; 36 return;
37 int t_len = strlen(texture_str) + 1; 37 int t_len = strlen(texture_str) + 1;
38 char *ts = new char[t_len]; 38 char *ts = new char[t_len];
39 strcpy(ts, texture_str); 39 strcpy(ts, texture_str);
40 40
41 // to lower 41 // to lower
42 for (size_t byte_pos = 0; byte_pos < strlen(ts); ++byte_pos) 42 for (size_t byte_pos = 0; byte_pos < strlen(ts); ++byte_pos)
43 ts[byte_pos] = tolower(ts[byte_pos]); 43 ts[byte_pos] = tolower(ts[byte_pos]);
44 44
45 if (strstr(ts, "parentrelative")) { 45 if (strstr(ts, "parentrelative")) {
46 setType(Texture::PARENTRELATIVE); 46 setType(Texture::PARENTRELATIVE);
47 } else { 47 } else {
48 setType(Texture::NONE); 48 setType(Texture::NONE);
49 49
50 if (strstr(ts, "solid")) 50 if (strstr(ts, "solid"))
51 addType(Texture::SOLID); 51 addType(Texture::SOLID);
52 else if (strstr(ts, "gradient")) { 52 else if (strstr(ts, "gradient")) {
53 addType(Texture::GRADIENT); 53 addType(Texture::GRADIENT);
54 if (strstr(ts, "crossdiagonal")) 54 if (strstr(ts, "crossdiagonal"))
55 addType(Texture::CROSSDIAGONAL); 55 addType(Texture::CROSSDIAGONAL);
56 else if (strstr(ts, "rectangle")) 56 else if (strstr(ts, "rectangle"))
57 addType(Texture::RECTANGLE); 57 addType(Texture::RECTANGLE);
58 else if (strstr(ts, "pyramid")) 58 else if (strstr(ts, "pyramid"))
59 addType(Texture::PYRAMID); 59 addType(Texture::PYRAMID);
60 else if (strstr(ts, "pipecross")) 60 else if (strstr(ts, "pipecross"))
61 addType(Texture::PIPECROSS); 61 addType(Texture::PIPECROSS);
62 else if (strstr(ts, "elliptic")) 62 else if (strstr(ts, "elliptic"))
63 addType(Texture::ELLIPTIC); 63 addType(Texture::ELLIPTIC);
64 else if (strstr(ts, "diagonal")) 64 else if (strstr(ts, "diagonal"))
65 addType(Texture::DIAGONAL); 65 addType(Texture::DIAGONAL);
66 else if (strstr(ts, "horizontal")) 66 else if (strstr(ts, "horizontal"))
67 addType(Texture::HORIZONTAL); 67 addType(Texture::HORIZONTAL);
68 else if (strstr(ts, "vertical")) 68 else if (strstr(ts, "vertical"))
69 addType(Texture::VERTICAL); 69 addType(Texture::VERTICAL);
70 else 70 else
71 addType(Texture::DIAGONAL); 71 addType(Texture::DIAGONAL);
72 } else 72 } else
73 addType(Texture::SOLID); 73 addType(Texture::SOLID);
74 74
75 if (strstr(ts, "raised")) 75 if (strstr(ts, "raised"))
76 addType(Texture::RAISED); 76 addType(Texture::RAISED);
77 else if (strstr(ts, "sunken")) 77 else if (strstr(ts, "sunken"))
78 addType(Texture::SUNKEN); 78 addType(Texture::SUNKEN);
79 else if (strstr(ts, "flat")) 79 else if (strstr(ts, "flat"))
80 addType(Texture::FLAT); 80 addType(Texture::FLAT);
81 else 81 else
82 addType(Texture::RAISED); 82 addType(Texture::RAISED);
83 83
84 if (! (type() & Texture::FLAT)) 84 if (! (type() & Texture::FLAT))
85 if (strstr(ts, "bevel2")) 85 if (strstr(ts, "bevel2"))
86 addType(Texture::BEVEL2); 86 addType(Texture::BEVEL2);
87 else 87 else
88 addType(Texture::BEVEL1); 88 addType(Texture::BEVEL1);
89 89
90 if (strstr(ts, "interlaced")) 90 if (strstr(ts, "interlaced"))
91 addType(Texture::INTERLACED); 91 addType(Texture::INTERLACED);
92 } 92 }
93 93
94 delete [] ts; 94 delete [] ts;
95} 95}
96 96
97}; // end namespace FbTk 97}; // end namespace FbTk