|
Shinya Kitaoka |
810553 |
#pragma once
|
|
Shinya Kitaoka |
810553 |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef igs_rotate_blur_h
|
|
Toshihiro Shimizu |
890ddd |
#define igs_rotate_blur_h
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef IGS_ROTATE_BLUR_EXPORT
|
|
Toshihiro Shimizu |
890ddd |
#define IGS_ROTATE_BLUR_EXPORT
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
shun-iwasawa |
0e1837 |
#include "tgeometry.h"
|
|
shun-iwasawa |
0e1837 |
|
|
Shinya Kitaoka |
120a6e |
namespace igs {
|
|
Shinya Kitaoka |
120a6e |
namespace rotate_blur {
|
|
Toshihiro Shimizu |
890ddd |
IGS_ROTATE_BLUR_EXPORT void convert(
|
|
shun-iwasawa |
0e1837 |
const float* in, float* out, const int margin,
|
|
shun-iwasawa |
0e1837 |
const TDimension out_dim, /* 求める画像(out)のサイズ */
|
|
shun-iwasawa |
0e1837 |
const int channels, const float* ref, /* outと同じ高さ、幅 */
|
|
shun-iwasawa |
0e1837 |
const TPointD center, const double degree = 30.0, /* ぼかしの回転角度 */
|
|
shun-iwasawa |
0e1837 |
const double blur_radius = 0.0, /* ぼかしの始まる半径 */
|
|
shun-iwasawa |
0e1837 |
const double spin_radius = 0.0, /* ゼロ以上でspin指定となり、
|
|
Shinya Kitaoka |
120a6e |
かつぼかし強弱の一定になる半径となる */
|
|
shun-iwasawa |
0e1837 |
const int type = 0, // 0: Accelerator, 1: Uniform Angle, 2: Uniform Length
|
|
shun-iwasawa |
0e1837 |
const bool antialias_sw =
|
|
shun-iwasawa |
0e1837 |
true, /* when true, sampled pixel will be bilinear-interpolated */
|
|
shun-iwasawa |
0e1837 |
const bool alpha_rendering_sw = true,
|
|
shun-iwasawa |
0e1837 |
const double ellipse_aspect_ratio = 1.0, const double ellipse_angle = 0.0);
|
|
Shinya Kitaoka |
120a6e |
#if 0 //------------------- comment out start ------------------------
|
|
Toshihiro Shimizu |
890ddd |
IGS_ROTATE_BLUR_EXPORT int enlarge_margin(
|
|
Toshihiro Shimizu |
890ddd |
const int height /* 求める画像(out)の高さ */
|
|
Toshihiro Shimizu |
890ddd |
,const int width /* 求める画像(out)の幅 */
|
|
Toshihiro Shimizu |
890ddd |
,const double xc
|
|
Toshihiro Shimizu |
890ddd |
,const double yc
|
|
Toshihiro Shimizu |
890ddd |
,const double degree /* ぼかしの回転角度 */
|
|
Toshihiro Shimizu |
890ddd |
,const double blur_radius /* ぼかしの始まる半径 */
|
|
Toshihiro Shimizu |
890ddd |
,const double spin_radius /* ゼロ以上でspin指定となり、
|
|
Toshihiro Shimizu |
890ddd |
かつぼかし強弱の一定になる半径となる */
|
|
Toshihiro Shimizu |
890ddd |
,const int sub_div /* 1ならJaggy、2以上はAntialias */
|
|
Toshihiro Shimizu |
890ddd |
);
|
|
Shinya Kitaoka |
120a6e |
#endif //------------------- comment out end -------------------------
|
|
Toshihiro Shimizu |
890ddd |
IGS_ROTATE_BLUR_EXPORT int reference_margin(
|
|
shun-iwasawa |
0e1837 |
const int height, /* 求める画像(out)の高さ */
|
|
shun-iwasawa |
0e1837 |
const int width, /* 求める画像(out)の幅 */
|
|
shun-iwasawa |
0e1837 |
const TPointD center, const double degree, /* ぼかしの回転角度 */
|
|
shun-iwasawa |
0e1837 |
const double blur_radius, /* ぼかしの始まる半径 */
|
|
shun-iwasawa |
0e1837 |
const double spin_radius, /* ゼロ以上でspin指定となり、
|
|
Shinya Kitaoka |
120a6e |
かつぼかし強弱の一定になる半径となる */
|
|
shun-iwasawa |
0e1837 |
const int type // 0: Accelerator, 1: Uniform Angle, 2: Uniform Length
|
|
shun-iwasawa |
0e1837 |
);
|
|
shun-iwasawa |
0e1837 |
} // namespace rotate_blur
|
|
shun-iwasawa |
0e1837 |
} // namespace igs
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif /* !igs_rotate_blur_h */
|