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