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
shun-iwasawa a6544b
#include "tgeometry.h"
shun-iwasawa a6544b
Shinya Kitaoka 120a6e
namespace igs {
Shinya Kitaoka 120a6e
namespace radial_blur {
Toshihiro Shimizu 890ddd
IGS_RADIAL_BLUR_EXPORT void convert(
shun-iwasawa a6544b
    const float* in, float* out, const int margin, /* 参照画像(in)がもつ余白 */
shun-iwasawa a6544b
    const TDimension out_dim,             /* 求める画像(out)の大きさ*/
shun-iwasawa a6544b
    const int channels, const float* ref, /* outと同じ高さ、幅 */
shun-iwasawa a6544b
    const TPointD center, const double twist_radian = 0.0,
Shinya Kitaoka 120a6e
    const double twist_radius = 0.0,
shun-iwasawa a6544b
    const double intensity    = 0.2, /* 強度。ゼロより大きく2以下 */
shun-iwasawa a6544b
    /* radius円境界での平均値ぼかしゼロとするためintensityは2より小さい */
shun-iwasawa a6544b
    const double radius = 0.0, /* 平均値ぼかしの始まる半径 */
shun-iwasawa a6544b
    const int type = 0, const bool antialias_sw = true,
shun-iwasawa a6544b
    const bool alpha_rendering_sw     = true,
shun-iwasawa a6544b
    const double ellipse_aspect_ratio = 1.0, const double ellipse_angle = 0.0,
shun-iwasawa a6544b
    const double intensity_correlation_with_ellipse = 0.0);
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時正確でない... */
shun-iwasawa a6544b
                 const int height, const int width, const TPointD center,
shun-iwasawa a6544b
                 const double twist_radian, const double twist_radius,
shun-iwasawa a6544b
                 const double intensity = 0.2, /* 強度。ゼロより大きく2以下 */
Shinya Kitaoka 120a6e
                 /* radius円境界での平均値ぼかしゼロとするためintensityは2以下
shun-iwasawa a6544b
                  */
shun-iwasawa a6544b
                 const double radius = 0.0, /* 平均値ぼかしの始まる半径 */
shun-iwasawa a6544b
                 const int type = 0, const double ellipse_aspect_ratio = 1.0,
shun-iwasawa a6544b
                 const double ellipse_angle                      = 0.0,
shun-iwasawa a6544b
                 const double intensity_correlation_with_ellipse = 0.0);
shun-iwasawa a6544b
}  // namespace radial_blur
shun-iwasawa a6544b
}  // namespace igs
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif /* !igs_radial_blur_h */