Added color utilities; implemented more of Graph related classes

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@76 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-11-19 20:56:51 +00:00
parent a218251fd6
commit 1836cf4de9
6 changed files with 224 additions and 19 deletions
+1 -8
View File
@@ -7,6 +7,7 @@
// ----------------------------------------------------------------------------- : Includes
#include <gui/control/gallery_list.hpp>
#include <gfx/gfx.hpp>
// ----------------------------------------------------------------------------- : Events
@@ -111,14 +112,6 @@ void GalleryList::onKeyDown(wxKeyEvent& ev) {
}
}
// Linear interpolation between colors
// MOVE ME, declared in gfx.hpp
Color lerp(const Color& a, const Color& b, double t) {
return Color(a.Red() + (b.Red() - a.Red() ) * t,
a.Green() + (b.Green() - a.Green()) * t,
a.Blue() + (b.Blue() - a.Blue() ) * t);
}
wxSize GalleryList::DoGetBestSize() const {
wxSize ws = GetSize(), cs = GetClientSize();
const int w = item_size.GetWidth() + 2 * MARGIN;