9 #include <simgear/props/props.hxx>
11 ////////////////////////////////////////////////////////////////////////
13 ////////////////////////////////////////////////////////////////////////
16 FGColor::print() const {
17 std::cerr << "red=" << _red << ", green=" << _green
18 << ", blue=" << _blue << ", alpha=" << _alpha << std::endl;
22 FGColor::merge(const SGPropertyNode *node)
28 const SGPropertyNode * n;
29 if ((n = node->getNode("red")))
30 _red = n->getFloatValue(), dirty = true;
31 if ((n = node->getNode("green")))
32 _green = n->getFloatValue(), dirty = true;
33 if ((n = node->getNode("blue")))
34 _blue = n->getFloatValue(), dirty = true;
35 if ((n = node->getNode("alpha")))
36 _alpha = n->getFloatValue(), dirty = true;
41 FGColor::merge(const FGColor *color)
44 if (color && color->_red >= 0.0)
45 _red = color->_red, dirty = true;
46 if (color && color->_green >= 0.0)
47 _green = color->_green, dirty = true;
48 if (color && color->_blue >= 0.0)
49 _blue = color->_blue, dirty = true;
50 if (color && color->_alpha >= 0.0)
51 _alpha = color->_alpha, dirty = true;