Mercurial > vim
diff src/gui_mac.c @ 36:125e80798a85 v7.0021
updated for version 7.0021
author | vimboss |
---|---|
date | Thu, 09 Dec 2004 21:34:53 +0000 |
parents | 404aac550f35 |
children | fdf55076c53f |
line wrap: on
line diff
--- a/src/gui_mac.c +++ b/src/gui_mac.c @@ -3792,6 +3792,27 @@ gui_mch_draw_string(row, col, s, len, fl (void)SwapQDTextFlags(qd_flags); } + /* + * When antialiasing we're using srcOr mode, we have to clear the block + * before drawing the text. + * Also needed when 'linespace' is non-zero to remove the cursor and + * underlining. + * But not when drawing transparently. + * The following is like calling gui_mch_clear_block(row, col, row, col + + * len - 1), but without setting the bg color to gui.back_pixel. + */ + if (((sys_version >= 0x1020 && p_antialias) || p_linespace != 0) + && !(flags & DRAW_TRANSP)) + { + Rect rc; + + rc.left = FILL_X(col); + rc.top = FILL_Y(row); + rc.right = FILL_X(col + len) + (col + len == Columns); + rc.bottom = FILL_Y(row + 1); + EraseRect(&rc); + } + if (sys_version >= 0x1020 && p_antialias) { StyleParameter face; @@ -3806,22 +3827,6 @@ gui_mch_draw_string(row, col, s, len, fl /* Quartz antialiasing works only in srcOr transfer mode. */ TextMode(srcOr); - if (!(flags & DRAW_TRANSP)) - { - /* - * Since we're using srcOr mode, we have to clear the block - * before drawing the text. The following is like calling - * gui_mch_clear_block(row, col, row, col + len - 1), - * but without setting the bg color to gui.back_pixel. - */ - Rect rc; - rc.left = FILL_X(col); - rc.top = FILL_Y(row); - rc.right = FILL_X(col + len) + (col + len == Columns); - rc.bottom = FILL_Y(row + 1); - EraseRect(&rc); - } - MoveTo(TEXT_X(col), TEXT_Y(row)); DrawText((char*)s, 0, len); }