Google
Web alhem.net
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

BlackAdder.cpp File Reference

#include <string>
#include <vector>
#include <map>
#include "dp.h"
#include "BlackAdder.h"

Include dependency graph for BlackAdder.cpp:

Include dependency graph

Go to the source code of this file.

Classes

struct  ADD

Defines

#define DEB(x)

Functions

std::string darken (const std::string &color)
std::string merge_colors (const std::string &c1, const std::string &c2)

Variables

const char * colors [] = { "#ffffcc", "#ffccff", "#ccffff", "#ffcccc", "#ccffcc", "#ccccff", "#99ccff", "#cc99ff", "#99ffcc", "#ccff99" }
int colorcount = 0
int maxcolor = 10


Define Documentation

#define DEB  ) 
 

File ......... BlackAdder.cpp Published .... 2004-05-17 Author ....... grymse@alhem.net

Definition at line 31 of file BlackAdder.cpp.


Function Documentation

std::string darken const std::string &  color  ) 
 

Definition at line 427 of file BlackAdder.cpp.

Referenced by BlackAdder::has_subclass(), and BlackAdder::MakeDot().

00428 {
00429         std::string r = "#";
00430         for (int i = 1; i < 7; i++)
00431         {
00432                 r += color[i];
00433                 if (color[i] > '0' && color[i] < 'f')
00434                 {
00435                         if (color[i] == 'a')
00436                                 r[i] = '8';
00437                         else
00438                         if (color[i] == 'b')
00439                                 r[i] = '9';
00440                         else
00441                                 r[i] -= 2;
00442                 }
00443         }
00444         return r;
00445 }

std::string merge_colors const std::string &  c1,
const std::string &  c2
 

Definition at line 448 of file BlackAdder.cpp.

Referenced by BlackAdder::has_subclass(), and BlackAdder::MakeDot().

00449 {
00450         std::string r;
00451         for (int i = 0; i < 7; i++)
00452                 r += c1[i] < c2[i] ? c1[i] : c2[i];
00453         return r;
00454 }


Variable Documentation

int colorcount = 0 [static]
 

Definition at line 41 of file BlackAdder.cpp.

Referenced by BlackAdder::MakeDot().

const char* colors[] = { "#ffffcc", "#ffccff", "#ccffff", "#ffcccc", "#ccffcc", "#ccccff", "#99ccff", "#cc99ff", "#99ffcc", "#ccff99" } [static]
 

Definition at line 40 of file BlackAdder.cpp.

Referenced by BlackAdder::MakeDot().

int maxcolor = 10 [static]
 

Definition at line 42 of file BlackAdder.cpp.

Referenced by BlackAdder::MakeDot().


Generated for My SDL C++ Gui by doxygen 1.3.6