nanogui: displaying texts/fonts


Previous by date: 13 Feb 2006 22:25:16 +0000 Question about VNC server and framebuffer using FB_VISUAL_PSEUDOCOLOR, Pete Klemm
Next by date: 13 Feb 2006 22:25:16 +0000 Re: Images not drawn (FLTK+nxlib app with nano-X), Greg Haerr
Previous in thread: 13 Feb 2006 22:25:16 +0000 Re: displaying texts/fonts, Alex Holden
Next in thread: 13 Feb 2006 22:25:16 +0000 Re: displaying texts/fonts, Greg Haerr

Subject: Re: [nanogui] displaying texts/fonts
From: "Robbie" ####@####.####
Date: 13 Feb 2006 22:25:16 +0000
Message-Id: <20060213222508.095034AF9E@xprdmxin.myway.com>

If that's the case, (I could use the below function to theoretically display a character by character), it is this an efficient use of this function to display character by character message keeping track of the cursor this way? Or effecient is not an issue here? 
Is there a mechanism for doing this any other way?

Thanks.


 --- On Sat 02/11, Alex Holden < ####@####.#### > wrote:
From: Alex Holden [mailto: ####@####.####
To: ####@####.####
     Cc: ####@####.####
Date: Sat, 11 Feb 2006 10:24:16 +0000
Subject: Re: [nanogui] displaying texts/fonts

OOn 10 Feb 2006, at 21:37, Robbie wrote:
> It appears that I'll have to know (calculate, maybe) the number of
> pixels and display each separately using GrText().

I think you are looking for this API call:

/**
* GrGetGCTextSize:
* @gc: the graphics context
* @str: pointer to a text string
* @count: the length of the string
* @flags: text rendering flags (GR_TF*)
* @retwidth: pointer to the variable the width will be returned in
* @retheight: pointer to the variable the height will be returned in
* @retbase: pointer to the variable the baseline height will be
returned in
*
* Calculates the dimensions of the specified text string using the
current font
* and flags in the specified graphics context. The count argument
can be -1
* if the string is null terminated.
*/
void
GrGetGCTextSize(GR_GC_ID gc, void *str, int count, int flags,
GR_SIZE *retwidth, GR_SIZE *retheight, GR_SIZE *retbase)

-- 

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!



Previous by date: 13 Feb 2006 22:25:16 +0000 Question about VNC server and framebuffer using FB_VISUAL_PSEUDOCOLOR, Pete Klemm
Next by date: 13 Feb 2006 22:25:16 +0000 Re: Images not drawn (FLTK+nxlib app with nano-X), Greg Haerr
Previous in thread: 13 Feb 2006 22:25:16 +0000 Re: displaying texts/fonts, Alex Holden
Next in thread: 13 Feb 2006 22:25:16 +0000 Re: displaying texts/fonts, Greg Haerr


Powered by ezmlm-browse 0.20.