diff mde/font/FontTexture.d @ 98:49e7cfed4b34

All types of Option have been converted to use ValueContent classes, and their values can be displayed.
author Diggory Hardy <diggory.hardy@gmail.com>
date Wed, 12 Nov 2008 13:18:51 +0000
parents 30470bc19ca4
children 0ea4a3e651ae
line wrap: on
line diff
--- a/mde/font/FontTexture.d	Mon Nov 10 16:44:44 2008 +0000
+++ b/mde/font/FontTexture.d	Wed Nov 12 13:18:51 2008 +0000
@@ -229,7 +229,7 @@
         auto g = face.glyph;
         
         // Use renderMode from options, masking bits which are allowable:
-        if (FT_Load_Glyph (face, gi, FT_LOAD_RENDER | (fontOpts.renderMode & 0xF0000)))
+        if (FT_Load_Glyph (face, gi, FT_LOAD_RENDER | (fontOpts.renderMode() & 0xF0000)))
             throw new fontGlyphException ("Unable to render glyph");
         
         auto b = g.bitmap;
@@ -280,7 +280,7 @@
                 buffer[i*b.width + j + 2] = b.buffer[i*b.pitch + j + 2];
             }
             
-            format = (fontOpts.renderMode & RENDER_LCD_BGR) ? GL_BGR : GL_RGB;
+            format = (fontOpts.renderMode() & RENDER_LCD_BGR) ? GL_BGR : GL_RGB;
         } else if (b.pixel_mode == FT_Pixel_Mode.FT_PIXEL_MODE_LCD_V) {
             // NOTE: Notes above apply. But in this case converting the buffers seems essential.
             buffer = new ubyte[b.width*b.rows];
@@ -292,7 +292,7 @@
                 buffer[i/3*b.width*3 + 3*j + i%3] = b.buffer[i*b.pitch + j];
             }
             
-            format = (fontOpts.renderMode & RENDER_LCD_BGR) ? GL_BGR : GL_RGB;
+            format = (fontOpts.renderMode() & RENDER_LCD_BGR) ? GL_BGR : GL_RGB;
         } else
             throw new fontGlyphException ("Unsupported freetype bitmap format");