Changeset 209:765619b7cbb2 in lemon for lemon/color.h
- Timestamp:
- 07/13/08 20:51:02 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/color.h
r206 r209 1 /* -*- C++-*-2 * 3 * This file is a part of LEMON, a generic C++ optimization library 1 /* -*- mode: C++; indent-tabs-mode: nil; -*- 2 * 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 5 * Copyright (C) 2003-2008 … … 63 63 64 64 /// White color constant 65 extern const Color WHITE; 65 extern const Color WHITE; 66 66 /// Black color constant 67 67 extern const Color BLACK; … … 131 131 colors.push_back(Color(1,0,1)); 132 132 colors.push_back(Color(0,1,1)); 133 133 134 134 colors.push_back(Color(.5,0,0)); 135 135 colors.push_back(Color(0,.5,0)); … … 138 138 colors.push_back(Color(.5,0,.5)); 139 139 colors.push_back(Color(0,.5,.5)); 140 140 141 141 colors.push_back(Color(.5,.5,.5)); 142 142 colors.push_back(Color(1,.5,.5)); … … 146 146 colors.push_back(Color(1,.5,1)); 147 147 colors.push_back(Color(.5,1,1)); 148 148 149 149 colors.push_back(Color(1,.5,0)); 150 150 colors.push_back(Color(.5,1,0)); … … 172 172 } 173 173 ///Adds a new color to the end of the color list. 174 void add(const Color &c) 174 void add(const Color &c) 175 175 { 176 176 colors.push_back(c); … … 187 187 ///Returns a \ref Color which is as different from the given parameter 188 188 ///as it is possible. 189 inline Color distantColor(const Color &c) 189 inline Color distantColor(const Color &c) 190 190 { 191 191 return Color(c.red()<.5?1:0,c.green()<.5?1:0,c.blue()<.5?1:0);
Note: See TracChangeset
for help on using the changeset viewer.