<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[QLine to QRect with Margin]]></title><description><![CDATA[<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/05ca55db-dd44-4e4e-ad80-35ca6a5a9ccb.JPG" alt="line2rect.JPG" class=" img-fluid img-markdown" /></p>
<p dir="auto">I have a QLine with A(a0,b0) and B(a1,b1) , where x is a margin. So i should find out final rect coordinates which formed by adding margin to the line AB.</p>
]]></description><link>https://forum.qt.io/topic/139262/qline-to-qrect-with-margin</link><generator>RSS for Node</generator><lastBuildDate>Mon, 11 May 2026 05:36:08 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/139262.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 12 Sep 2022 17:47:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QLine to QRect with Margin on Mon, 12 Sep 2022 18:42:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/doncoder">@<bdi>DonCoder</bdi></a> said in <a href="/post/728432">QLine to QRect with Margin</a>:</p>
<blockquote>
<p dir="auto">I am new to QTransform,</p>
</blockquote>
<p dir="auto">See the <a href="https://doc.qt.io/qt-6/qtransform.html#details" target="_blank" rel="noopener noreferrer nofollow ugc">documentation</a> - a little bit of matematics.</p>
]]></description><link>https://forum.qt.io/post/728433</link><guid isPermaLink="true">https://forum.qt.io/post/728433</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Mon, 12 Sep 2022 18:42:35 GMT</pubDate></item><item><title><![CDATA[Reply to QLine to QRect with Margin on Mon, 12 Sep 2022 18:18:57 GMT]]></title><description><![CDATA[<p dir="auto">I am new to QTransform, will you eloborate your answer please</p>
]]></description><link>https://forum.qt.io/post/728432</link><guid isPermaLink="true">https://forum.qt.io/post/728432</guid><dc:creator><![CDATA[DonCoder]]></dc:creator><pubDate>Mon, 12 Sep 2022 18:18:57 GMT</pubDate></item><item><title><![CDATA[Reply to QLine to QRect with Margin on Mon, 12 Sep 2022 18:10:59 GMT]]></title><description><![CDATA[<p dir="auto">Create a QTransform to move A to 0,0 (translate) and B to 0,y (rotate, you can get the rotation from QLineF::angle()). Apply the transform to your line.<br />
Then you can calculate the margin points and transform them back with your calculated transform from above.</p>
]]></description><link>https://forum.qt.io/post/728431</link><guid isPermaLink="true">https://forum.qt.io/post/728431</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Mon, 12 Sep 2022 18:10:59 GMT</pubDate></item></channel></rss>