<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Jussi.<br>
<br>
<div class="text-wrap tlid-copy-target">
<div class="result-shield-container tlid-copy-target"><span
class="tlid-translation translation"><span title="" class="">It
is a small code.</span> <span title="" class="">The code
tries to find out if any part of a rectangle is inside
another rectangle.<br>
</span></span><span class="tlid-translation translation"><span
title="" class="">You will need to create a project that
uses the qt component.<br>
</span></span><br>
<span class="tlid-translation translation"><span title=""
class=""><span class="tlid-translation translation"><span
title="" class="">The code uses words in Spanish. </span></span></span></span><span
class="tlid-translation translation"><span title="" class="">Here
it is.</span></span><span
class="tlid-translation-gender-indicator
translation-gender-indicator"></span></div>
</div>
<br>
[code]<br>
Public Sub Form_Open()<br>
<br>
Dim rect1 As New Rect<br>
Dim rect2 As New Rect<br>
Dim rectangulos As New Rect[][] <br>
<br>
With rect1<br>
.x = 10<br>
.y = 10<br>
.W = 100<br>
.H = 200<br>
End With<br>
<br>
With rect2<br>
.x = 5<br>
.y = 10<br>
.W = 300<br>
.H = 200<br>
End With<br>
<br>
rectangulos.Add([rect1, rect2]) <br>
rectangulos.Add([rect2, rect1])<br>
<br>
Print SuperPosicion(rect1, rect2)<br>
<br>
' Print rect1.Contains(rect2.x, rect2.y)<br>
' Print rect2.Contains(rect1.X, rect1.y)<br>
<br>
End<br>
<br>
Public Sub SuperPosicion(prota As Rect, unrectangulo As Rect) As
Boolean<br>
' <br>
<br>
Dim rec1 As New Rect<br>
Dim rec2 As New Rect <br>
Dim tmprec1 As New Rect[]<br>
<br>
With rec1<br>
.X = prota.x <br>
.Y = prota.y<br>
.W = prota.w<br>
.H = prota.h<br>
End With<br>
<br>
With rec2<br>
.x = unrectangulo.x<br>
.y = unrectangulo.y <br>
.w = unrectangulo.w<br>
.h = unrectangulo.h<br>
End With<br>
<br>
For Each tmprec1 In [[rec1, rec2], [rec2, rec1]]<br>
<br>
If ((PuntoDentroDeRect(tmprec1[0].Left, tmprec1[0].Top,
tmprec1[1])) Or <br>
(PuntoDentroDeRect(tmprec1[0].Left, tmprec1[0].Bottom,
tmprec1[1])) Or<br>
(PuntoDentroDeRect(tmprec1[0].Right, tmprec1[0].Top,
tmprec1[1])) Or<br>
(PuntoDentroDeRect(tmprec1[0].Right, tmprec1[0].Bottom,
tmprec1[1]))) Then Return True <br>
Next <br>
Return False<br>
<br>
End<br>
<br>
Public Sub PuntoDentroDeRect(x As Integer, y As Integer, unrect As
Rect) As Boolean<br>
<br>
If (x >= unrect.Left) And (x <= unrect.Right) And (y >=
unrect.Top) And (y <= unrect.Bottom) Then<br>
Return True <br>
Else<br>
Return False<br>
Endif<br>
<br>
End<br>
[/code]<br>
<br>
Regards.<br>
<br>
<div class="moz-cite-prefix">El 23/1/19 a las 19:56, Jussi Lahtinen
escribió:<br>
</div>
<blockquote type="cite"
cite="mid:CAFJMe7QFdFNOSA=XbFw7vNNBO8Sw+s-2L=9pbXrLutPMsnLKiQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>I can't reproduce the problem either... perhaps something
in your code triggers it. Can you send small project to
reproduce the problem?</div>
<div><br>
</div>
<div>Jussi<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Jan 23, 2019 at 11:14
AM Francisco Martinez <<a href="mailto:fmfdario@gmail.com"
moz-do-not-send="true">fmfdario@gmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF"> Hi everyone!.<br>
<br>
<span class="gmail-m_1626525596239538268tlid-translation
gmail-m_1626525596239538268translation"><span title="">I
hope you can see the image.</span> <span title="">Some
operators do not display correctly in the debug console
window.<br>
<br>
<img src="cid:part2.C5583A7A.8473F110@gmail.com" alt=""
class="" width="771" height="291"><br>
<br>
When I use >= is shows only > for example.<br>
<br>
¿ Wheres is "=" sometimes ?. :-)<br>
<br>
</span></span><span
class="gmail-m_1626525596239538268tlid-translation
gmail-m_1626525596239538268translation"><span title="">Best
Regards.<br>
</span></span> </div>
<br>
----[ Gambas mailing-list is hosted by <a
href="https://www.hostsharing.net" rel="noreferrer"
target="_blank" moz-do-not-send="true">https://www.hostsharing.net</a>
]----<br>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">
----[ Gambas mailing-list is hosted by <a class="moz-txt-link-freetext" href="https://www.hostsharing.net">https://www.hostsharing.net</a> ]----
</pre>
</blockquote>
<br>
</body>
</html>