Show
Ignore:
Timestamp:
05/04/08 18:42:55 (4 years ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

reverted char[] to String

Files:

Legend:

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

    r202 r238  
    185185} 
    186186 
    187 static void addCairoString(cairo_t* cairo, char[] str, float x, float y, Font font) { 
     187static void addCairoString(cairo_t* cairo, String str, float x, float y, Font font) { 
    188188    char* buffer = toStringz( str ); 
    189189    if (OS.GTK_VERSION >= OS.buildVERSION(2, 8, 0)) { 
     
    377377        if (dashes !is null) { 
    378378            if ((state & LINE_STYLE) !is 0) { 
    379                 char[] dash_list = new char[dashes.length]; 
     379                String dash_list = new char[dashes.length]; 
    380380                for (int i = 0; i < dash_list.length; i++) { 
    381381                    dash_list[i] = cast(char)(width is 0 || data.lineStyle is DWT.LINE_CUSTOM ? dashes[i] : dashes[i] * width); 
     
    10171017            int newHeight = srcY + srcHeight; 
    10181018            int bytesPerLine = (newWidth + 7) / 8; 
    1019             char[] maskData = new char[bytesPerLine * newHeight]; 
     1019            String maskData = new char[bytesPerLine * newHeight]; 
    10201020            auto mask = cast(GdkDrawable *) OS.gdk_bitmap_create_from_data(null, maskData.ptr, newWidth, newHeight); 
    10211021            if (mask !is null) { 
     
    15161516 * </ul> 
    15171517 */ 
    1518 public void drawString (char[] str, int x, int y) { 
     1518public void drawString (String str, int x, int y) { 
    15191519    drawString(str, x, y, false); 
    15201520} 
     
    15391539 * </ul> 
    15401540 */ 
    1541 public void drawString(char[] str, int x, int y, bool isTransparent) { 
     1541public void drawString(String str, int x, int y, bool isTransparent) { 
    15421542    drawText(str, x, y, isTransparent ? DWT.DRAW_TRANSPARENT : 0); 
    15431543} 
     
    15611561 * </ul> 
    15621562 */ 
    1563 public void drawText(char[] str, int x, int y) { 
     1563public void drawText(String str, int x, int y) { 
    15641564    drawText(str, x, y, DWT.DRAW_DELIMITER | DWT.DRAW_TAB); 
    15651565} 
     
    15851585 * </ul> 
    15861586 */ 
    1587 public void drawText(char[] str, int x, int y, bool isTransparent) { 
     1587public void drawText(String str, int x, int y, bool isTransparent) { 
    15881588    int flags = DWT.DRAW_DELIMITER | DWT.DRAW_TAB; 
    15891589    if (isTransparent) flags |= DWT.DRAW_TRANSPARENT; 
     
    16251625 * </ul> 
    16261626 */ 
    1627 public void drawText (char[] str, int x, int y, int flags) { 
     1627public void drawText (String str, int x, int y, int flags) { 
    16281628    if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); 
    16291629    if (str is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); 
     
    30563056    auto family = OS.pango_font_description_get_family(font); 
    30573057    int len = /*OS.*/strlen(family); 
    3058     char[] buffer = new char[len + 1]; 
     3058    String buffer = new char[len + 1]; 
    30593059    memmove(buffer.ptr, family, len); 
    30603060    //TODO - convert font height from pango to cairo 
     
    36893689} 
    36903690 
    3691 void setString(char[] str, int flags) { 
     3691void setString(String str, int flags) { 
    36923692    if (data.layout is null) createLayout(); 
    36933693    if (str is data.str && (flags & ~DWT.DRAW_TRANSPARENT) is (data.drawFlags  & ~DWT.DRAW_TRANSPARENT)) { 
    36943694        return; 
    36953695    } 
    3696     char[] buffer; 
     3696    String buffer; 
    36973697    int mnemonic, len = str.length ; 
    36983698    auto layout = data.layout; 
     
    38653865 * </ul> 
    38663866 */ 
    3867 public Point stringExtent(char[] str) { 
     3867public Point stringExtent(String str) { 
    38683868    return textExtent(str, 0); 
    38693869} 
     
    38883888 * </ul> 
    38893889 */ 
    3890 public Point textExtent(char[] str) { 
     3890public Point textExtent(String str) { 
    38913891    return textExtent(str, DWT.DRAW_DELIMITER | DWT.DRAW_TAB); 
    38923892} 
     
    39233923 * </ul> 
    39243924 */ 
    3925 public Point textExtent(char[] str, int flags) { 
     3925public Point textExtent(String str, int flags) { 
    39263926    if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); 
    39273927    if (str is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); 
     
    39533953 * @return a str representation of the receiver 
    39543954 */ 
    3955 public override char[] toString () { 
     3955public override String toString () { 
    39563956    if (isDisposed()) return "GC {*DISPOSED*}"; 
    39573957    return Format( "GC {{{}}", handle );