Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
35:8f3a526c2fe1 | 36:125e80798a85 |
---|---|
3790 UInt32 qd_flags = (p_antialias ? | 3790 UInt32 qd_flags = (p_antialias ? |
3791 kQDUseCGTextRendering | kQDUseCGTextMetrics : 0); | 3791 kQDUseCGTextRendering | kQDUseCGTextMetrics : 0); |
3792 (void)SwapQDTextFlags(qd_flags); | 3792 (void)SwapQDTextFlags(qd_flags); |
3793 } | 3793 } |
3794 | 3794 |
3795 /* | |
3796 * When antialiasing we're using srcOr mode, we have to clear the block | |
3797 * before drawing the text. | |
3798 * Also needed when 'linespace' is non-zero to remove the cursor and | |
3799 * underlining. | |
3800 * But not when drawing transparently. | |
3801 * The following is like calling gui_mch_clear_block(row, col, row, col + | |
3802 * len - 1), but without setting the bg color to gui.back_pixel. | |
3803 */ | |
3804 if (((sys_version >= 0x1020 && p_antialias) || p_linespace != 0) | |
3805 && !(flags & DRAW_TRANSP)) | |
3806 { | |
3807 Rect rc; | |
3808 | |
3809 rc.left = FILL_X(col); | |
3810 rc.top = FILL_Y(row); | |
3811 rc.right = FILL_X(col + len) + (col + len == Columns); | |
3812 rc.bottom = FILL_Y(row + 1); | |
3813 EraseRect(&rc); | |
3814 } | |
3815 | |
3795 if (sys_version >= 0x1020 && p_antialias) | 3816 if (sys_version >= 0x1020 && p_antialias) |
3796 { | 3817 { |
3797 StyleParameter face; | 3818 StyleParameter face; |
3798 | 3819 |
3799 face = normal; | 3820 face = normal; |
3803 face |= underline; | 3824 face |= underline; |
3804 TextFace(face); | 3825 TextFace(face); |
3805 | 3826 |
3806 /* Quartz antialiasing works only in srcOr transfer mode. */ | 3827 /* Quartz antialiasing works only in srcOr transfer mode. */ |
3807 TextMode(srcOr); | 3828 TextMode(srcOr); |
3808 | |
3809 if (!(flags & DRAW_TRANSP)) | |
3810 { | |
3811 /* | |
3812 * Since we're using srcOr mode, we have to clear the block | |
3813 * before drawing the text. The following is like calling | |
3814 * gui_mch_clear_block(row, col, row, col + len - 1), | |
3815 * but without setting the bg color to gui.back_pixel. | |
3816 */ | |
3817 Rect rc; | |
3818 rc.left = FILL_X(col); | |
3819 rc.top = FILL_Y(row); | |
3820 rc.right = FILL_X(col + len) + (col + len == Columns); | |
3821 rc.bottom = FILL_Y(row + 1); | |
3822 EraseRect(&rc); | |
3823 } | |
3824 | 3829 |
3825 MoveTo(TEXT_X(col), TEXT_Y(row)); | 3830 MoveTo(TEXT_X(col), TEXT_Y(row)); |
3826 DrawText((char*)s, 0, len); | 3831 DrawText((char*)s, 0, len); |
3827 } | 3832 } |
3828 else | 3833 else |