Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2004:
[Freeciv-Dev] Re: (PR#7696) Re: Re: (PR#7637) Problem with line_width=2
Home

[Freeciv-Dev] Re: (PR#7696) Re: Re: (PR#7637) Problem with line_width=2

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#7696) Re: Re: (PR#7637) Problem with line_width=2 [take 4]
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Wed, 10 Mar 2004 23:51:20 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7696 >

On Wed, Mar 10, 2004 at 05:15:13PM -0800, Jason Short wrote:
> IMO this work should be done by the GUI code.  The GUI already has to 
> define how the single-width line is drawn (which pixels are drawn). 
> This is fairly obvious but not entirely trivial, I suspect.  And 
> generalizing this algorithm will probably give the X11 definition.
> 
> So I think we should just go with the X11 definition.  It is 
> mathematically simple and should be easy to conform to.

Hmmm. What do other think?

> Of course canvas_put_line as it is now doesn't allow you to specify the 
> width.  You have to specify the line type which translates into which GC 
> to use.  A different interface could just specify the width and let the 
> function set up the GC as needed.  This would be trivially slower but 
> ultimately more flexible.

Yes. An orthogonal issue.

> >>I think the solution civ3 used was to provide sprites for the lines. 
> >>This allowed the lines to curve over hills and mountains (it took a 
> >>number of sprites, of course).
> > 
> > Or with this solution.
> 
> This may be useful at some point.  The problem is we have many more 
> types of lines (grid, border, frame, goto).  Civ3 only had border and 
> goto lines IIRC (I can't recall if goto lines had their own sprites). 
> We also have a more complex set of tileset rules that may make this 
> complicated.
> 
> The advantage of using a sprite is you can easily round the edges.  For 
> instance a right turn goto line needn't be a sharp angle.

We only have to do it for the lines with an even width. AFAIK only the
border lines have this attribute now.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  Windows: From the people who brought you edlin...




[Prev in Thread] Current Thread [Next in Thread]