summaryrefslogtreecommitdiff
path: root/legacy/evas/src/lib/engines/common/evas_draw_main.c
diff options
context:
space:
mode:
authorChristopher Michael <cpmichael1@comcast.net>2011-05-27 01:44:10 +0000
committerChristopher Michael <cpmichael1@comcast.net>2011-05-27 01:44:10 +0000
commitffc97c375459db7e22e566671ad0647a0e924009 (patch)
treeed082653741ebff01944578990a38189808b8c57 /legacy/evas/src/lib/engines/common/evas_draw_main.c
parent6379aa55aa6d19d66d61624b5eaf1e14d951b21a (diff)
Evas: Fix more shadow declarations of 'index' variable.
SVN revision: 59714
Diffstat (limited to '')
-rw-r--r--legacy/evas/src/lib/engines/common/evas_draw_main.c63
1 files changed, 31 insertions, 32 deletions
diff --git a/legacy/evas/src/lib/engines/common/evas_draw_main.c b/legacy/evas/src/lib/engines/common/evas_draw_main.c
index e2d4568114..7652708b22 100644
--- a/legacy/evas/src/lib/engines/common/evas_draw_main.c
+++ b/legacy/evas/src/lib/engines/common/evas_draw_main.c
@@ -18,16 +18,15 @@ evas_common_draw_context_cutouts_free(Cutout_Rects* rects)
18} 18}
19 19
20EAPI void 20EAPI void
21evas_common_draw_context_cutouts_del(Cutout_Rects* rects, 21evas_common_draw_context_cutouts_del(Cutout_Rects* rects, int idx)
22 int index)
23{ 22{
24 if ((index >= 0) && (index < rects->active)) 23 if ((idx >= 0) && (idx < rects->active))
25 { 24 {
26 Cutout_Rect* rect; 25 Cutout_Rect *rect;
27 26
28 rect = rects->rects + index; 27 rect = rects->rects + idx;
29 memmove(rect, rect + 1, 28 memmove(rect, rect + 1,
30 sizeof(Cutout_Rect) * (rects->active - index - 1)); 29 sizeof(Cutout_Rect) * (rects->active - idx - 1));
31 rects->active--; 30 rects->active--;
32 } 31 }
33} 32}
@@ -212,10 +211,10 @@ evas_common_draw_context_add_cutout(RGBA_Draw_Context *dc, int x, int y, int w,
212} 211}
213 212
214int 213int
215evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect *split) 214evas_common_draw_context_cutout_split(Cutout_Rects* res, int idx, Cutout_Rect *split)
216{ 215{
217 /* 1 input rect, multiple out */ 216 /* 1 input rect, multiple out */
218 Cutout_Rect in = res->rects[index]; 217 Cutout_Rect in = res->rects[idx];
219 218
220 /* this is to save me a LOT of typing */ 219 /* this is to save me a LOT of typing */
221#define INX1 (in.x) 220#define INX1 (in.x)
@@ -255,8 +254,8 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
255 R_NEW(res, in.x, SPY1, SPX1 - in.x, SPY2 - SPY1); 254 R_NEW(res, in.x, SPY1, SPX1 - in.x, SPY2 - SPY1);
256 R_NEW(res, SPX2, SPY1, INX2 - SPX2, SPY2 - SPY1); 255 R_NEW(res, SPX2, SPY1, INX2 - SPX2, SPY2 - SPY1);
257 /* out => (in.x, SPY2, in.w, INY2 - SPY2) */ 256 /* out => (in.x, SPY2, in.w, INY2 - SPY2) */
258 res->rects[index].h = INY2 - SPY2; 257 res->rects[idx].h = INY2 - SPY2;
259 res->rects[index].y = SPY2; 258 res->rects[idx].y = SPY2;
260 return 1; 259 return 1;
261 } 260 }
262 /* SSSSSSS 261 /* SSSSSSS
@@ -269,7 +268,7 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
269 */ 268 */
270 if (!X1_IN && !X2_IN && !Y1_IN && !Y2_IN) 269 if (!X1_IN && !X2_IN && !Y1_IN && !Y2_IN)
271 { 270 {
272 evas_common_draw_context_cutouts_del(res, index); 271 evas_common_draw_context_cutouts_del(res, idx);
273 return 0; 272 return 0;
274 } 273 }
275 /* SSS 274 /* SSS
@@ -283,8 +282,8 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
283 if (!X1_IN && X2_IN && !Y1_IN && !Y2_IN) 282 if (!X1_IN && X2_IN && !Y1_IN && !Y2_IN)
284 { 283 {
285 /* in => (SPX2, in.y, INX2 - SPX2, in.h) */ 284 /* in => (SPX2, in.y, INX2 - SPX2, in.h) */
286 res->rects[index].w = INX2 - SPX2; 285 res->rects[idx].w = INX2 - SPX2;
287 res->rects[index].x = SPX2; 286 res->rects[idx].x = SPX2;
288 return 1; 287 return 1;
289 } 288 }
290 /* S 289 /* S
@@ -299,8 +298,8 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
299 { 298 {
300 R_NEW(res, in.x, in.y, SPX1 - in.x, in.h); 299 R_NEW(res, in.x, in.y, SPX1 - in.x, in.h);
301 /* in => (SPX2, in.y, INX2 - SPX2, in.h) */ 300 /* in => (SPX2, in.y, INX2 - SPX2, in.h) */
302 res->rects[index].w = INX2 - SPX2; 301 res->rects[idx].w = INX2 - SPX2;
303 res->rects[index].x = SPX2; 302 res->rects[idx].x = SPX2;
304 return 1; 303 return 1;
305 } 304 }
306 /* SSS 305 /* SSS
@@ -314,7 +313,7 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
314 if (X1_IN && !X2_IN && !Y1_IN && !Y2_IN) 313 if (X1_IN && !X2_IN && !Y1_IN && !Y2_IN)
315 { 314 {
316 /* in => (in.x, in.y, SPX1 - in.x, in.h) */ 315 /* in => (in.x, in.y, SPX1 - in.x, in.h) */
317 res->rects[index].w = SPX1 - in.x; 316 res->rects[idx].w = SPX1 - in.x;
318 return 1; 317 return 1;
319 } 318 }
320 /* SSSSSSS 319 /* SSSSSSS
@@ -328,8 +327,8 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
328 if (!X1_IN && !X2_IN && !Y1_IN && Y2_IN) 327 if (!X1_IN && !X2_IN && !Y1_IN && Y2_IN)
329 { 328 {
330 /* in => (in.x, SPY2, in.w, INY2 - SPY2) */ 329 /* in => (in.x, SPY2, in.w, INY2 - SPY2) */
331 res->rects[index].h = INY2 - SPY2; 330 res->rects[idx].h = INY2 - SPY2;
332 res->rects[index].y = SPY2; 331 res->rects[idx].y = SPY2;
333 return 1; 332 return 1;
334 } 333 }
335 /* 334 /*
@@ -344,7 +343,7 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
344 { 343 {
345 R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2); 344 R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2);
346 /* in => (in.x, in.y, in.w, SPY1 - in.y) */ 345 /* in => (in.x, in.y, in.w, SPY1 - in.y) */
347 res->rects[index].h = SPY1 - in.y; 346 res->rects[idx].h = SPY1 - in.y;
348 return 1; 347 return 1;
349 } 348 }
350 /* 349 /*
@@ -358,7 +357,7 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
358 if (!X1_IN && !X2_IN && Y1_IN && !Y2_IN) 357 if (!X1_IN && !X2_IN && Y1_IN && !Y2_IN)
359 { 358 {
360 /* in => (in.x, in.y, in.w, SPY1 - in.y) */ 359 /* in => (in.x, in.y, in.w, SPY1 - in.y) */
361 res->rects[index].h = SPY1 - in.y; 360 res->rects[idx].h = SPY1 - in.y;
362 return 1; 361 return 1;
363 } 362 }
364 /* SSS 363 /* SSS
@@ -373,8 +372,8 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
373 { 372 {
374 R_NEW(res, SPX2, in.y, INX2 - SPX2, SPY2 - in.y); 373 R_NEW(res, SPX2, in.y, INX2 - SPX2, SPY2 - in.y);
375 /* in => (in.x, SPY2, in.w, INY2 - SPY2) */ 374 /* in => (in.x, SPY2, in.w, INY2 - SPY2) */
376 res->rects[index].h = INY2 - SPY2; 375 res->rects[idx].h = INY2 - SPY2;
377 res->rects[index].y = SPY2; 376 res->rects[idx].y = SPY2;
378 return 1; 377 return 1;
379 } 378 }
380 /* S 379 /* S
@@ -390,8 +389,8 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
390 R_NEW(res, in.x, in.y, SPX1 - in.x, SPY2 - in.y); 389 R_NEW(res, in.x, in.y, SPX1 - in.x, SPY2 - in.y);
391 R_NEW(res, SPX2, in.y, INX2 - SPX2, SPY2 - in.y); 390 R_NEW(res, SPX2, in.y, INX2 - SPX2, SPY2 - in.y);
392 /* in => (in.x, SPY2, in.w, INY2 - SPY2) */ 391 /* in => (in.x, SPY2, in.w, INY2 - SPY2) */
393 res->rects[index].h = INY2 - SPY2; 392 res->rects[idx].h = INY2 - SPY2;
394 res->rects[index].y = SPY2; 393 res->rects[idx].y = SPY2;
395 return 1; 394 return 1;
396 } 395 }
397 /* SSS 396 /* SSS
@@ -406,8 +405,8 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
406 { 405 {
407 R_NEW(res, in.x, in.y, SPX1 - in.x, SPY2 - in.y); 406 R_NEW(res, in.x, in.y, SPX1 - in.x, SPY2 - in.y);
408 /* in => (in.x, SPY2, in.w, INY2 - SPY2) */ 407 /* in => (in.x, SPY2, in.w, INY2 - SPY2) */
409 res->rects[index].h = INY2 - SPY2; 408 res->rects[idx].h = INY2 - SPY2;
410 res->rects[index].y = SPY2; 409 res->rects[idx].y = SPY2;
411 return 1; 410 return 1;
412 } 411 }
413 /* 412 /*
@@ -423,7 +422,7 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
423 R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2); 422 R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2);
424 R_NEW(res, SPX2, SPY1, INX2 - SPX2, SPY2 - SPY1); 423 R_NEW(res, SPX2, SPY1, INX2 - SPX2, SPY2 - SPY1);
425 /* in => (in.x, SPY2, in.w, INY2 - SPY2) */ 424 /* in => (in.x, SPY2, in.w, INY2 - SPY2) */
426 res->rects[index].h = SPY1 - in.y; 425 res->rects[idx].h = SPY1 - in.y;
427 return 1; 426 return 1;
428 } 427 }
429 /* 428 /*
@@ -439,7 +438,7 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
439 R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2); 438 R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2);
440 R_NEW(res, in.x, SPY1, SPX1 - in.x, SPY2 - SPY1); 439 R_NEW(res, in.x, SPY1, SPX1 - in.x, SPY2 - SPY1);
441 /* in => (in.x, in.y, in.w, SPY1 - in.y) */ 440 /* in => (in.x, in.y, in.w, SPY1 - in.y) */
442 res->rects[index].h = SPY1 - in.y; 441 res->rects[idx].h = SPY1 - in.y;
443 return 1; 442 return 1;
444 } 443 }
445 /* 444 /*
@@ -454,7 +453,7 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
454 { 453 {
455 R_NEW(res, SPX2, SPY1, INX2 - SPX2, INY2 - SPY1); 454 R_NEW(res, SPX2, SPY1, INX2 - SPX2, INY2 - SPY1);
456 /* in => (in.x, in.y, in.w, SPY1 - in.y) */ 455 /* in => (in.x, in.y, in.w, SPY1 - in.y) */
457 res->rects[index].h = SPY1 - in.y; 456 res->rects[idx].h = SPY1 - in.y;
458 return 1; 457 return 1;
459 } 458 }
460 /* 459 /*
@@ -470,7 +469,7 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
470 R_NEW(res, in.x, SPY1, SPX1 - in.x, INY2 - SPY1); 469 R_NEW(res, in.x, SPY1, SPX1 - in.x, INY2 - SPY1);
471 R_NEW(res, SPX2, SPY1, INX2 - SPX2, INY2 - SPY1); 470 R_NEW(res, SPX2, SPY1, INX2 - SPX2, INY2 - SPY1);
472 /* in => (in.x, in.y, in.w, SPY1 - in.y) */ 471 /* in => (in.x, in.y, in.w, SPY1 - in.y) */
473 res->rects[index].h = SPY1 - in.y; 472 res->rects[idx].h = SPY1 - in.y;
474 return 1; 473 return 1;
475 } 474 }
476 /* 475 /*
@@ -485,10 +484,10 @@ evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect
485 { 484 {
486 R_NEW(res, in.x, SPY1, SPX1 - in.x, INY2 - SPY1); 485 R_NEW(res, in.x, SPY1, SPX1 - in.x, INY2 - SPY1);
487 /* in => (in.x, in.y, in.w, SPY1 - in.y) */ 486 /* in => (in.x, in.y, in.w, SPY1 - in.y) */
488 res->rects[index].h = SPY1 - in.y; 487 res->rects[idx].h = SPY1 - in.y;
489 return 1; 488 return 1;
490 } 489 }
491 evas_common_draw_context_cutouts_del(res, index); 490 evas_common_draw_context_cutouts_del(res, idx);
492 return 0; 491 return 0;
493#undef INX1 492#undef INX1
494#undef INX2 493#undef INX2