mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
updated for version 7.0021
This commit is contained in:
@@ -3792,6 +3792,27 @@ gui_mch_draw_string(row, col, s, len, flags)
|
||||
(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, flags)
|
||||
/* 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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user