Re: GnomeCanvasLine
- From: Nathan Hurst <njh hawthorn csse monash edu au>
- To: Gustavo Joćo Alves Marques Carneiro <ee96090 fe up pt>
- Cc: gnome-devel-list gnome org
- Subject: Re: GnomeCanvasLine
- Date: Thu, 4 May 2000 10:52:20 +1000 (EST)
On Wed, 3 May 2000, [ISO-8859-1] Gustavo Joćo Alves Marques Carneiro wrote:
> function. This function calculates the distance between the point and
> each of the item's edges, using formulas like
> dist = sqrt (dx * dx + dy * dy) - width / 2.0;
>
> This is very slow; my teacher says we should use something like
> dist = dx; if the line's inclination is < 1.0, or
> dist = dy; otherwise.
Slow is in the eyes of the beholder. In this case changing from l-2
to l-infty won't give you a significant speed up because most(99%) of the
time will be spent drawing and housekeeping.
njh
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]