Пример #1
0
static void
create_image_blend_functor(
		  const surface& dst
		, const std::string root
		, const Uint8 amount
		, const Uint32 color)
{
	const std::string filename = blend_get_filename(root, amount, color);

	save_image(dst, filename);
}
Пример #2
0
static void
test_blend(const surface& dst, const Uint8 amount, const Uint32 color)
{
    std::stringstream sstr;
    sstr << std::hex << std::setfill('0')
         << "Blend image amount »"
         << std::setw(2) << static_cast<Uint32>(amount)
         << "« color »"
         << std::setw(8) << color
         << "« : ";

    const std::string filename =
        blend_get_filename("data/test/test/image/blend/", amount, color);

    BOOST_REQUIRE_EQUAL(image::exists(filename), true);

    const surface& src = image::get_image(filename);
    compare_image(src, dst, sstr.str());
}