<?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[QPainterPath: strokeStart, strokeEnd]]></title><description><![CDATA[<p dir="auto">I have a QPainterPath composed with arcTo, cubicTo, etc and maybe closed, maybe not. I want to stroke a section say from <strong>strokeStart</strong> at 0.2 to <strong>strokeEnd</strong> at 0.7. Can I do this?</p>
]]></description><link>https://forum.qt.io/topic/63417/qpainterpath-strokestart-strokeend</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 19:00:17 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/63417.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 27 Jan 2016 11:52:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QPainterPath: strokeStart, strokeEnd on Wed, 27 Jan 2016 15:43:08 GMT]]></title><description><![CDATA[<p dir="auto">Something like the following is probably my best option:</p>
<pre><code>auto start = 0.2f;
auto end = 0.8f;
auto resolution = 10;
auto step = (end - start) / resolution;
auto width = 8;
        
QPainterPath masterPath = QPainterPath();
masterPath.lineTo(boundingRect().size().width(), boundingRect().size().height());
painter-&gt;strokePath(masterPath, QPen(Qt::black, width));
    
QPainterPath shapePath = QPainterPath();
shapePath.moveTo(masterPath.pointAtPercent(start));
        
for (auto i = 0; i &lt; resolution; i ++)
{
     start += step;
     shapePath.lineTo(masterPath.pointAtPercent(start));
}
painter-&gt;strokePath(shapePath, QPen(Qt::cyan, width));
</code></pre>
]]></description><link>https://forum.qt.io/post/309903</link><guid isPermaLink="true">https://forum.qt.io/post/309903</guid><dc:creator><![CDATA[pic.spencer]]></dc:creator><pubDate>Wed, 27 Jan 2016 15:43:08 GMT</pubDate></item></channel></rss>