# SEL question

Hello!

I think this questions it’s a little OT but it’s related to SDL

I’m using SEL library (SDL Extensions Library). I’m interested
in the UTA section because i’m trying to get a non-overlapped list
of rects from an arbitrary list of rects.

For instance, the next list:

(1) uta += Rect (30, 60, 60, 60);
(2) uta += Rect (50, 20, 60, 80);
(3) uta += Rect (70, 40, 60, 40);

The ascii representation could be:±------------+
| |
| (2) ±-----±----+
| | |
±—±-----±–+ (3) |
| | |
| | |
| ±-±----+
| (1) | |
| ±-+
| |
| |
±--------------+

and I want the minimal rectangle set without overlapping. It
could be a 6 rectangle list:

``````   +-------------+
|             |
+------+------+-----+
|      |            |
``````

±—±-----±–±-------+
| | |
| | |
| ±-±----+
| | |
| ±-+
| |
| |
±--------------+

With the SEL functionality i get a very close list but some rects
include more area than the input list. The result list is:

1. 50, 20, 60, 12
2. 30, 60, 2, 4
3. 32, 32, 96, 32
4. 128, 40, 2, 40
5. 30, 64, 98, 32
6. 30, 96, 66, 24
7. 96, 96, 14, 4

You can check that, for instance, result rect(3) covers an area no
corresponding to any rect in the first list. Is there some way to
get only the area corresponding to the input rect list ? Anybody
has some experience with this library module ? Or another way to
get this kind of lists ?

Thanks!
Jorge Fernandez

Este mensaje se dirige exclusivamente a su destinatario y puede contener
informaci?n CONFIDENCIAL sometida a secreto profesional o cuya divulgaci?n
est? prohibida en virtud de la legislaci?n vigente. Si ha recibido este
mensaje por error, le rogamos que nos lo comunique inmediatamente por esta
misma v?a o por tel?fono (34 93 739 67 00) y proceda a su destrucci?n.
N?tese que el correo electr?nico v?a Internet no permite asegurar ni la
confidencialidad de los mensajes que se transmiten ni la correcta recepci?n
de los mismos. En el caso de que el destinatario de este mensaje no
consintiera la utilizaci?n del correo electr?nico v?a Internet, rogamos lo
ponga en nuestro conocimiento de manera inmediata. This message is
intended exclusively for its addressee and may contain information that is
CONFIDENTIAL and protected by a professional privilege or which disclosure
is prohibited by law. If this message has been received in error, please
immediately notify us via e-mail or by telephone (34 93 739 67 00) and
delete it. Please note that Internet e-mail does not guarantee the
confidentiality or the proper receipt of the messages sent. If the
addressee of this message does not consent to the use of Internet e-mail,
please communicate it to us immediately.