🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #14852

Re: Problem drawing lines crossing image boundary

#14852
From: Ivan Johansen
Date: Mon, 28 Jul 2003 19:26
33 lines
2509 bytes
Hans Galema wrote:
> Can confirm that for Win98SE.

Thank you for confirming this.


> 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.

The problem also exists on Windows 95, but it works on Windows 2000 and 
XP, except that I just noticed that the shown code only draws a dot 
under Windows 2000 when the BCB IDE is running. The program doesn't have 
to be run from the IDE. If the IDE is running a dot is shown. If the IDE 
is not running a vertical line is shown as it should. This is getting 
more and more crazy.


> 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.

I actually have a large number of points used to draw a curve with 
TCanvas::Polyline(). I think I just limit how much the coordinates may 
be outside the image, but It would be great if the limit was documented 
somewhere so I didn't have to guess.

Ivan Johansen
Technical Details
Message-ID: <3f257829$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-05!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!green.readfreenews.net!news.readfreenews.net!news-xfer.cox.net!peer01.cox.net!cox.net!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3f245110@newsgroups.borland.com> <3f2513f3@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 12:35:10 PST
Date: Mon, 28 Jul 2003 21:26:52 +0200
From: Ivan Johansen <NG2@Padowan.dk>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624
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> <3f2513f3@newsgroups.borland.com>
In-Reply-To: <3f2513f3@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 62.66.130.38
Message-ID: <3f257829$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1059420201 62.66.130.38 (28 Jul 2003 12:23:21 -0700)
Lines: 34
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-05!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!green.readfreenews.net!news.readfreenews.net!news-xfer.cox.net!peer01.cox.net!cox.net!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail