Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2005:
[Freeciv-Dev] Re: (PR#12470) unify show_city_desc
Home

[Freeciv-Dev] Re: (PR#12470) unify show_city_desc

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#12470) unify show_city_desc
From: "Vijay Kiran Kamuju" <infyquest@xxxxxxxxx>
Date: Fri, 11 Mar 2005 19:06:34 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12470 >

also it gives warnings for canvas_put_text

i just added type casts for fonts[font] and fonts_gc

the code change is

  draw_shadowed_string(pcanvas, (XFontSet)fonts[font], (GC)font_gcs[font],

please check whether my code change is correct or not

but its compiling fine, i almost forgot my c basics, as now im into java

shall i send a diff

bye,
Vijay

On Sat, 12 Mar 2005 08:09:52 +0530, Vijay Kiran Kamuju
<infyquest@xxxxxxxxx> wrote:
> this patch is breaking xaw client compilation
> 
> because of this code
> 
>    if (height) {
>      /* ??? */
>      *height = main_exts->max_logical_extent.height;
>    }
> 
> here u are not declaring main_exts
> 
> in the prev version u creating the main_exts a poniter to XFontSetExtents
> 
> i think it can be avoided by this
>  if (height) {
>   XExtentsOfFontSet(*fonts[font])->max_logical_extent.height;
> }
> 
> i have not tested this
> 
> bye
> Vijay
> On Wed, 9 Mar 2005 15:09:51 -0800, Jason Short
> <jdorje@xxxxxxxxxxxxxxxxxxxxx> wrote:
> >
> > <URL: http://bugs.freeciv.org/Ticket/Display.html?id=12470 >
> >
> > This patch unifies show_city_desc by moving it into mapview_common.
> >
> > * The complicated layout logic is now only in one place.
> >
> > * Two helper functions, get_text_size and canvas_put_text are added.
> > This is quite simplistic but surely just as good as what we have now.
> >
> > * Behavior should be unchanged EXCEPT that I fixed a "bug" where the
> > text was drawn 3 pixels above the tile it was supposed to cover (exact
> > placement may be added back later but preferably not in a buggy way).
> >
> > * I updated and tested gui-gtk-2.0.  I also updated gui-stub and gui-xaw
> > but didn't test these.  It's up to the GUI authors to update the other
> > clients.
> >
> > Ultimately this makes it very much easier to make advanced "city bars"
> > (like the design in
> > http://www.idi.ntnu.no/~haskjold/freeciv/city_info3.png) or just to make
> > any changes to the "city bar".  It makes it harder to get exact text
> > placement since get_text_size doesn't include the ascent/descent (but as
> > I said the current code doesn't do exact text placement anyway).
> >
> > -jason
> >
> >
> >
>





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