/*****************************************************************************/ /* returns boolean */ int
rect_contains_pt(struct xrdp_rect *in, int x, int y)
{ if (x < in->left)
{ return0;
}
if (y < in->top)
{ return0;
}
if (x >= in->right)
{ return0;
}
if (y >= in->bottom)
{ return0;
}
return1;
}
/*****************************************************************************/ int
rect_intersect(struct xrdp_rect *in1, struct xrdp_rect *in2, struct xrdp_rect *out)
{ int rv; struct xrdp_rect dumby;
if (out == 0)
{
out = &dumby;
}
*out = *in1;
if (in2->left > in1->left)
{
out->left = in2->left;
}
if (in2->top > in1->top)
{
out->top = in2->top;
}
if (in2->right < in1->right)
{
out->right = in2->right;
}
if (in2->bottom < in1->bottom)
{
out->bottom = in2->bottom;
}
rv = !ISRECTEMPTY(*out);
if (!rv)
{
g_memset(out, 0, sizeof(struct xrdp_rect));
}
return rv;
}
/*****************************************************************************/ /* returns boolean */ int
rect_contained_by(struct xrdp_rect *in1, int left, int top, int right, int bottom)
{ if (left < in1->left || top < in1->top ||
right > in1->right || bottom > in1->bottom)
{ return0;
} else
{ return1;
}
}
/*****************************************************************************/ /* adjust the bounds to fit in the bitmap */ /* return false if there is nothing to draw else return true */ int
check_bounds(struct xrdp_bitmap *b, int *x, int *y, int *cx, int *cy)
{ if (*x >= b->width)
{ return0;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.