Toshihiro Shimizu 890ddd
#ifndef igs_radial_blur_h
Toshihiro Shimizu 890ddd
#define igs_radial_blur_h
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef IGS_RADIAL_BLUR_EXPORT
Toshihiro Shimizu 890ddd
#define IGS_RADIAL_BLUR_EXPORT
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
namespace igs
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
namespace radial_blur
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
IGS_RADIAL_BLUR_EXPORT void convert(
Toshihiro Shimizu 890ddd
	const unsigned char *in /* 余白付き */
Toshihiro Shimizu 890ddd
	,
Toshihiro Shimizu 890ddd
	const int margin /* 参照画像(in)がもつ余白 */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	,
Toshihiro Shimizu 890ddd
	const unsigned char *ref /* outと同じ高さ、幅、チャンネル数 */
Toshihiro Shimizu 890ddd
	,
Toshihiro Shimizu 890ddd
	const int ref_bits, const int ref_mode // R,G,B,A,luminance or R,G,B,luminance
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	,
Toshihiro Shimizu 890ddd
	unsigned char *out /* 余白なし */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	,
Toshihiro Shimizu 890ddd
	const int height /* 求める画像(out)の高さ */
Toshihiro Shimizu 890ddd
	,
Toshihiro Shimizu 890ddd
	const int width /* 求める画像(out)の幅 */
Toshihiro Shimizu 890ddd
	,
Toshihiro Shimizu 890ddd
	const int channels, const int bits
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	,
Toshihiro Shimizu 890ddd
	const double xc, const double yc, const double twist_radian = 0.0, const double twist_radius = 0.0, const double intensity = 0.2 /* 強度。ゼロより大きく2以下 */
Toshihiro Shimizu 890ddd
	,
Toshihiro Shimizu 890ddd
	const double radius = 0.0 /* ぼかしの始まる半径 */
Toshihiro Shimizu 890ddd
	,
Toshihiro Shimizu 890ddd
	const int sub_div = 4 /* 1ならJaggy、2以上はAntialias */
Toshihiro Shimizu 890ddd
	,
Toshihiro Shimizu 890ddd
	const bool alpha_rendering_sw = true);
Toshihiro Shimizu 890ddd
#if 0																																																//-------------------- comment out start ------------------------
Toshihiro Shimizu 890ddd
  IGS_RADIAL_BLUR_EXPORT int enlarge_margin( /* Twist時正確でない... */
Toshihiro Shimizu 890ddd
	 const int height
Toshihiro Shimizu 890ddd
	,const int width
Toshihiro Shimizu 890ddd
	,const double xc
Toshihiro Shimizu 890ddd
	,const double yc
Toshihiro Shimizu 890ddd
	,const double twist_radian
Toshihiro Shimizu 890ddd
	,const double twist_radius
Toshihiro Shimizu 890ddd
	,const double intensity=0.2/* 強度。ゼロより大きく2以下 */
Toshihiro Shimizu 890ddd
	/* radius円境界での平均値ぼかしゼロとするためintensityは2以下 */
Toshihiro Shimizu 890ddd
	,const double radius=0.0	/* 平均値ぼかしの始まる半径 */
Toshihiro Shimizu 890ddd
	,const int sub_div=4	/* 1ならJaggy、2以上はAntialias */
Toshihiro Shimizu 890ddd
  );
Toshihiro Shimizu 890ddd
#endif																																																//-------------------- comment out end -------------------------
Toshihiro Shimizu 890ddd
IGS_RADIAL_BLUR_EXPORT int reference_margin(																																						/* Twist時正確でない... */
Toshihiro Shimizu 890ddd
											const int height, const int width, const double xc, const double yc, const double twist_radian, const double twist_radius, const double intensity = 0.2 /* 強度。ゼロより大きく2以下 */
Toshihiro Shimizu 890ddd
											/* radius円境界での平均値ぼかしゼロとするためintensityは2以下 */
Toshihiro Shimizu 890ddd
											,
Toshihiro Shimizu 890ddd
											const double radius = 0.0 /* 平均値ぼかしの始まる半径 */
Toshihiro Shimizu 890ddd
											,
Toshihiro Shimizu 890ddd
											const int sub_div = 4 /* 1ならJaggy、2以上はAntialias */
Toshihiro Shimizu 890ddd
											);
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif /* !igs_radial_blur_h */