<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 60: Requesting squared corners on squared plots</title><link>https://sourceforge.net/p/phplot/feature-requests/60/</link><description>Recent changes to 60: Requesting squared corners on squared plots</description><atom:link href="https://sourceforge.net/p/phplot/feature-requests/60/feed.rss" rel="self"/><language>en</language><lastBuildDate>Fri, 08 Jan 2016 15:41:29 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/phplot/feature-requests/60/feed.rss" rel="self" type="application/rss+xml"/><item><title>Requesting squared corners on squared plots</title><link>https://sourceforge.net/p/phplot/feature-requests/60/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;It has long bothered me that the squared plot type has ragged corners on the ploted lines if the line width is greater than 1. The lines below were added/removed from the current (version 6.2.0) of phplot.php file at line 8075 to accomplish truely square corners. There may be a more elegant method to accomplish the same result, but this works for me.&lt;br/&gt;
The basic idea is to extend the length of each end of each line by half the line width.&lt;br/&gt;
$fudge = intval( $this-&amp;gt;line_widths&lt;span&gt;[$idx]&lt;/span&gt; / 2 );&lt;br/&gt;
$fudge1 = ( $this-&amp;gt;line_widths&lt;span&gt;[$idx]&lt;/span&gt; % 2 == 0 ) ? $fudge-1 : $fudge;&lt;br/&gt;
$fudge2 = ( $y_mid &amp;gt; $y_now_pixels ) ? $fudge-1 : -$fudge;&lt;br/&gt;
$fudge3 = ( $y_mid &amp;gt; $y_now_pixels ) ? $fudge : -$fudge+1;&lt;br/&gt;
ImageLine($this-&amp;gt;img, $lastx&lt;span&gt;[$idx]&lt;/span&gt;-$fudge, $y_mid, $x_now_pixels+$fudge1, $y_mid, $style);&lt;br/&gt;
ImageLine($this-&amp;gt;img, $x_now_pixels, $y_mid+$fudge2, $x_now_pixels, $y_now_pixels-$fudge3, $style);&lt;br/&gt;
// ImageLine($this-&amp;gt;img, $lastx&lt;span&gt;[$idx]&lt;/span&gt;, $y_mid, $x_now_pixels, $y_mid, $style);&lt;br/&gt;
// ImageLine($this-&amp;gt;img, $x_now_pixels, $y_mid, $x_now_pixels, $y_now_pixels, $style);&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Toewe</dc:creator><pubDate>Fri, 08 Jan 2016 15:41:29 -0000</pubDate><guid>https://sourceforge.net73075b17d0bbf5786122ac7f0f0194c08c2a2d63</guid></item></channel></rss>