Changeset 16:0bee9065699b

Show
Ignore:
Timestamp:
01/25/08 13:45:34 (10 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

some corrections

Files:

Legend:

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

    r11 r16  
    1515 
    1616import dwt.graphics.GCData; 
     17import dwt.internal.win32.WINTYPES; 
    1718 
    1819/** 
     
    4849 */ 
    4950 
    50 public int /*long*/ internal_new_GC (GCData data); 
     51public HDC internal_new_GC (GCData data); 
    5152 
    5253/** 
     
    6364 * @param data the platform specific GC data 
    6465 */ 
    65 public void internal_dispose_GC ( int /*long*/ handle, GCData data); 
     66public void internal_dispose_GC ( HDC handle, GCData data); 
    6667 
    6768} 
  • dwt/graphics/FontMetrics.d

    r8 r16  
    3737     * </p> 
    3838     */ 
    39     public TEXTMETRIC handle; 
     39    public TEXTMETRIC* handle; 
    4040     
    4141/** 
     
    5858    if (object is this) return true; 
    5959    if( auto metricObj = cast(FontMetrics)object ){ 
    60         TEXTMETRIC metric = metricObj.handle; 
     60        auto metric = metricObj.handle; 
    6161        return handle.tmHeight is metric.tmHeight && 
    6262            handle.tmAscent is metric.tmAscent && 
     
    176176 * @return a new font metrics object containing the specified <code>TEXTMETRIC</code> 
    177177 */ 
    178 public static FontMetrics win32_new(TEXTMETRIC handle) { 
     178public static FontMetrics win32_new(TEXTMETRIC* handle) { 
    179179    FontMetrics fontMetrics = new FontMetrics(); 
    180180    fontMetrics.handle = handle; 
  • dwt/graphics/PaletteData.d

    r9 r16  
    153153    } else { 
    154154        for (int i = 0; i < colors.length; i++) { 
    155             if (colors[i] is rgb ) return i; 
     155            if (colors[i] ==/*eq*/ rgb ) return i; 
    156156        } 
    157157        /* The RGB did not exist in the palette */ 
  • dwt/graphics/RGB.d

    r6 r16  
    104104    } 
    105105    float r, g, b; 
    106     if (saturation == 0) { 
     106    if (saturation is 0) { 
    107107        r = g = b = brightness; 
    108108    } else { 
    109         if (hue == 360) hue = 0; 
     109        if (hue is 360) hue = 0; 
    110110        hue /= 60; 
    111111        int i = cast(int)hue; 
     
    169169    float hue = 0; 
    170170    float brightness = max; 
    171     float saturation = max == 0 ? 0 : (max - min) / max; 
    172     if (delta != 0) { 
    173         if (r == max) { 
     171    float saturation = max is 0 ? 0 : (max - min) / max; 
     172    if (delta !is 0) { 
     173        if (r is max) { 
    174174            hue = (g  - b) / delta; 
    175175        } else { 
    176             if (g == max) { 
     176            if (g is max) { 
    177177                hue = 2 + (b - r) / delta; 
    178178            } else { 
     
    199199    if (object is this) return true; 
    200200    if( auto rgb = cast(RGB) object ){ 
    201         return (rgb.red == this.red) && (rgb.green == this.green) && (rgb.blue == this.blue); 
     201        return (rgb.red is this.red) && (rgb.green is this.green) && (rgb.blue is this.blue); 
    202202    } 
    203203    return false;