|
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 |
|
|
Shinya Kitaoka |
120a6e |
namespace igs {
|
|
Shinya Kitaoka |
120a6e |
namespace rotate_blur {
|
|
Toshihiro Shimizu |
890ddd |
IGS_ROTATE_BLUR_EXPORT void convert(
|
|
Shinya Kitaoka |
120a6e |
const unsigned char *in, 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, const int ref_mode // R,G,B,A,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 cx, const double cy,
|
|
Shinya Kitaoka |
120a6e |
const double degree = 30.0 /* ぼかしの回転角度 */
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const double blur_radius = 0.0 /* ぼかしの始まる半径 */
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const double spin_radius = 0.0 /* ゼロ以上でspin指定となり、
|
|
Shinya Kitaoka |
120a6e |
かつぼかし強弱の一定になる半径となる */
|
|
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_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(
|
|
Shinya Kitaoka |
120a6e |
const int height /* 求める画像(out)の高さ */
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const int width /* 求める画像(out)の幅 */
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const double xc, const double yc, const double degree /* ぼかしの回転角度 */
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const double blur_radius /* ぼかしの始まる半径 */
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const double spin_radius /* ゼロ以上でspin指定となり、
|
|
Shinya Kitaoka |
120a6e |
かつぼかし強弱の一定になる半径となる */
|
|
Shinya Kitaoka |
120a6e |
,
|
|
Shinya Kitaoka |
120a6e |
const int sub_div /* 1ならJaggy、2以上はAntialias */
|
|
Shinya Kitaoka |
120a6e |
);
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif /* !igs_rotate_blur_h */
|