[GRASS-dev] Re: North Arrow updates
Bob Covill
bcovill at tekmap.ns.ca
Thu Dec 7 19:55:12 EST 2006
Hamish,
For me the text color is working. The default color is set in
panel_main.tcl is where the color is currently being set (initialized).
For example if you change the value for arw_text_clr to 0xFF0000 you
should see a red "North". Presumably this will eventually be a user
controlled option in the arrow panel.
Did you intend the text "North" color to be changed differently?
--
Bob
On Fri, 2006-12-08 at 13:25 +1300, Hamish wrote:
> Hamish wrote:
> > > > I also set the default arrow and text colors in
> > > > panel_main.tcl to black (you might want to change these).
> >
> > I changed the default text color to white as the two are drawn
> > on top of each other. Note the text color is ignored. I will look
> > into this next.
>
> A bit stuck...
>
> The north arrow "North" text uses basically the same method as the
> panel_label.tcl text (which works), but "North" always comes out white.
>
> If I add:
> gsd_colormode(CM_COLOR);
> before the gl commands I get the color through, but then the 3D surface
> goes all black. If after the gl calls I add:
> gsd_colormode(CM_AD);
> it mostly gets back to normal, but looks a bit washed out.*
>
> The 3D surface stays black if I do:
> gsd_colormode(CM_DIFFUSE);
> instead of CM_AD.
>
> (I don't know what the colormodes do, I'm just trying things here)
>
>
> [*] bug #4238 ? I'm not sure if the bug is really in my video card driver,
> as no one else has reported the same problem AFAIK.
> https://intevation.de/rt/webrt?serial_num=4238
>
>
> here's some of the code:
>
> =======================================
>
> lib/ogsf/gsd_objs.c gsd_north_arrow() :
> gsd_color_func(text_clr);
> txt = "North";
> ...
> glRasterPos3fv(base[0]);
> glListBase(fontbase);
> glCallLists(strlen(txt), GL_BYTE, (GLubyte *) txt);
> GS_done_draw();
>
> gsd_popmatrix();
> gsd_flush();
>
> =======================================
>
> panel_label.tcl leads to:
>
> lib/ogsf/gsd_label.c:
> /* Set text color */
> gsd_color_func(color);
> do_label_display(fontbase, labpt, text);
>
>
> lib/ogsf/gsd_fonts.c
> /*****************************************/
> void do_label_display(GLuint fontbase, float *lab_pos, char *txt)
> {
> glRasterPos2f(lab_pos[X], lab_pos[Y]);
> glListBase(fontbase);
> glCallLists(strlen(txt), GL_BYTE, (GLubyte *) txt);
>
> return;
> }
>
> =======================================
>
>
> I don't see the difference. (beyond 2D/3D placement)
>
>
> ?
> Hamish
More information about the grass-dev
mailing list