2015-06-14 08:29:16 +08:00
|
|
|
// Aseprite Document Library
|
2016-03-23 05:40:47 +08:00
|
|
|
// Copyright (c) 2001-2016 David Capello
|
2015-06-14 08:29:16 +08:00
|
|
|
//
|
|
|
|
|
// This file is released under the terms of the MIT license.
|
|
|
|
|
// Read LICENSE.txt for more information.
|
|
|
|
|
|
|
|
|
|
#ifndef DOC_BLEND_FUNCS_H_INCLUDED
|
|
|
|
|
#define DOC_BLEND_FUNCS_H_INCLUDED
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "doc/blend_mode.h"
|
|
|
|
|
#include "doc/color.h"
|
|
|
|
|
|
|
|
|
|
namespace doc {
|
|
|
|
|
|
|
|
|
|
typedef color_t (*BlendFunc)(color_t backdrop, color_t src, int opacity);
|
|
|
|
|
|
|
|
|
|
color_t rgba_blender_normal(color_t backdrop, color_t src, int opacity);
|
2016-03-23 05:40:47 +08:00
|
|
|
color_t rgba_blender_normal(color_t backdrop, color_t src);
|
2015-06-14 08:29:16 +08:00
|
|
|
color_t rgba_blender_merge(color_t backdrop, color_t src, int opacity);
|
|
|
|
|
color_t rgba_blender_neg_bw(color_t backdrop, color_t src, int opacity);
|
|
|
|
|
|
|
|
|
|
color_t graya_blender_normal(color_t backdrop, color_t src, int opacity);
|
2016-03-23 05:40:47 +08:00
|
|
|
color_t graya_blender_normal(color_t backdrop, color_t src);
|
2015-06-14 08:29:16 +08:00
|
|
|
color_t graya_blender_merge(color_t backdrop, color_t src, int opacity);
|
|
|
|
|
color_t graya_blender_neg_bw(color_t backdrop, color_t src, int opacity);
|
|
|
|
|
|
|
|
|
|
BlendFunc get_rgba_blender(BlendMode blendmode);
|
|
|
|
|
BlendFunc get_graya_blender(BlendMode blendmode);
|
|
|
|
|
BlendFunc get_indexed_blender(BlendMode blendmode);
|
|
|
|
|
|
|
|
|
|
} // namespace doc
|
|
|
|
|
|
|
|
|
|
#endif
|