<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — AppGraphics - problem with line thickness]]></title>
	<link rel="self" href="http://forums.approximatrix.com/extern.php?action=feed&amp;tid=658&amp;type=atom" />
	<updated>2017-10-25T18:32:53Z</updated>
	<generator>PunBB</generator>
	<id>http://forums.approximatrix.com/viewtopic.php?id=658</id>
		<entry>
			<title type="html"><![CDATA[Re: AppGraphics - problem with line thickness]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3069#p3069" />
			<content type="html"><![CDATA[<p>Thanks Jeff, that solves my problem with just one extra statement.</p><p>Peter</p>]]></content>
			<author>
				<name><![CDATA[PS]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3768</uri>
			</author>
			<updated>2017-10-25T18:32:53Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3069#p3069</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AppGraphics - problem with line thickness]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3062#p3062" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2017-10-24T11:38:26Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3062#p3062</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AppGraphics - problem with line thickness]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3056#p3056" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[PS]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3768</uri>
			</author>
			<updated>2017-10-22T17:26:35Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3056#p3056</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AppGraphics - problem with line thickness]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3055#p3055" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[drfrank]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=223</uri>
			</author>
			<updated>2017-10-22T14:58:24Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3055#p3055</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AppGraphics - problem with line thickness]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3054#p3054" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[PS]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3768</uri>
			</author>
			<updated>2017-10-22T13:41:05Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3054#p3054</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AppGraphics - problem with line thickness]]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=3053#p3053" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[PS]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3768</uri>
			</author>
			<updated>2017-10-22T13:39:59Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=3053#p3053</id>
		</entry>
</feed>
