forked from enlightenment/efl
Evas filters: Simplify clip_to_target
This commit is contained in:
parent
c471ee03d6
commit
bf46a1d26c
|
@ -1344,10 +1344,9 @@ _clip_to_target(int *sx /* OUT */, int *sy /* OUT */, int sw, int sh,
|
||||||
if (ox > 0)
|
if (ox > 0)
|
||||||
{
|
{
|
||||||
(*dx) = ox;
|
(*dx) = ox;
|
||||||
if (((*dx) + sw) > (dw))
|
|
||||||
(*cols) = dw - (*dx);
|
|
||||||
else
|
|
||||||
(*cols) = sw;
|
(*cols) = sw;
|
||||||
|
if (((*dx) + (*cols)) > (dw))
|
||||||
|
(*cols) = dw - (*dx);
|
||||||
}
|
}
|
||||||
else if (ox < 0)
|
else if (ox < 0)
|
||||||
{
|
{
|
||||||
|
@ -1364,10 +1363,9 @@ _clip_to_target(int *sx /* OUT */, int *sy /* OUT */, int sw, int sh,
|
||||||
if (oy > 0)
|
if (oy > 0)
|
||||||
{
|
{
|
||||||
(*dy) = oy;
|
(*dy) = oy;
|
||||||
if (((*dy) + sh) > (dh))
|
|
||||||
(*rows) = dh - (*dy);
|
|
||||||
else
|
|
||||||
(*rows) = sh;
|
(*rows) = sh;
|
||||||
|
if (((*dy) + (*rows)) > (dh))
|
||||||
|
(*rows) = dh - (*dy);
|
||||||
}
|
}
|
||||||
else if (oy < 0)
|
else if (oy < 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue