as an excercise in forcing everyone to write code using the correct

datatypes... i have by default changed the coord datatypes to be ints instead
of doubles... not - READ your headers carefully - they are Evas_Coord types.
dont ASSUME them to be anything except a scalar of some sort your compiler
can handle and cast. (coudl be int, long, long long, short, double, float etc.)


SVN revision: 9924
This commit is contained in:
Carsten Haitzler 2004-04-27 08:31:27 +00:00
parent 140ea23e3f
commit d88541cedb
3 changed files with 4 additions and 2 deletions

View File

@ -38,7 +38,7 @@ typedef struct _Evas_Lock Evas_Lock; /**< An Evas Lock */
typedef struct _Evas_Smart Evas_Smart; /**< An Evas Smart Object handle */
typedef unsigned long long Evas_Modifier_Mask; /**< An Evas modifier mask type */
#if 1 /* able to change co-ordinate systems to remove all fp ops */
#if 0 /* able to change co-ordinate systems to remove all fp ops */
typedef double Evas_Coord; /**< A unit in canvas space. Normally a double, but may vary on platforms */
typedef double Evas_Font_Size; /**< Units to descript font sizes. Normally a double, but may vary on platforms */
typedef double Evas_Angle; /**< A unit to measure angles (in degrees). Normally a double, but may vary on platforms */

View File

@ -998,6 +998,7 @@ evas_object_image_figure_x_fill(Evas_Object *obj, Evas_Coord start, Evas_Coord s
w = ((size * obj->layer->evas->output.w) /
(Evas_Coord)obj->layer->evas->viewport.w);
if (size <= 0) size = 1;
if (start > 0)
{
while (start - size > 0) start -= size;
@ -1019,6 +1020,7 @@ evas_object_image_figure_y_fill(Evas_Object *obj, Evas_Coord start, Evas_Coord s
h = ((size * obj->layer->evas->output.h) /
(Evas_Coord)obj->layer->evas->viewport.h);
if (size <= 0) size = 1;
if (start > 0)
{
while (start - size > 0) start -= size;

View File

@ -59,7 +59,7 @@ typedef struct _Evas_Intercept_Func_Int Evas_Intercept_Func_Int;
typedef struct _Evas_Key_Grab Evas_Key_Grab;
typedef struct _Evas_Callbacks Evas_Callbacks;
typedef struct _Evas_Smart_Class Evas_Smart_Class;
#if 1 /* able to change co-ordinate systems to remove all fp ops */
#if 0 /* able to change co-ordinate systems to remove all fp ops */
typedef double Evas_Coord;
typedef double Evas_Font_Size;
typedef double Evas_Angle;