"R.Wieser"
In the paint event, directly after the wglSwapBuffers
"Jean-Christophe"
I guess that you shouldn't call any
OpenGL functions after wglSwapBuffers.
"R.Wieser"
Shucks. Although I hinted at it in the subjectline ...
I guess that you shouldn't call any
OpenGL functions after wglSwapBuffers.
"R.Wieser"
In the paint event, directly after the wglSwapBuffers
I guess that you shouldn't call any
OpenGL functions after wglSwapBuffers.
"R.Wieser" :
In the paint event, directly after the wglSwapBuffers and before the event ends I'm overlaying some information using DrawText, which sometimes
flickers (showing the OpenGL drawing behind it). How can I stop that flickering ? I've tried a GdiFlush, but that didn't help.
I know that I can also create a 2D overlay in OpenGL itself.
I would still like to know how to combine OpenGL and GDI.
"R.Wieser" :
In the paint event, directly after the wglSwapBuffers and before the
event ends I'm overlaying some information using DrawText
"R.Wieser" :
In the paint event, directly after the wglSwapBuffers and before the
event
ends I'm overlaying some information using DrawText, which sometimes
flickers (showing the OpenGL drawing behind it). How can I stop that
flickering ? I've tried a GdiFlush, but that didn't help.
"Jean-Christophe"
Overlayed: is this text GDI-drawn inside the OpenGL viewport area itself ?
I know that I can also create a 2D overlay in OpenGL itself.
That's what I do to write 'flat' ( XY fixed ) text into an OpenGL view,
when I don't want 3D translations and/or rotations to affect the text. http://www.cjoint.com/data/EIgqfmYuONh_0.jpg
I would still like to know how to combine OpenGL and GDI.
Is there any reason why you absolutely need to
somehow mix GDI and OpenGL instead of just writing
all the text at the OpenGL level before swapping buffers ?
Overlayed: is this text GDI-drawn inside the OpenGL viewport
area itself ?
I know that I can also create a 2D overlay in OpenGL itself.
That's what I do to write 'flat' ( XY fixed ) text into an OpenGL
view, when I don't want 3D translations and/or rotations to affect
the text.
MSDN excerpt (applies to 'DrawText' since it's a graphic
function) says : "OpenGL and GDI graphics cannot be mixed
in a double-buffered window."
Is there any reason why you absolutely need to
somehow mix GDI and OpenGL instead of just writing
all the text at the OpenGL level before swapping buffers ?
event"R.Wieser" :
In the paint event, directly after the wglSwapBuffers and before the
ends I'm overlaying some information using DrawText, which sometimes flickers (showing the OpenGL drawing behind it). How can I stop that flickering ? I've tried a GdiFlush, but that didn't help.
Overlayed: is this text GDI-drawn inside the OpenGL viewport area itself ?
I know that I can also create a 2D overlay in OpenGL itself.
That's what I do to write 'flat' ( XY fixed ) text into an OpenGL view,
when I don't want 3D translations and/or rotations to affect the text. http://www.cjoint.com/data/EIgqfmYuONh_0.jpg
I would still like to know how to combine OpenGL and GDI.
Is there any reason why you absolutely need to
somehow mix GDI and OpenGL instead of just writing
all the text at the OpenGL level before swapping buffers ?
Jean-Christophe :
... write 'flat' (XY fixed) text into an OpenGL view, when I don't
want 3D translations and/or rotations to affect the text.
"R.Wieser" :
I wrote some test code for it, and there is quite a bit to manage.
From continuously setting up and switching between 3D and 2D mode,
you also need to take care that stuff like fog and lighting do not
interfere.
Nope, there is no absolute need to do it with GDI. Its just that I was curious if it could be done that way, as it seemed simpler to use.
And, apart from the flickering, it definitily works. :-)
"Jean-Christophe"
Plus, the text background can be transparent if you want it to.
"R.Wieser"
Lol. I removed my own remark in that direction from a previous
post, as I did not want to muddy my question with it.
Yes, thats something plain GDI (as opposed to GDI+ ) does not
seem to be able to do (I asked in another newsgroup about it).
I took it that when the glSwapBuffers is executed
the backbuffer gets swapped with the front one
(probably just copied to the DC), so where is the flickering coming from ?
Is there some kind of delay involved causing the actual "swapping" to take place some time later ?
And by the way, I saw the same kind of flickering when I had a control
placed ontop of the OpenGL canvas, so its not just my GDI drawing thats bothered by it.
A remark though: In the "restore" phase you switch to and than pop the projection matrix, only to directly overwrite it by using glPerspective.
Does that combination do something I'm not (yet) aware of ?
Plus, the text background can be transparent if you want it to.
when you don't need any OpenGL calls anymore - just
first disable all 'featurettes' and that's it.
Well, if you _really_ want it to use it that bad, then you've
got to say good-bye to the marvels of double-buffering !
And, apart from the flickering, it definitily works. :-)
... apart from the flickering :-)
Rudy, here's an excerpt of the code I wrote for this,
to be used after the drawing of the whole OpenGL
scene and just before swapping thy OpenGL buffers
... HTH.
Jean-Christophe :
... write 'flat' (XY fixed) text into an OpenGL view, when I don't
want 3D translations and/or rotations to affect the text.
"R.Wieser" :
I wrote some test code for it, and there is quite a bit to manage.
From continuously setting up and switching between 3D and 2D mode,
you also need to take care that stuff like fog and lighting do not interfere.
Well, you don't need to switch all those things off and on if you
implement the 2D text display after the complete drawing of the 3D
scene and just before swapping buffers - when you don't need any
OpenGL calls anymore - just first disable all 'featurettes' and that's it. Plus, the text background can be transparent if you want it to. http://www.cjoint.com/data/EIgun1ZTXch_0.jpg
The tiny drawback is that all the information you need to display
shall be available at the time you finally call the text display function, you know that already since you implemented DrawText after swapping
buffers, so you just need to "OpenGL-ise" it before swapping buffers ...
Nope, there is no absolute need to do it with GDI. Its just that I was curious if it could be done that way, as it seemed simpler to use.
Well, if you _really_ want it to use it that bad, then you've
got to say good-bye to the marvels of double-buffering !
And, apart from the flickering, it definitily works. :-)
... apart from the flickering :-)
Rudy, here's an excerpt of the code I wrote for this,
to be used after the drawing of the whole OpenGL scene
and just before swapping thy OpenGL buffers ... HTH.
// disable all stuff I don't need anymore (add you own)1);
glDisable(GL_DEPTH_TEST);
glShadeModel(GL_FLAT);
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
glOrtho(winRect.left, winRect.right, winRect.bottom, winRect.top, -1,
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
glDisable(GL_BLEND);
glColor3ubv( (GLbyte*)&cColor[COL_WHITE] ); // text color
// display 2D 'flat' text
glListBase(INDEX_LIST_TEXT); // use display lists for the glyphs
/// insert here the display of all strings
glRasterPos2i(x,y); // screen coordinates text location
glCallLists( strlen(s), GL_UNSIGNED_BYTE, s ); // string 's'
... // display other text at other location
/// ending of the display of all strings
// restore (don't really need to - except for PopMatrixes)
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective( stP.fovy, stP.aspect, stP.zNear, stP.zFar );
glMatrixMode(GL_MODELVIEW);
glEnable(GL_DEPTH_TEST);
// ends
I used to GDI-draw transparent background text this way :[Snip]
Whoops. I was referring to the transparency of the big black-ish
box the text is drawn ontop of ( in your example image: http://www.cjoint.com/data/EIgun1ZTXch_0.jpg ).
I used CreateDIBSection to create a 32-bit DIB to draw on using GDI
commands, which I than converted into a texture using glTextImage2D.
Color me surprised when the OpenGL cube I used the texture on
disappeared from the scene .... The cause was/is that any GDI drawing
will zero the high byte (alpha channel) of all pixels touched by the command(s), causing full transparency. :-\
I suppose that using both GDI and OpenGL on the same area rises
some conflict (?) and not the same one wins every time, so the
flickering.
Hmmm... I assumed that after the swapping the OpenGL scene
effectivily becomes a 2D GDI image (otherwise Windows can't
handle it). And as the GDI command comes later in the code
that the OpenGL swapping one it *should* be placed ontop of it.
There is one thing I realized a bit later though: Its possible that the actual OpenGL "swapping" is done, unsynchronized, from within
another thread. That might cause a race condition
(with the curent thread) resulting in the flickering.
... don't bother too much about how bad it looks :-)
It regulary happens to me that I have to rewrite a program from
scratch again, because the current one has been "tested to death"
(with all kinds of orphan testcode still embedded everywhere).
One quick question (yeah, even I do not believe that anymore :-) ) :
I just tried to create a textbox (alike the one in that example image
of yours) for which I used a glSetViewport (so the text coordinates
would be relative to the current "box", not to the 3D scene's window).
I than did draw text into the box using wglUseFontBitmaps
(initilisation) and glCallLists. What I did not expect is that that
text "spilled over" the sides (top and right) of the Viewport
(not clipped against it). Should it ?
I used to GDI-draw transparent background text this way :[Snip]
Dunno, just a guess :
I suppose that using both GDI and OpenGL on the same area rises
some conflict (?) and not the same one wins every time, so the flickering.
What kind of "control" ?
A windows dialog box or something ?
later I moved it after total scene completion, and never
took time to clean-up the code !
So don't bother too much about how bad it looks :-)
"Jean-Christophe"
Plus, the text background can be transparent if you want it to.
"R.Wieser"
Lol. I removed my own remark in that direction from a previous
post, as I did not want to muddy my question with it.
Yes, thats something plain GDI (as opposed to GDI+ ) does not
seem to be able to do (I asked in another newsgroup about it).
I used to GDI-draw transparent background text this way :
SetBkMode(hdc,TRANSPARENT);
SetTextColor( hdc, value );
DrawText( hdc, str, -1, &rect, DT_CENTER );
I took it that when the glSwapBuffers is executed
the backbuffer gets swapped with the front one
That's how I understand it too : complete flush, then swapped.
( each time I had a funny display, it was because of a bug in my
own code, or a misunderstanding on how to use OpenGL :-)
?(probably just copied to the DC), so where is the flickering coming from
takeIs there some kind of delay involved causing the actual "swapping" to
place some time later ?
Dunno, just a guess :
I suppose that using both GDI and OpenGL on the same area rises
some conflict (?) and not the same one wins every time, so the flickering.
I know that, when catching WM_PAINT msg, one can't mess too much
between BeginPaint() and EndPaint(). I tried several different approches, like calling the whole OpenGL scene drawing from inside a thread loop,
or like this :
//// main window message loop
for( ok=1; ok; )
{ if( PeekMessage(&msg,NULL,0,0,PM_REMOVE) ) // got some
{ TranslateMessage(&msg); // process
DispatchMessage(&msg);
if( msg.message == WM_QUIT ) ok=0; // leave loop
}
else // no win msg to process
{ fDrawOpenGLscene(); // OpenGL scene
}
}
// ...
//// inside WndProc()
case WM_PAINT:
fDrawOpenGLscene(); // OpenGL scene
return 0;
And by the way, I saw the same kind of flickering when I had a control placed ontop of the OpenGL canvas, so its not just my GDI drawing thats bothered by it.
What kind of "control" ?
A windows dialog box or something ?
!A remark though: In the "restore" phase you switch to and than pop the projection matrix, only to directly overwrite it by using glPerspective. Does that combination do something I'm not (yet) aware of ?
No :-)
I don't call anymore OpenGL functions after "restore".
This 'restore' phase is a remaining of the time when this function was
still called from inside the middle of the drawing scene ... later I moved
it after total scene completion, and never took time to clean-up the code
So don't bother too much about how bad it looks :-)
(...) drawing an overlay using GDI is quite a bit simpler
than the equivalent in OpenGL. Both in terms of lines of code,
as well as not having to manage, in OpenGL, switching between 3D
and 2D modes as well as enabeling and disabeling other stuff
an enabled depth-test caused the lower part of some drawn text
to disappear, depending on the height my camera was on
However :-) my 2DFlatTextBox bypasses this problem :
And *how* does it do that ?
I myself have added a clipping box to the viewport (both placed around
the textbox), which gives an acceptable result. Still, text drawin before
the viewport as well as with a baseline (just) below the viewport
disappears entirely. :-\
Anyway it's OpenGL, not GDI, but I _used_ transparent
bgnd GDI DrawText and it works well,
The delicate complexity of the OpenGL machine :-8
Personnally I won't mix GDI & OpenGL together as it
sounds to me like "looking for trouble" -- honestly, once
one started to write a program already using OpenGL,
who needs GDI ?
I seriously doubt that Windows and OpenGL will really
conflict ...
as long as we're not messing (too much) with the rules.
Usually I use several couples of { #ifdef | #endif } with an
identifier like 'ISDEBUG' to avoid the need to comment out
the code everywhere,
It think it shouldn't since you explicitely set the wiewport,
but, as you already guessed, I'm not an OpenGL expert.
However :-) my 2DFlatTextBox bypasses this problem :
Rudy,box)
I used to GDI-draw transparent background text this way :[Snip]
Whoops. I was referring to the transparency of the big black-ish
box the text is drawn ontop of ( in your example image: http://www.cjoint.com/data/EIgun1ZTXch_0.jpg ).
The bgnd looks black because there's no image under the text ... when
there's an image under then you see it thru the text's transparent bgnd. (actually I set the bgnd _partially_ transparent to materialize the 2D
http://www.cjoint.com/data/EIip02dxhoh_0.jpg
Anyway it's OpenGL, not GDI, but I _used_ transparent bgnd
GDI DrawText and it works well, like for instance the screen
of this scope with the transparent-bgnd text (yellow, top right) http://www.cjoint.com/data/EIirk07676h_0.jpg
I used CreateDIBSection to create a 32-bit DIB to draw on using GDI commands, which I than converted into a texture using glTextImage2D.
Color me surprised when the OpenGL cube I used the texture on
disappeared from the scene .... The cause was/is that any GDI drawing
will zero the high byte (alpha channel) of all pixels touched by the command(s), causing full transparency. :-\
The delicate complexity of the OpenGL machine :-8 http://www.cjoint.com/data/EIirHtyFVKh_-openglm.pdf
Personnally I won't mix GDI & OpenGL together as it sounds
to me like "looking for trouble" -- honestly, once one started
to write a program already using OpenGL, who needs GDI ?
( except for the launch of sharp technical threads on usenet :-)
I suppose that using both GDI and OpenGL on the same area rises
some conflict (?) and not the same one wins every time, so the
flickering.
Hmmm... I assumed that after the swapping the OpenGL scene
effectivily becomes a 2D GDI image (otherwise Windows can't
handle it). And as the GDI command comes later in the code
that the OpenGL swapping one it *should* be placed ontop of it.
Yeah, but you know how it is with software programing, look at it
the other way : a user is thinking « oh I see, it should work this way, therefore if I do *this* then it should do *that* ... » next thing you
know, your phone is ringin' and he complains that it didn't work ;-)
There is one thing I realized a bit later though: Its possible that the actual OpenGL "swapping" is done, unsynchronized, from within
another thread. That might cause a race condition
(with the curent thread) resulting in the flickering.
I seriously doubt that Windows and OpenGL will really conflict
... as long as we're not messing (too much) with the rules.
(but it's always interresting to check and try unusual things)
... don't bother too much about how bad it looks :-)
It regulary happens to me that I have to rewrite a program from
scratch again, because the current one has been "tested to death"
(with all kinds of orphan testcode still embedded everywhere).
Usually I use several couples of { #ifdef | #endif } with an identifier
like 'ISDEBUG' to avoid the need to comment out the code everywhere,
then I just comment out { #define ISDEBUG }, recompile, and that's it.
( unless I feel lazy, or bored, or out of time, or all of the above,
which appends more and more frequently as I get older )
One quick question (yeah, even I do not believe that anymore :-) ) :
I just tried to create a textbox (alike the one in that example image
of yours) for which I used a glSetViewport (so the text coordinates
would be relative to the current "box", not to the 3D scene's window).
I than did draw text into the box using wglUseFontBitmaps
(initilisation) and glCallLists. What I did not expect is that that
text "spilled over" the sides (top and right) of the Viewport
(not clipped against it). Should it ?
It think it shouldn't since you explicitely set the wiewport,
but, as you already guessed, I'm not an OpenGL expert.
(there ARE some experts roaming around in this newsgroup)
However :-) my 2DFlatTextBox bypasses this problem : http://www.cjoint.com/data/EIiqQXEYaTh_0.jpg
Best Regards.
I don't agree ... you just need to write your own fct2DFlatText()
You won't need this heavy load anymore if you disable all
'features' at the very start of your fct2DFlatText() function
Wait, I never experienced that, wherever near or far the camera is.
BTW, I used something quite close to insert 2D-flat-text into
the 3D scene itself with the possibility to locate text in 3D(x,y,z)
while always keep oriented straight in front of the viewer, whatever
the rotations.
And *how* does it do that ?
With the very same code I already posted here before.
Uh ... never had that, but I don't clip the box at all.
Rudy,1.0 )
(...) drawing an overlay using GDI is quite a bit simpler
than the equivalent in OpenGL. Both in terms of lines of code,
I don't agree ... you just need to write your own fct2DFlatText()
To me, if 'it works' and _never_ shows any funny behavior, it's done.
I re-used the same code on several OpenGL softs w/ just a copy/paste
of the code, the only tuning was to sprintf the strings to display.
( plus ... now I know what problems I escaped by not using GDI :-)
as well as not having to manage, in OpenGL, switching between 3D
and 2D modes as well as enabeling and disabeling other stuff
You won't need this heavy load anymore if you disable all 'features'
at the very start of your fct2DFlatText() function, and call it after
your OpenGL scene is completed and before the final buffer swap.
an enabled depth-test caused the lower part of some drawn text
to disappear, depending on the height my camera was on
Wait, I never experienced that, wherever near or far the camera is.
(no surprise, since all features have already been disabled before)
Or, it may be because glOrtho( r.left, r.right, r.bottom, r.top, -1.0,
with 'r' being the whole window rectangle ...before
BTW, I used something quite close to insert 2D-flat-text into the 3D
scene itself with the possibility to locate text in 3D(x,y,z) while always keep oriented straight in front of the viewer, whatever the rotations.
( like 'XYZ' text to identify the three axis of a 3D system coordinates )
However :-) my 2DFlatTextBox bypasses this problem :
And *how* does it do that ?
With the very same code I already posted here before.
I myself have added a clipping box to the viewport (both placed around
the textbox), which gives an acceptable result. Still, text drawin
the viewport as well as with a baseline (just) below the viewport disappears entirely. :-\
Uh ... never had that, but I don't clip the box at all.
Regards
Jean-Christophe,
I don't agree ... you just need to write your own fct2DFlatText()
Lol. And how many lines would that procedure contain ?
With GDI32 I can just use the DLL function like TextOut directly.
Nothing to switch, nothing that needs to be set and cleared the whole
time.
Ofcourse, disabeling the texts own background does make it look a bit
better. So, two calls all-in all.
With OpenGL on the other hand I have had quite a few troubles. It also
needs me to set up 3D and 2D modes in every frame, as well as switching
quite a few things related to those off and on the whole time.
And pardon me, but the OpenGL way isn't really what you call simple *or*
too
well documented. I've just posted a problem where switching to Ortho
causes
me to loose pixel row and column Zero, causing an offset. ...Which I only noticed when I tried to match-up ortho coordinates with the ones that I supplied to glScissor.
Nope, I've now spend a few days *just* to get Ortho to work
You won't need this heavy load anymore if you disable all
'features' at the very start of your fct2DFlatText() function
Yeah, thats exactly the "switching on and off" I referred too. Because
when
I disable them at the start of some orthographic drawing I need to
re-enable
them again when a new frame is started and the 3D mode is initialized.
Right ?
BTW, I used something quite close to insert 2D-flat-text into
the 3D scene itself with the possibility to locate text in 3D(x,y,z)
while always keep oriented straight in front of the viewer, whatever
the rotations.
I will probably try to do the same/similar, as I would like to place some "name tags" onto certain 3D locations (like when displaying a game world).
And *how* does it do that ?
With the very same code I already posted here before.
Ah. Sorry, I thought it would do a bit more than that.
Your image and function name hinted at a true textbox*, something
which I also aimed to make (already wrote it using GDI, but now
needed to recreate it in OpenGL).
*One where the textbox top-left would be the origin to the drawn text, and which would not allow any drawn text to spill outof/over the box.
Possibly
even including CR,LF awareness.
Uh ... never had that, but I don't clip the box at all.
:-) Thats what I referred to a few messages back: You know how long your text will be(come) at its maximum, and just draw a big enough rectangle
that
the text will always stay "inside" of it.
Thanks for the help though, I appreciate it.
And how many lines will this thread contain ?
Sorry, I can't see where the fun is ...
Fine - except it doesn't work like you wanted it - hence this thread,
Well, I guess that, all in all, total you wrote more lines than
I did,
with the result that yours gives you trouble while mine works.
( now I start to see where the fun is ... no seriously, come on :-)
you can't expect OpenGL to guess and do it four you.
Sorry I didn't post what you expected.
I don't use it anymore since I just display numeric values,
where strings are sprintf'ed at the time the box is drawn.
Another way is to dynamically resize the rectangle of the box
to make it fit by itself to the longest string ( strlen * charwidth )
Rudy,only
Jean-Christophe,
I don't agree ... you just need to write your own fct2DFlatText()
Lol. And how many lines would that procedure contain ?
And how many lines will this thread contain ?
Sorry, I can't see where the fun is ... maybe because the
number of lines isn't exactly my metric for code quality,
mine is : 'it does exactly what I want' ... I'm a simple man !
With GDI32 I can just use the DLL function like TextOut directly.
Nothing to switch, nothing that needs to be set and cleared the whole
time.
Ofcourse, disabeling the texts own background does make it look a bit better. So, two calls all-in all.
Fine - except it doesn't work like you wanted it - hence this thread,
and me trying to help while getting back unexpected comments :-|
With OpenGL on the other hand I have had quite a few troubles. It also needs me to set up 3D and 2D modes in every frame, as well as switching quite a few things related to those off and on the whole time.
And pardon me, but the OpenGL way isn't really what you call simple *or* too
well documented. I've just posted a problem where switching to Ortho
causes
me to loose pixel row and column Zero, causing an offset. ...Which I
noticed when I tried to match-up ortho coordinates with the ones that I supplied to glScissor.
Nope, I've now spend a few days *just* to get Ortho to work
Well, I guess that, all in all, total you wrote more lines than I did,
with the result that yours gives you trouble while mine works.
( now I start to see where the fun is ... no seriously, come on :-)
someYou won't need this heavy load anymore if you disable all
'features' at the very start of your fct2DFlatText() function
Yeah, thats exactly the "switching on and off" I referred too. Because
when
I disable them at the start of some orthographic drawing I need to re-enable
them again when a new frame is started and the 3D mode is initialized. Right ?
Sure, being the programmer, you're the master,
you can't expect OpenGL to guess and do it four you.
You want flat 2D text, fine; then after your 3D scene is done you disable
3D 'features' and enable 2D text drawing, draw text, then swap buffers,
and that's it; next frame will process your already written 3D scene.
Sounds quite logical to me and I still can't see where the problem is.
Mix GDI rised problems leading to complain about OpenGL ?
BTW, I used something quite close to insert 2D-flat-text into
the 3D scene itself with the possibility to locate text in 3D(x,y,z)
while always keep oriented straight in front of the viewer, whatever
the rotations.
I will probably try to do the same/similar, as I would like to place
world)."name tags" onto certain 3D locations (like when displaying a game
Yes, that's it exactly.and
Works fine unless you want better-looking, 'sexy', 3D fonts.
I used to use a BMP with nice alphabet and numbers and map
string characters into it to display textured 3D floating messages.
Looks better ... unless you demand to count number of code lines :op
And *how* does it do that ?
With the very same code I already posted here before.
Ah. Sorry, I thought it would do a bit more than that.
Sorry I didn't post what you expected.
Your image and function name hinted at a true textbox*, something
which I also aimed to make (already wrote it using GDI, but now
needed to recreate it in OpenGL).
*One where the textbox top-left would be the origin to the drawn text,
yourwhich would not allow any drawn text to spill outof/over the box.
Possibly
even including CR,LF awareness.
I did this in the past, by parsing the string to detect CRLFs,
split the string, skip one character_height down (+Y)
and restart at the left of the box (X)
I don't use it anymore since I just display numeric values,
where strings are sprintf'ed at the time the box is drawn.
Uh ... never had that, but I don't clip the box at all.
:-) Thats what I referred to a few messages back: You know how long
\text will be(come) at its maximum, and just draw a big enough rectangle that
the text will always stay "inside" of it.
Yes, that is true.
Another way is to dynamically resize the rectangle of the box
to make it fit by itself to the longest string ( strlen * charwidth )
Implied : use of non-proportional font like ANSI 'Courier' or else.
Works fine too.
I don't use it there since I fixed the longest string length.
Thanks for the help though, I appreciate it.
You're welcome, Rudy.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 293 |
Nodes: | 16 (2 / 14) |
Uptime: | 228:42:34 |
Calls: | 6,624 |
Calls today: | 6 |
Files: | 12,171 |
Messages: | 5,318,995 |