2016-05-17 03:04:11 +12:00
|
|
|
#pragma once
|
|
|
|
|
2016-03-19 06:57:51 +13:00
|
|
|
#ifndef igs_rotate_blur_h
|
|
|
|
#define igs_rotate_blur_h
|
|
|
|
|
|
|
|
#ifndef IGS_ROTATE_BLUR_EXPORT
|
|
|
|
#define IGS_ROTATE_BLUR_EXPORT
|
|
|
|
#endif
|
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
namespace igs {
|
|
|
|
namespace rotate_blur {
|
2016-03-19 06:57:51 +13:00
|
|
|
IGS_ROTATE_BLUR_EXPORT void convert(
|
2016-06-15 18:43:10 +12:00
|
|
|
const unsigned char *in, const int margin /* 参照画像(in)がもつ余白 */
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
,
|
|
|
|
const unsigned char *ref /* outと同じ高さ、幅、チャンネル数 */
|
|
|
|
,
|
|
|
|
const int ref_bits, const int ref_mode // R,G,B,A,luminance
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
,
|
|
|
|
unsigned char *out
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
,
|
|
|
|
const int height /* 求める画像(out)の高さ */
|
|
|
|
,
|
|
|
|
const int width /* 求める画像(out)の幅 */
|
|
|
|
,
|
|
|
|
const int channels, const int bits
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
,
|
|
|
|
const double cx, const double cy,
|
|
|
|
const double degree = 30.0 /* ぼかしの回転角度 */
|
|
|
|
,
|
|
|
|
const double blur_radius = 0.0 /* ぼかしの始まる半径 */
|
|
|
|
,
|
|
|
|
const double spin_radius = 0.0 /* ゼロ以上でspin指定となり、
|
|
|
|
かつぼかし強弱の一定になる半径となる */
|
|
|
|
,
|
|
|
|
const int sub_div = 4 /* 1ならJaggy、2以上はAntialias */
|
|
|
|
,
|
|
|
|
const bool alpha_rendering_sw = true);
|
|
|
|
#if 0 //------------------- comment out start ------------------------
|
2016-03-19 06:57:51 +13:00
|
|
|
IGS_ROTATE_BLUR_EXPORT int enlarge_margin(
|
|
|
|
const int height /* 求める画像(out)の高さ */
|
|
|
|
,const int width /* 求める画像(out)の幅 */
|
|
|
|
,const double xc
|
|
|
|
,const double yc
|
|
|
|
,const double degree /* ぼかしの回転角度 */
|
|
|
|
,const double blur_radius /* ぼかしの始まる半径 */
|
|
|
|
,const double spin_radius /* ゼロ以上でspin指定となり、
|
|
|
|
かつぼかし強弱の一定になる半径となる */
|
|
|
|
,const int sub_div /* 1ならJaggy、2以上はAntialias */
|
|
|
|
);
|
2016-06-15 18:43:10 +12:00
|
|
|
#endif //------------------- comment out end -------------------------
|
2016-03-19 06:57:51 +13:00
|
|
|
IGS_ROTATE_BLUR_EXPORT int reference_margin(
|
2016-06-15 18:43:10 +12:00
|
|
|
const int height /* 求める画像(out)の高さ */
|
|
|
|
,
|
|
|
|
const int width /* 求める画像(out)の幅 */
|
|
|
|
,
|
|
|
|
const double xc, const double yc, const double degree /* ぼかしの回転角度 */
|
|
|
|
,
|
|
|
|
const double blur_radius /* ぼかしの始まる半径 */
|
|
|
|
,
|
|
|
|
const double spin_radius /* ゼロ以上でspin指定となり、
|
|
|
|
かつぼかし強弱の一定になる半径となる */
|
|
|
|
,
|
|
|
|
const int sub_div /* 1ならJaggy、2以上はAntialias */
|
|
|
|
);
|
2016-03-19 06:57:51 +13:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* !igs_rotate_blur_h */
|