void GraphicsObjectData::PrintGraphicsObjectToTree(const GraphicsObject& go, std::ostream* tree) { if (go.mono()) *tree << "(mono) "; if (go.invert()) *tree << "(invert) "; if (go.light()) *tree << "(light=" << go.light() << ") "; if (go.tint() != RGBColour::Black()) *tree << "(tint=" << go.tint() << ") "; if (go.colour() != RGBAColour::Clear()) *tree << "(colour=" << go.colour() << ") "; if (go.compositeMode()) *tree << "(composite=" << go.compositeMode() << ") "; if (go.xOrigin()) *tree << "(xOrigin=" << go.xOrigin() << ") "; if (go.yOrigin()) *tree << "(yOrigin=" << go.yOrigin() << ") "; }
void ColourFilterObjectData::render(const GraphicsObject& go, const GraphicsObject* parent, std::ostream* tree) { if (go.mono() == 0) { RGBAColour colour = go.colour(); colour.setAlpha( static_cast<int>(colour.a_float() * go.computedAlpha())); graphics_system_.fillScreenArea(screen_rect_, colour); if (tree) objectInfo(*tree); } else { static bool printed = false; if (!printed) { printed = true; cerr << "We don't yet deal with objMono() and colour filters." << endl; } } }