Permalink
Browse files

Release 2.6.12

  • Loading branch information...
1 parent 5296345 commit 925b1c8cb33bb7b765ca257948d1e631f524bb2f @heynemann heynemann committed Mar 5, 2012
Showing with 5 additions and 5 deletions.
  1. +1 −1 thumbor/__init__.py
  2. +4 −4 thumbor/ext/filters/_round_corner.c
View
@@ -10,4 +10,4 @@
'''This is the main module in thumbor'''
-__version__ = "2.6.11"
+__version__ = "2.6.12"
@@ -45,7 +45,7 @@ _round_corner_apply(PyObject *self, PyObject *args)
int y = 0;
for (y = 0; y <= b_rad; y += 1) {
- x = -(a_rad * sqrt((b_rad * b_rad) - (y * y))) / b_rad;
+ x = (float)(-(a_rad * sqrt((b_rad * b_rad) - (y * y))) / b_rad);
int curr_x = 0,
y_top = b_rad - y,
@@ -88,7 +88,7 @@ _round_corner_apply(PyObject *self, PyObject *args)
int pixel_count_x = 0;
for (; aa_x >= (-a_rad); --aa_x) {
- int aa_y = ((b_rad * sqrt(a_rad * a_rad - aa_x * aa_x)) / a_rad) + 1;
+ int aa_y = (float)(((b_rad * sqrt(a_rad * a_rad - aa_x * aa_x)) / a_rad) + 1.f);
if (aa_y != y) {
break;
@@ -136,12 +136,12 @@ _round_corner_apply(PyObject *self, PyObject *args)
}
for (x = 0.f; x >= -a_rad; x -= 1.f) {
- float y = (b_rad * sqrt((a_rad * a_rad) - (x * x))) / a_rad;
+ float y = (float)((b_rad * sqrt((a_rad * a_rad) - (x * x))) / a_rad);
int pixel_count_y = 0;
int aa_y = y + 1;
for (; aa_y < b_rad; ++aa_y) {
- int aa_x = -((a_rad * sqrt((b_rad * b_rad) - (aa_y * aa_y))) / b_rad) - 1;
+ int aa_x = (float)(-((a_rad * sqrt((b_rad * b_rad) - (aa_y * aa_y))) / b_rad) - 1.f);
if (aa_x != (int)x) {
break;
}

0 comments on commit 925b1c8

Please sign in to comment.