<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — AppGraphics - problem with line thickness]]></title>
		<link>http://forums.approximatrix.com/viewtopic.php?id=658</link>
		<atom:link href="http://forums.approximatrix.com/extern.php?action=feed&amp;tid=658&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in AppGraphics - problem with line thickness.]]></description>
		<lastBuildDate>Wed, 25 Oct 2017 18:32:53 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AppGraphics - problem with line thickness]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=3069#p3069</link>
			<description><![CDATA[<p>Thanks Jeff, that solves my problem with just one extra statement.</p><p>Peter</p>]]></description>
			<author><![CDATA[null@example.com (PS)]]></author>
			<pubDate>Wed, 25 Oct 2017 18:32:53 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=3069#p3069</guid>
		</item>
		<item>
			<title><![CDATA[Re: AppGraphics - problem with line thickness]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=3062#p3062</link>
			<description><![CDATA[<p>Peter,</p><p>I notice that the cigar-shaped phenomenon disappears if I minimize and then restore the window.&nbsp; It&#039;s definitely a refresh issue.&nbsp; Everything seems to work fine in my case, though, if I add just a final <em>call refreshall()</em> just before the <em>call loop()</em> line.</p><p>AppGraphics is quite low-level, and the line drawing routines are merely a thin wrapper around the appropriate <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/dd145203(v=vs.85).aspx">Windows GDI</a> calls.&nbsp; A lot of the seemingly odd need to refresh the window is because of underlying Windows behavior.&nbsp; I&#039;ll look into seeing if there is a fix, though.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Tue, 24 Oct 2017 11:38:26 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=3062#p3062</guid>
		</item>
		<item>
			<title><![CDATA[Re: AppGraphics - problem with line thickness]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=3056#p3056</link>
			<description><![CDATA[<p>Frank: &quot;PS,<br />Try using using Refresh() after the 1st and before the 5th line drawn.&quot;</p><p>Thanks, that seems to work, but I have to repeat it before every linedraw command to be sure that the next line is rendered correctly. When I use it only once after the first line, a later line becomes again a &quot;cigar&quot; (if there is a system behind this behavior, I can&#039;t discover it). That&#039;s no problem for drawing a few straight lines, but it seems to me a bit inefficient for drawing an unpredictable graph with many short lines, if only for program-aesthetic reasons... </p><p>Peter</p>]]></description>
			<author><![CDATA[null@example.com (PS)]]></author>
			<pubDate>Sun, 22 Oct 2017 17:26:35 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=3056#p3056</guid>
		</item>
		<item>
			<title><![CDATA[Re: AppGraphics - problem with line thickness]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=3055#p3055</link>
			<description><![CDATA[<p>PS,</p><p>Try using using Refresh() after the 1st and before the 5th line drawn.</p><p>Revised graphtest:</p><p>&nbsp; &nbsp; program graphtest<br />&nbsp; &nbsp; &nbsp; &nbsp; use appgraphics<br />&nbsp; &nbsp; &nbsp; &nbsp; implicit none<br />&nbsp; &nbsp; &nbsp; &nbsp; integer (kind=c_short):: upattern<br />&nbsp; &nbsp; &nbsp; &nbsp; integer::myscreen<br />&nbsp; &nbsp; &nbsp; &nbsp; integer:: kleurv</p><p>&nbsp; &nbsp; &nbsp; &nbsp; myscreen = initwindow(1920, 1200, closeflag=.TRUE.)<br />&nbsp; &nbsp; &nbsp; &nbsp; kleurv = creatergb (0,140,240)<br />&nbsp; &nbsp; &nbsp; &nbsp; call setlinestyle (SOLID_LINE,upattern, 20)<br />&nbsp; &nbsp; &nbsp; &nbsp; call setcolor (kleurv)</p><p>&nbsp; &nbsp; &nbsp; &nbsp; call line (0, 100, 1800, 100)&nbsp; &nbsp; &nbsp; &nbsp;! Horizontal line</p><p>&nbsp; &nbsp; &nbsp; &nbsp; call refreshall()&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;!--- Refresh window</p><p>&nbsp; &nbsp; &nbsp; &nbsp; call line (0, 300, 1800, 301)&nbsp; &nbsp; &nbsp; &nbsp;! Lines with increasing inclination<br />&nbsp; &nbsp; &nbsp; &nbsp; call line (0, 500, 1800, 510)&nbsp; &nbsp; &nbsp; &nbsp;!&nbsp; &nbsp; &nbsp; &nbsp;..<br />&nbsp; &nbsp; &nbsp; &nbsp; call line (0, 700, 1800, 720)&nbsp; &nbsp; &nbsp; &nbsp;!&nbsp; &nbsp; &nbsp; &nbsp;..<br />&nbsp; &nbsp; &nbsp; &nbsp; call line (0, 900, 1800, 950)&nbsp; &nbsp; &nbsp; &nbsp;!&nbsp; &nbsp; &nbsp; &nbsp;..</p><p>&nbsp; &nbsp; &nbsp; &nbsp; call refreshall()&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;!--- Refresh window for 5th line??<br />&nbsp; &nbsp; &nbsp; &nbsp; call line (0, 900, 1800, 950)&nbsp; &nbsp; &nbsp; &nbsp;!&nbsp; &nbsp; &nbsp; &nbsp;..</p><p>&nbsp; &nbsp; &nbsp; &nbsp; call line (0, 900, 1750, -900)&nbsp; &nbsp; &nbsp; !--- Line 45 up<br />&nbsp; &nbsp; &nbsp; &nbsp; call line (0, -900, 1800, 950)&nbsp; &nbsp; &nbsp; !--- Line 45 down</p><p>&nbsp; &nbsp; &nbsp; &nbsp; call loop()<br />&nbsp; &nbsp; &nbsp; &nbsp; call closewindow(myscreen)<br />&nbsp; &nbsp; end program graphtest</p><p>Frank</p>]]></description>
			<author><![CDATA[null@example.com (drfrank)]]></author>
			<pubDate>Sun, 22 Oct 2017 14:58:24 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=3055#p3055</guid>
		</item>
		<item>
			<title><![CDATA[Re: AppGraphics - problem with line thickness]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=3054#p3054</link>
			<description><![CDATA[<p>And here is the second photo, as it should be: </p><p><span class="postimg"><img src="https://farm5.staticflickr.com/4451/37594033270_5b9e346cd3_h.jpg" alt="https://farm5.staticflickr.com/4451/37594033270_5b9e346cd3_h.jpg" /></span></p>]]></description>
			<author><![CDATA[null@example.com (PS)]]></author>
			<pubDate>Sun, 22 Oct 2017 13:41:05 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=3054#p3054</guid>
		</item>
		<item>
			<title><![CDATA[AppGraphics - problem with line thickness]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=3053#p3053</link>
			<description><![CDATA[<p>I have been experimenting a bit with AppGraphics and I got some problems with the line thickness setting. When I use lines with a larger than the minimum thickness, everything seems to be fine, except for horizontal and for vertical lines: these have the minimum thickness, whatever thickness parameter I use. For demonstration here a test program that draws a few thick lines (very thick for demonstration purposes). The first one is exactly horizontal, the next ones have an increasingly large inclination. With the inclination, the thickness increases, although the line is also a bit cigar-shaped. This can be seen on the first photo. However, sometimes the program for no apparent reason suddenly produces the correct thick lines, as can be seen in the second photo. Is this a bug, or did I forget to set some other parameter?</p><p>program graphtest<br />use appgraphics</p><p>integer (kind=c_short):: upattern<br />integer::myscreen<br />integer:: kleurv</p><p>myscreen = initwindow(1920, 1200, closeflag=.TRUE.)</p><p>kleurv = creatergb (0,140,240)<br />call setlinestyle (SOLID_LINE,upattern, 20)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />call setcolor (kleurv)</p><p>call line (0, 100, 1800, 100)&nbsp; &nbsp; &nbsp; &nbsp;! Horizontal line<br />call line (0, 300, 1800, 301)&nbsp; &nbsp; &nbsp; &nbsp;! Lines with increasing inclination<br />call line (0, 500, 1800, 510)&nbsp; &nbsp; &nbsp; &nbsp;!&nbsp; &nbsp; &nbsp; &nbsp;..<br />call line (0, 700, 1800, 720)&nbsp; &nbsp; &nbsp; &nbsp;!&nbsp; &nbsp; &nbsp; &nbsp;..<br />call line (0, 900, 1800, 950)&nbsp; &nbsp; &nbsp; &nbsp;!&nbsp; &nbsp; &nbsp; &nbsp;..<br />call loop</p><p>end program</p><br /><p><span class="postimg"><img src="https://farm5.staticflickr.com/4492/37574912230_46d17a9bbb_z.jpg" alt="https://farm5.staticflickr.com/4492/37574912230_46d17a9bbb_z.jpg" /></span></p><p>Oh, the second photo is refused... I&#039;ll send it in a second message.</p>]]></description>
			<author><![CDATA[null@example.com (PS)]]></author>
			<pubDate>Sun, 22 Oct 2017 13:39:59 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=3053#p3053</guid>
		</item>
	</channel>
</rss>
