mirror of
https://github.com/ksherlock/TwoTerm.git
synced 2024-12-22 07:30:40 +00:00
mousetext, overstrike, underline.
git-svn-id: svn://qnap.local/TwoTerm/trunk@1997 5590a31f-7b70-45f8-8c82-aa3a8e5f4507
This commit is contained in:
parent
65c45db2dc
commit
c253bec21c
@ -116,7 +116,7 @@
|
||||
//add the scanlines (which are vertical and must therfore be rotated
|
||||
|
||||
filter = [[ScanLineFilter new] autorelease];
|
||||
[filter setValue: [NSNumber numberWithFloat: 0.75] forKey: @"inputOpacity"];
|
||||
[filter setValue: [NSNumber numberWithFloat: 0.66] forKey: @"inputOpacity"];
|
||||
[filters addObject: filter];
|
||||
|
||||
//blur it a bit...
|
||||
@ -237,17 +237,23 @@
|
||||
currentFront = _boldColor;
|
||||
|
||||
|
||||
if (flag & Screen::FlagMouseText)
|
||||
{
|
||||
if (c >= '@' && c <= '_') c |= 0x80;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//img = [_charGen imageForCharacter: c];
|
||||
|
||||
if (flag & Screen::FlagInverse)
|
||||
{
|
||||
std::swap(currentBack, currentFront);
|
||||
|
||||
// mouse text actually requires mouse text and inverse to be on.
|
||||
if (flag & Screen::FlagMouseText)
|
||||
{
|
||||
if (c >= '@' && c <= '_') c |= 0x80;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::swap(currentBack, currentFront);
|
||||
}
|
||||
}
|
||||
|
||||
if (currentBack != _backgroundColor)
|
||||
@ -260,9 +266,30 @@
|
||||
if (_foregroundColor != currentFront) setFront = YES;
|
||||
if (setFront) [currentFront setFill];
|
||||
|
||||
[_charGen drawCharacter: c atPoint: NSMakePoint(_paddingLeft + x * _charWidth, _paddingTop + y * _charHeight)];
|
||||
[_charGen drawCharacter: c
|
||||
atPoint: NSMakePoint(_paddingLeft + x * _charWidth, _paddingTop + y * _charHeight)];
|
||||
|
||||
|
||||
// strikethrough -- draw a centered line.
|
||||
if (flag & Screen::FlagStrike)
|
||||
{
|
||||
|
||||
NSRectFill(NSMakeRect(_paddingLeft + x * _charWidth,
|
||||
_paddingTop + y * _charHeight + floor(_charHeight / 2) - 1,
|
||||
_charWidth,
|
||||
2));
|
||||
}
|
||||
|
||||
// underscore -- draw a bottom line. (eg, ``_'')
|
||||
if (flag & Screen::FlagUnderscore)
|
||||
{
|
||||
NSRectFill(NSMakeRect(_paddingLeft + x * _charWidth,
|
||||
_paddingTop + y * _charHeight + _charHeight - 2,
|
||||
_charWidth,
|
||||
2));
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user