Changeset 203:8313535d74fa

Show
Ignore:
Timestamp:
04/13/08 20:07:22 (6 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

Fix bug in FontMetrics?, must be value type to hold values not by ref.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/graphics/Font.d

    r197 r203  
    204204public FontData[] getFontData() { 
    205205    if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); 
    206     LOGFONT* logFont = new LOGFONT();; 
     206    LOGFONT* logFont = new LOGFONT(); 
    207207    OS.GetObject(handle, LOGFONT.sizeof, logFont); 
    208208    return [ cast(FontData) FontData.win32_new(logFont, device.computePoints(logFont, handle))]; 
  • dwt/graphics/FontMetrics.d

    r48 r203  
    3939     * </p> 
    4040     */ 
    41     public TEXTMETRIC* handle; 
     41    public TEXTMETRIC handle; 
    4242 
    4343/** 
     
    180180public static FontMetrics win32_new(TEXTMETRIC* handle) { 
    181181    FontMetrics fontMetrics = new FontMetrics(); 
    182     fontMetrics.handle = handle; 
     182    fontMetrics.handle = *handle; 
    183183    return fontMetrics; 
    184184}