comparison mde/font/FontTexture.d @ 94:9520cc0448e5

Boolean options are now encapsulated within a Content class (currently an experiment). This should facilitate generic option editing widgets.
author Diggory Hardy <diggory.hardy@gmail.com>
date Thu, 23 Oct 2008 17:45:49 +0100
parents 97e6dce08037
children dbf332403c6e
comparison
equal deleted inserted replaced
93:08a4ae11454b 94:9520cc0448e5
431 int nextYPos = 0; // y position for next created line (0 for first line) 431 int nextYPos = 0; // y position for next created line (0 for first line)
432 } 432 }
433 433
434 // this bit of renderMode, if set, means read glyph as BGR not RGB when using LCD rendering 434 // this bit of renderMode, if set, means read glyph as BGR not RGB when using LCD rendering
435 enum { RENDER_LCD_BGR = 1 << 30 } 435 enum { RENDER_LCD_BGR = 1 << 30 }
436 OptionsFont fontOpts; 436 FontOptions fontOpts;
437 class OptionsFont : Options { 437 class FontOptions : Options {
438 /* renderMode have one of the following values, possibly with bit 31 set (see RENDER_LCD_BGR): 438 /* renderMode have one of the following values, possibly with bit 31 set (see RENDER_LCD_BGR):
439 * FT_LOAD_TARGET_NORMAL (0x00000) 439 * FT_LOAD_TARGET_NORMAL (0x00000)
440 * FT_LOAD_TARGET_LIGHT (0x10000) 440 * FT_LOAD_TARGET_LIGHT (0x10000)
441 * FT_LOAD_TARGET_LCD (0x30000) 441 * FT_LOAD_TARGET_LCD (0x30000)
442 * FT_LOAD_TARGET_LCD_V (0x40000) 442 * FT_LOAD_TARGET_LCD_V (0x40000)
445 * lcdFilter should come from enum FT_LcdFilter: 445 * lcdFilter should come from enum FT_LcdFilter:
446 * FT_LCD_FILTER_NONE (0), FT_LCD_FILTER_DEFAULT (1), FT_LCD_FILTER_LIGHT (2) */ 446 * FT_LCD_FILTER_NONE (0), FT_LCD_FILTER_DEFAULT (1), FT_LCD_FILTER_LIGHT (2) */
447 mixin (impl!("int renderMode, lcdFilter;")); 447 mixin (impl!("int renderMode, lcdFilter;"));
448 448
449 static this() { 449 static this() {
450 fontOpts = new OptionsFont; 450 fontOpts = new FontOptions;
451 Options.addOptionsClass (fontOpts, "font"); 451 Options.addOptionsClass (fontOpts, "FontOptions");
452 } 452 }
453 } 453 }
454 454
455 struct GlyphAttribs { 455 struct GlyphAttribs {
456 int x, y; // position within texture 456 int x, y; // position within texture