gl_draw.cxx 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  1. //
  2. // "$Id: gl_draw.cxx 7903 2010-11-28 21:06:39Z matt $"
  3. //
  4. // OpenGL drawing support routines for the Fast Light Tool Kit (FLTK).
  5. //
  6. // Copyright 1998-2010 by Bill Spitzak and others.
  7. //
  8. // This library is free software; you can redistribute it and/or
  9. // modify it under the terms of the GNU Library General Public
  10. // License as published by the Free Software Foundation; either
  11. // version 2 of the License, or (at your option) any later version.
  12. //
  13. // This library is distributed in the hope that it will be useful,
  14. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. // Library General Public License for more details.
  17. //
  18. // You should have received a copy of the GNU Library General Public
  19. // License along with this library; if not, write to the Free Software
  20. // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  21. // USA.
  22. //
  23. // Please report all bugs and problems on the following page:
  24. //
  25. // http://www.fltk.org/str.php
  26. //
  27. // Functions from <FL/gl.h>
  28. // See also Fl_Gl_Window and gl_start.cxx
  29. #include "flstring.h"
  30. #if HAVE_GL || defined(FL_DOXYGEN)
  31. #include <FL/Fl.H>
  32. #include <FL/gl.h>
  33. #include <FL/x.H>
  34. #include <FL/fl_draw.H>
  35. #include "Fl_Gl_Choice.H"
  36. #include "Fl_Font.H"
  37. #include <FL/fl_utf8.h>
  38. #if !defined(WIN32) && !defined(__APPLE__)
  39. #include <FL/Xutf8.h>
  40. #endif
  41. #if USE_XFT
  42. extern XFontStruct* fl_xxfont();
  43. #endif // USE_XFT
  44. /** Returns the current font's height */
  45. int gl_height() {return fl_height();}
  46. /** Returns the current font's descent */
  47. int gl_descent() {return fl_descent();}
  48. /** Returns the width of the string in the current fnt */
  49. double gl_width(const char* s) {return fl_width(s);}
  50. /** Returns the width of n characters of the string in the current font */
  51. double gl_width(const char* s, int n) {return fl_width(s,n);}
  52. /** Returns the width of the character in the current font */
  53. double gl_width(uchar c) {return fl_width(c);}
  54. static Fl_Font_Descriptor *gl_fontsize;
  55. #define GL_DRAW_USES_TEXTURES (defined(__APPLE__) && !__ppc__) // 1 only for non-PPC OSX
  56. #ifndef __APPLE__
  57. # define USE_OksiD_style_GL_font_selection 1 // Most hosts except OSX
  58. #else
  59. # undef USE_OksiD_style_GL_font_selection // OSX
  60. #endif
  61. #if USE_XFT
  62. # undef USE_OksiD_style_GL_font_selection // turn this off for XFT also
  63. #endif
  64. /**
  65. Sets the current OpenGL font to the same font as calling fl_font()
  66. */
  67. void gl_font(int fontid, int size) {
  68. fl_font(fontid, size);
  69. #if !GL_DRAW_USES_TEXTURES
  70. if (!fl_fontsize->listbase) {
  71. #ifdef USE_OksiD_style_GL_font_selection
  72. fl_fontsize->listbase = glGenLists(0x10000);
  73. #else // Fltk-1.1.8 style GL font selection
  74. #if defined (USE_X11) // X-windows options follow, either XFT or "plain" X
  75. // FIXME: warning Ideally, for XFT, we really need a glXUseXftFont implementation here...
  76. // FIXME: warning GL font selection is basically wrong here
  77. /* OksiD had a fairly sophisticated scheme for storing multiple X fonts in a XUtf8FontStruct,
  78. * then sorting through them at draw time (for normal X rendering) to find which one can
  79. * render the current glyph... But for now, just use the first font in the list for GL...
  80. */
  81. XFontStruct *font = fl_xfont;
  82. int base = font->min_char_or_byte2;
  83. int count = font->max_char_or_byte2-base+1;
  84. fl_fontsize->listbase = glGenLists(256);
  85. glXUseXFont(font->fid, base, count, fl_fontsize->listbase+base);
  86. # elif defined(WIN32)
  87. // this is unused because USE_OksiD_style_GL_font_selection == 1
  88. int base = fl_fontsize->metr.tmFirstChar;
  89. int count = fl_fontsize->metr.tmLastChar-base+1;
  90. HFONT oldFid = (HFONT)SelectObject(fl_gc, fl_fontsize->fid);
  91. fl_fontsize->listbase = glGenLists(256);
  92. wglUseFontBitmaps(fl_gc, base, count, fl_fontsize->listbase+base);
  93. SelectObject(fl_gc, oldFid);
  94. # elif defined(__APPLE_QUARTZ__)
  95. //AGL is not supported for use in 64-bit applications:
  96. //http://developer.apple.com/mac/library/documentation/Carbon/Conceptual/Carbon64BitGuide/OtherAPIChanges/OtherAPIChanges.html
  97. short font, face, size;
  98. uchar fn[256];
  99. fn[0]=strlen(fl_fontsize->q_name);
  100. strcpy((char*)(fn+1), fl_fontsize->q_name);
  101. GetFNum(fn, &font);
  102. face = 0;
  103. size = fl_fontsize->size;
  104. fl_fontsize->listbase = glGenLists(256);
  105. aglUseFont(aglGetCurrentContext(), font, face,
  106. size, 0, 256, fl_fontsize->listbase);
  107. # else
  108. # error unsupported platform
  109. # endif
  110. #endif // USE_OksiD_style_GL_font_selection
  111. }
  112. glListBase(fl_fontsize->listbase);
  113. #endif // !GL_DRAW_USES_TEXTURES
  114. gl_fontsize = fl_fontsize;
  115. }
  116. #ifndef __APPLE__
  117. static void get_list(int r) {
  118. gl_fontsize->glok[r] = 1;
  119. #if defined(USE_X11)
  120. # if USE_XFT
  121. // FIXME
  122. # else
  123. unsigned int ii = r * 0x400;
  124. for (int i = 0; i < 0x400; i++) {
  125. XFontStruct *font = NULL;
  126. unsigned short id;
  127. XGetUtf8FontAndGlyph(gl_fontsize->font, ii, &font, &id);
  128. if (font) glXUseXFont(font->fid, id, 1, gl_fontsize->listbase+ii);
  129. ii++;
  130. }
  131. # endif
  132. #elif defined(WIN32)
  133. unsigned int ii = r * 0x400;
  134. HFONT oldFid = (HFONT)SelectObject(fl_gc, gl_fontsize->fid);
  135. wglUseFontBitmapsW(fl_gc, ii, ii + 0x03ff, gl_fontsize->listbase+ii);
  136. SelectObject(fl_gc, oldFid);
  137. #elif defined(__APPLE_QUARTZ__)
  138. // handled by textures
  139. #else
  140. # error unsupported platform
  141. #endif
  142. } // get_list
  143. #endif
  144. void gl_remove_displaylist_fonts()
  145. {
  146. # if HAVE_GL
  147. // clear variables used mostly in fl_font
  148. fl_font_ = 0;
  149. fl_size_ = 0;
  150. for (int j = 0 ; j < FL_FREE_FONT ; ++j)
  151. {
  152. Fl_Font_Descriptor* past = 0;
  153. Fl_Fontdesc* s = fl_fonts + j ;
  154. Fl_Font_Descriptor* f = s->first;
  155. while (f != 0) {
  156. if(f->listbase) {
  157. if(f == s->first) {
  158. s->first = f->next;
  159. }
  160. else {
  161. past->next = f->next;
  162. }
  163. // It would be nice if this next line was in a desctructor somewhere
  164. glDeleteLists(f->listbase, 256);
  165. Fl_Font_Descriptor* tmp = f;
  166. f = f->next;
  167. delete tmp;
  168. }
  169. else {
  170. past = f;
  171. f = f->next;
  172. }
  173. }
  174. }
  175. #endif
  176. }
  177. #if GL_DRAW_USES_TEXTURES
  178. static void gl_draw_textures(const char* str, int n);
  179. #endif
  180. /**
  181. Draws an array of n characters of the string in the current font
  182. at the current position.
  183. \see On the Mac OS X platform, see gl_texture_pile_height(int)
  184. */
  185. void gl_draw(const char* str, int n) {
  186. #ifdef __APPLE__
  187. #if GL_DRAW_USES_TEXTURES
  188. gl_draw_textures(str, n);
  189. #else
  190. glCallLists(n, GL_UNSIGNED_BYTE, str);
  191. #endif
  192. #else
  193. static xchar *buf = NULL;
  194. static int l = 0;
  195. int wn = fl_utf8toUtf16(str, n, (unsigned short*)buf, l);
  196. if(wn >= l) {
  197. buf = (xchar*) realloc(buf, sizeof(xchar) * (wn + 1));
  198. l = wn + 1;
  199. wn = fl_utf8toUtf16(str, n, (unsigned short*)buf, l);
  200. }
  201. n = wn;
  202. int i;
  203. for (i = 0; i < n; i++) {
  204. unsigned int r;
  205. r = (str[i] & 0xFC00) >> 10;
  206. if (!gl_fontsize->glok[r]) get_list(r);
  207. }
  208. glCallLists(n, GL_UNSIGNED_SHORT, buf);
  209. #endif
  210. }
  211. /**
  212. Draws n characters of the string in the current font at the given position
  213. \see On the Mac OS X platform, see gl_texture_pile_height(int)
  214. */
  215. void gl_draw(const char* str, int n, int x, int y) {
  216. glRasterPos2i(x, y);
  217. gl_draw(str, n);
  218. }
  219. /**
  220. Draws n characters of the string in the current font at the given position
  221. \see On the Mac OS X platform, see gl_texture_pile_height(int)
  222. */
  223. void gl_draw(const char* str, int n, float x, float y) {
  224. glRasterPos2f(x, y);
  225. gl_draw(str, n);
  226. }
  227. /**
  228. Draws a nul-terminated string in the current font at the current position
  229. \see On the Mac OS X platform, see gl_texture_pile_height(int)
  230. */
  231. void gl_draw(const char* str) {
  232. gl_draw(str, strlen(str));
  233. }
  234. /**
  235. Draws a nul-terminated string in the current font at the given position
  236. \see On the Mac OS X platform, see gl_texture_pile_height(int)
  237. */
  238. void gl_draw(const char* str, int x, int y) {
  239. gl_draw(str, strlen(str), x, y);
  240. }
  241. /**
  242. Draws a nul-terminated string in the current font at the given position
  243. \see On the Mac OS X platform, see gl_texture_pile_height(int)
  244. */
  245. void gl_draw(const char* str, float x, float y) {
  246. gl_draw(str, strlen(str), x, y);
  247. }
  248. static void gl_draw_invert(const char* str, int n, int x, int y) {
  249. glRasterPos2i(x, -y);
  250. gl_draw(str, n);
  251. }
  252. /**
  253. Draws a string formatted into a box, with newlines and tabs expanded,
  254. other control characters changed to ^X. and aligned with the edges or
  255. center. Exactly the same output as fl_draw().
  256. */
  257. void gl_draw(
  258. const char* str, // the (multi-line) string
  259. int x, int y, int w, int h, // bounding box
  260. Fl_Align align) {
  261. fl_draw(str, x, -y-h, w, h, align, gl_draw_invert);
  262. }
  263. /** Measure how wide and tall the string will be when drawn by the gl_draw() function */
  264. void gl_measure(const char* str, int& x, int& y) {fl_measure(str,x,y);}
  265. /**
  266. Outlines the given rectangle with the current color.
  267. If Fl_Gl_Window::ortho() has been called, then the rectangle will
  268. exactly fill the given pixel rectangle.
  269. */
  270. void gl_rect(int x, int y, int w, int h) {
  271. if (w < 0) {w = -w; x = x-w;}
  272. if (h < 0) {h = -h; y = y-h;}
  273. glBegin(GL_LINE_STRIP);
  274. glVertex2i(x+w-1, y+h-1);
  275. glVertex2i(x+w-1, y);
  276. glVertex2i(x, y);
  277. glVertex2i(x, y+h-1);
  278. glVertex2i(x+w, y+h-1);
  279. glEnd();
  280. }
  281. #if HAVE_GL_OVERLAY
  282. extern uchar fl_overlay;
  283. extern int fl_overlay_depth;
  284. #endif
  285. /**
  286. Sets the curent OpenGL color to an FLTK color.
  287. For color-index modes it will use fl_xpixel(c), which is only
  288. right if the window uses the default colormap!
  289. */
  290. void gl_color(Fl_Color i) {
  291. #if HAVE_GL_OVERLAY
  292. #if defined(WIN32)
  293. if (fl_overlay && fl_overlay_depth) {
  294. if (fl_overlay_depth < 8) {
  295. // only black & white produce the expected colors. This could
  296. // be improved by fixing the colormap set in Fl_Gl_Overlay.cxx
  297. int size = 1<<fl_overlay_depth;
  298. if (!i) glIndexi(size-2);
  299. else if (i >= size-2) glIndexi(size-1);
  300. else glIndexi(i);
  301. } else {
  302. glIndexi(i ? i : FL_GRAY_RAMP);
  303. }
  304. return;
  305. }
  306. #else
  307. if (fl_overlay) {glIndexi(int(fl_xpixel(i))); return;}
  308. #endif
  309. #endif
  310. uchar red, green, blue;
  311. Fl::get_color(i, red, green, blue);
  312. glColor3ub(red, green, blue);
  313. }
  314. void gl_draw_image(const uchar* b, int x, int y, int w, int h, int d, int ld) {
  315. if (!ld) ld = w*d;
  316. glPixelStorei(GL_UNPACK_ROW_LENGTH, ld/d);
  317. glRasterPos2i(x,y);
  318. glDrawPixels(w,h,d<4?GL_RGB:GL_RGBA,GL_UNSIGNED_BYTE,(const ulong*)b);
  319. }
  320. #if GL_DRAW_USES_TEXTURES || defined(FL_DOXYGEN)
  321. #include <FL/glu.h>
  322. // manages a fifo pile of pre-computed string textures
  323. class gl_texture_fifo {
  324. friend void gl_draw_textures(const char *, int);
  325. private:
  326. typedef struct { // information for a pre-computed texture
  327. GLuint texName; // its name
  328. char *utf8; //its text
  329. Fl_Font_Descriptor *fdesc; // its font
  330. int width; // its width
  331. int height; // its height
  332. } data;
  333. data *fifo; // array of pile elements
  334. int size_; // pile height
  335. int current; // the oldest texture to have entered the pile
  336. int last; // pile top
  337. int textures_generated; // true iff glGenTextures has been called
  338. void display_texture(int rank);
  339. int compute_texture(const char* str, int n);
  340. int already_known(const char *str, int n);
  341. public:
  342. gl_texture_fifo(int max = 100); // 100 = default height of texture pile
  343. inline int size(void) {return size_; };
  344. ~gl_texture_fifo(void);
  345. };
  346. gl_texture_fifo::gl_texture_fifo(int max)
  347. {
  348. size_ = max;
  349. last = current = -1;
  350. textures_generated = 0;
  351. fifo = (data*)calloc(size_, sizeof(data));
  352. }
  353. gl_texture_fifo::~gl_texture_fifo()
  354. {
  355. for (int i = 0; i < size_; i++) {
  356. if (fifo[i].utf8) free(fifo[i].utf8);
  357. if (textures_generated) glDeleteTextures(1, &fifo[i].texName);
  358. }
  359. free(fifo);
  360. }
  361. // displays a pre-computed texture on the GL scene
  362. void gl_texture_fifo::display_texture(int rank)
  363. {
  364. //setup matrices
  365. GLint matrixMode;
  366. glGetIntegerv (GL_MATRIX_MODE, &matrixMode);
  367. glMatrixMode (GL_PROJECTION);
  368. glPushMatrix();
  369. glLoadIdentity ();
  370. glMatrixMode (GL_MODELVIEW);
  371. glPushMatrix();
  372. glLoadIdentity ();
  373. float winw = Fl_Window::current()->w();
  374. float winh = Fl_Window::current()->h();
  375. glScalef (2.0f / winw, 2.0f / winh, 1.0f);
  376. glTranslatef (-winw / 2.0f, -winh / 2.0f, 0.0f);
  377. //write the texture on screen
  378. GLfloat pos[4];
  379. glGetFloatv(GL_CURRENT_RASTER_POSITION, pos);
  380. CGRect bounds = CGRectMake (pos[0], pos[1] - fl_descent(), fifo[rank].width, fifo[rank].height);
  381. // GL_COLOR_BUFFER_BIT for glBlendFunc, GL_ENABLE_BIT for glEnable / glDisable
  382. glPushAttrib(GL_ENABLE_BIT | GL_TEXTURE_BIT | GL_COLOR_BUFFER_BIT);
  383. glDisable (GL_DEPTH_TEST); // ensure text is not removed by depth buffer test.
  384. glEnable (GL_BLEND); // for text fading
  385. glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA); // ditto
  386. glEnable (GL_TEXTURE_RECTANGLE_EXT);
  387. glDisable(GL_LIGHTING);
  388. glBindTexture (GL_TEXTURE_RECTANGLE_EXT, fifo[rank].texName);
  389. glBegin (GL_QUADS);
  390. glTexCoord2f (0.0f, 0.0f); // draw lower left in world coordinates
  391. glVertex2f (bounds.origin.x, bounds.origin.y);
  392. glTexCoord2f (0.0f, fifo[rank].height); // draw upper left in world coordinates
  393. glVertex2f (bounds.origin.x, bounds.origin.y + bounds.size.height);
  394. glTexCoord2f (fifo[rank].width, fifo[rank].height); // draw upper right in world coordinates
  395. glVertex2f (bounds.origin.x + bounds.size.width, bounds.origin.y + bounds.size.height);
  396. glTexCoord2f (fifo[rank].width, 0.0f); // draw lower right in world coordinates
  397. glVertex2f (bounds.origin.x + bounds.size.width, bounds.origin.y);
  398. glEnd ();
  399. glPopAttrib();
  400. // reset original matrices
  401. glPopMatrix(); // GL_MODELVIEW
  402. glMatrixMode (GL_PROJECTION);
  403. glPopMatrix();
  404. glMatrixMode (matrixMode);
  405. //set the raster position to end of string
  406. pos[0] += fifo[rank].width;
  407. GLdouble modelmat[16];
  408. glGetDoublev (GL_MODELVIEW_MATRIX, modelmat);
  409. GLdouble projmat[16];
  410. glGetDoublev (GL_PROJECTION_MATRIX, projmat);
  411. GLdouble objX, objY, objZ;
  412. GLint viewport[4];
  413. glGetIntegerv (GL_VIEWPORT, viewport);
  414. gluUnProject(pos[0], pos[1], pos[2], modelmat, projmat, viewport, &objX, &objY, &objZ);
  415. glRasterPos2d(objX, objY);
  416. }
  417. // pre-computes a string texture
  418. int gl_texture_fifo::compute_texture(const char* str, int n)
  419. {
  420. current = (current + 1) % size_;
  421. if (current > last) last = current;
  422. //write str to a bitmap just big enough
  423. if ( fifo[current].utf8 ) free(fifo[current].utf8);
  424. fifo[current].utf8 = (char *)malloc(n + 1);
  425. memcpy(fifo[current].utf8, str, n);
  426. fifo[current].utf8[n] = 0;
  427. fifo[current].width = 0, fifo[current].height = 0;
  428. fl_measure(fifo[current].utf8, fifo[current].width, fifo[current].height, 0);
  429. CGColorSpaceRef lut = CGColorSpaceCreateDeviceRGB();
  430. void *base = calloc(4*fifo[current].width, fifo[current].height);
  431. if (base == NULL) return -1;
  432. fl_gc = CGBitmapContextCreate(base, fifo[current].width, fifo[current].height, 8, fifo[current].width*4, lut, kCGImageAlphaPremultipliedLast);
  433. CGColorSpaceRelease(lut);
  434. fl_fontsize = gl_fontsize;
  435. GLfloat colors[4];
  436. glGetFloatv(GL_CURRENT_COLOR, colors);
  437. fl_color(colors[0]*255, colors[1]*255, colors[2]*255);
  438. fl_draw(str, n, 0, fifo[current].height - fl_descent());
  439. //put this bitmap in a texture
  440. glPushAttrib(GL_TEXTURE_BIT);
  441. glBindTexture (GL_TEXTURE_RECTANGLE_EXT, fifo[current].texName);
  442. glTexParameteri(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
  443. glTexParameteri(GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
  444. glTexImage2D(GL_TEXTURE_RECTANGLE_EXT, 0, GL_RGBA, fifo[current].width, fifo[current].height, 0, GL_RGBA, GL_UNSIGNED_BYTE, base);
  445. glPopAttrib();
  446. CGContextRelease(fl_gc);
  447. fl_gc = NULL;
  448. free(base);
  449. fifo[current].fdesc = gl_fontsize;
  450. return current;
  451. }
  452. // returns rank of pre-computed texture for a string if it exists
  453. int gl_texture_fifo::already_known(const char *str, int n)
  454. {
  455. int rank;
  456. for ( rank = 0; rank <= last; rank++) {
  457. if ( memcmp(str, fifo[rank].utf8, n) == 0 && fifo[rank].utf8[n] == 0 &&
  458. fifo[rank].fdesc == gl_fontsize) return rank;
  459. }
  460. return -1;
  461. }
  462. static gl_texture_fifo *gl_fifo = NULL; // points to the texture pile class instance
  463. // draws a utf8 string using pre-computed texture if available
  464. static void gl_draw_textures(const char* str, int n)
  465. {
  466. if (! gl_fifo) gl_fifo = new gl_texture_fifo();
  467. if (!gl_fifo->textures_generated) {
  468. for (int i = 0; i < gl_fifo->size_; i++) glGenTextures (1, &(gl_fifo->fifo[i].texName));
  469. gl_fifo->textures_generated = 1;
  470. }
  471. int rank = gl_fifo->already_known(str, n);
  472. if (rank == -1) {
  473. rank = gl_fifo->compute_texture(str, n);
  474. }
  475. gl_fifo->display_texture(rank);
  476. }
  477. /** \addtogroup group_macosx
  478. @{ */
  479. /**
  480. \brief Returns the current height of the pile of pre-computed string textures
  481. *
  482. The default value is 100
  483. */
  484. int gl_texture_pile_height(void)
  485. {
  486. if (! gl_fifo) gl_fifo = new gl_texture_fifo();
  487. return gl_fifo->size();
  488. }
  489. /**
  490. \brief Changes the height of the pile of pre-computed string textures
  491. *
  492. Strings that are often re-displayed can be processed much faster if
  493. this pile is set high enough to hold all of them.
  494. \param max Height of the texture pile
  495. */
  496. void gl_texture_pile_height(int max)
  497. {
  498. if (gl_fifo) delete gl_fifo;
  499. gl_fifo = new gl_texture_fifo(max);
  500. }
  501. /** @} */
  502. #endif // GL_DRAW_USES_TEXTURES
  503. #endif // HAVE_GL
  504. //
  505. // End of "$Id: gl_draw.cxx 7903 2010-11-28 21:06:39Z matt $".
  506. //