summaryrefslogtreecommitdiffstats
path: root/src/gui_mac.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2004-12-09 21:34:53 +0000
committerBram Moolenaar <Bram@vim.org>2004-12-09 21:34:53 +0000
commit293ee4d421cd55f4a3c014c1c26edf02f718cc83 (patch)
treeae4856e718b752ea0c6c807912bfbb51967fae80 /src/gui_mac.c
parent741b07e0092eb6d7b81c9cbe149196c6cf9d5bbe (diff)
updated for version 7.0021v7.0021
Diffstat (limited to 'src/gui_mac.c')
-rw-r--r--src/gui_mac.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/src/gui_mac.c b/src/gui_mac.c
index f60567e570..7ad96fc298 100644
--- a/src/gui_mac.c
+++ b/src/gui_mac.c
@@ -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);
}