Article View: borland.public.cppbuilder.nativeapi
Article #14940Re: Problem drawing lines crossing image boundary
From: Hans Galema
Date: Mon, 28 Jul 2003 12:16
Date: Mon, 28 Jul 2003 12:16
30 lines
1949 bytes
1949 bytes
Ivan Johansen wrote: > I am having trouble drawing lines that goes outside the image under > Windows 98. > ... > This should show a vertical line, but instead it draws two lines: one > from (316,242) to (105,242) and one from (105,242) to approximate > (317,-16181). Can confirm that for Win98SE. > ... > I hope someone can tell me why this is happening or that it is a driver > problem. Don't know why this is happening. If it goes ok on other OS's than the calculations within MoveTo will be ok. But in the case of Win98SE based upon wrong data the TCanvas gets from somewhere. If it is only for a oneline at a time drawing you could easily make your own DrawLine ( x1, y1, x2, y2 ) which checks for y2 being to large negative. If y2 is to large then something like x2 = (x2-x1)/2 + x1; y2 = (y2-y1)/2 + y1; and then apply MoveTo and LineTo. Hans. Hans.
Technical Details
Message-ID:
<3f2513f3@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3f245110@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,c8c44e98956d82e9 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-07-28 05:22:36 PST Date: Mon, 28 Jul 2003 14:16:53 +0200 From: Hans Galema <j.m.galema.dontusethis@maartens.nl> User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3.1) Gecko/20030425 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Problem drawing lines crossing image boundary References: <3f245110@newsgroups.borland.com> In-Reply-To: <3f245110@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 129.125.108.11 Message-ID: <3f2513f3@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1059394547 129.125.108.11 (28 Jul 2003 05:15:47 -0700) Lines: 31 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail