is it possible to have the "Place Arrow" button change the mouse cursor
to crosshairs when in the the nviz canvas?
I have been thinking about making a polygon "N" for the north arrow,
that would get around text placement & color issues. (below arrow, same
width, same color)
Text placement & color issues would still remain for the scalebar of
course.
I just added widgets to set the north arrow text color and size. The text
color doesn't work on my Mac and there is nothing to set the text size.
However, if the layout work OK for you folks, then we can use this to test
fixing the text color. It seems like a good idea to be able to set the text
size too. Is there a variable/command to do this?
If all is OK, I can add exactly the same thing to the new scale panel.
Michael
On 12/10/06 6:24 PM, "Hamish" <hamish_nospam@yahoo.com> wrote:
is it possible to have the "Place Arrow" button change the mouse cursor
to crosshairs when in the the nviz canvas?
I have been thinking about making a polygon "N" for the north arrow,
that would get around text placement & color issues. (below arrow, same
width, same color)
Text placement & color issues would still remain for the scalebar of
course.
Hamish
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University
It seems like a good idea to be able to set the text
size too. Is there a variable/command to do this?
grab the font control from panel_label.tcl
lib/ogsf/gsd_objs.c:
/**************************************************************
* Function to draw North Arrow takes OpenGL coords and size
*************************************************************/
int gsd_north_arrow (float *pos2, float len, GLuint fontbase,
unsigned long arw_clr, unsigned long text_clr) {
So yes, there is C support for setting a dynamic font.
Right now the nviz north arrow and scale text is hardcoded as 18pt
in nviz/src/draw.c:
FontBase = load_font(TOGL_BITMAP_HELVETICA_18);
but
nviz/src/label.c uses the same thing to set the font from the controls:
which are the second and third arguments passed to Nplace_label
($font and $Nv_(labelFontSize)). So mimic panel_label and then it's just
a quick modification to draw.c to use the variable value instead of the
hardcoded one.
On 12/12/06 10:54 PM, "Hamish" <hamish_nospam@yahoo.com> wrote:
Michael Barton wrote:
It seems like a good idea to be able to set the text
size too. Is there a variable/command to do this?
grab the font control from panel_label.tcl
lib/ogsf/gsd_objs.c:
/**************************************************************
* Function to draw North Arrow takes OpenGL coords and size
*************************************************************/
int gsd_north_arrow (float *pos2, float len, GLuint fontbase,
unsigned long arw_clr, unsigned long text_clr) {
So yes, there is C support for setting a dynamic font.
Right now the nviz north arrow and scale text is hardcoded as 18pt
in nviz/src/draw.c:
FontBase = load_font(TOGL_BITMAP_HELVETICA_18);
but
nviz/src/label.c uses the same thing to set the font from the controls:
which are the second and third arguments passed to Nplace_label
($font and $Nv_(labelFontSize)). So mimic panel_label and then it's just
a quick modification to draw.c to use the variable value instead of the
hardcoded one.
Hamish
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University