mirror of
https://github.com/ksherlock/TwoTerm.git
synced 2025-01-02 16:31:38 +00:00
merge updated effects.
git-svn-id: svn://qnap.local/TwoTerm/trunk@3146 5590a31f-7b70-45f8-8c82-aa3a8e5f4507
This commit is contained in:
parent
e1cf110542
commit
1fec3f120c
@ -165,6 +165,7 @@
|
|||||||
B68E632912FF909C00EAFF5F /* ExampleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExampleView.m; sourceTree = "<group>"; };
|
B68E632912FF909C00EAFF5F /* ExampleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExampleView.m; sourceTree = "<group>"; };
|
||||||
B6C173901D31D2B80024E360 /* GSOSConsole.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GSOSConsole.h; sourceTree = "<group>"; };
|
B6C173901D31D2B80024E360 /* GSOSConsole.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GSOSConsole.h; sourceTree = "<group>"; };
|
||||||
B6C173911D31D2B80024E360 /* GSOSConsole.mm.ragel */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GSOSConsole.mm.ragel; sourceTree = "<group>"; };
|
B6C173911D31D2B80024E360 /* GSOSConsole.mm.ragel */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GSOSConsole.mm.ragel; sourceTree = "<group>"; };
|
||||||
|
B6C173941D35546A0024E360 /* algorithm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = algorithm.h; sourceTree = "<group>"; };
|
||||||
B6C704EC15CCC64100CC0401 /* titlebar-center@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "titlebar-center@2x.png"; sourceTree = "<group>"; };
|
B6C704EC15CCC64100CC0401 /* titlebar-center@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "titlebar-center@2x.png"; sourceTree = "<group>"; };
|
||||||
B6C704ED15CCC64100CC0401 /* titlebar-left@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "titlebar-left@2x.png"; sourceTree = "<group>"; };
|
B6C704ED15CCC64100CC0401 /* titlebar-left@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "titlebar-left@2x.png"; sourceTree = "<group>"; };
|
||||||
B6C704EE15CCC64100CC0401 /* titlebar-right@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "titlebar-right@2x.png"; sourceTree = "<group>"; };
|
B6C704EE15CCC64100CC0401 /* titlebar-right@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "titlebar-right@2x.png"; sourceTree = "<group>"; };
|
||||||
@ -285,6 +286,7 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
B612F44712DD5DAD005D1B77 /* iGeometry.cpp */,
|
B612F44712DD5DAD005D1B77 /* iGeometry.cpp */,
|
||||||
|
B6C173941D35546A0024E360 /* algorithm.h */,
|
||||||
B612F44812DD5DAD005D1B77 /* iGeometry.h */,
|
B612F44812DD5DAD005D1B77 /* iGeometry.h */,
|
||||||
B612F44912DD5DAD005D1B77 /* Lock.cpp */,
|
B612F44912DD5DAD005D1B77 /* Lock.cpp */,
|
||||||
B612F44A12DD5DAD005D1B77 /* Lock.h */,
|
B612F44A12DD5DAD005D1B77 /* Lock.h */,
|
||||||
@ -392,7 +394,7 @@
|
|||||||
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastUpgradeCheck = 0730;
|
LastUpgradeCheck = 0800;
|
||||||
};
|
};
|
||||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "2Term" */;
|
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "2Term" */;
|
||||||
compatibilityVersion = "Xcode 3.2";
|
compatibilityVersion = "Xcode 3.2";
|
||||||
@ -547,7 +549,7 @@
|
|||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
GCC_MODEL_TUNING = G5;
|
GCC_MODEL_TUNING = G5;
|
||||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||||
GCC_PREFIX_HEADER = _Term_Prefix.pch;
|
GCC_PREFIX_HEADER = TwoTerm_Prefix.pch;
|
||||||
INFOPLIST_FILE = Info.plist;
|
INFOPLIST_FILE = Info.plist;
|
||||||
INSTALL_PATH = "$(HOME)/Applications";
|
INSTALL_PATH = "$(HOME)/Applications";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "com.ksherlock.${PRODUCT_NAME:rfc1034identifier}";
|
PRODUCT_BUNDLE_IDENTIFIER = "com.ksherlock.${PRODUCT_NAME:rfc1034identifier}";
|
||||||
@ -558,13 +560,16 @@
|
|||||||
C01FCF4F08A954540054247B /* Debug */ = {
|
C01FCF4F08A954540054247B /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
@ -588,13 +593,16 @@
|
|||||||
C01FCF5008A954540054247B /* Release */ = {
|
C01FCF5008A954540054247B /* Release */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
@ -6,6 +6,13 @@
|
|||||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
/*
|
||||||
|
* See Apple IIe Tech Ref page 273.
|
||||||
|
* See Apple IIgs Firmware Reference page 77
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
#import "Apple80.h"
|
#import "Apple80.h"
|
||||||
|
|
||||||
#include <sys/ttydefaults.h>
|
#include <sys/ttydefaults.h>
|
||||||
@ -130,9 +137,17 @@ enum {
|
|||||||
screen->setFlagBit(Screen::FlagInverse);
|
screen->setFlagBit(Screen::FlagInverse);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CTRL('Q'):
|
||||||
|
// 40 column mode.
|
||||||
|
break;
|
||||||
|
|
||||||
case CTRL('R'):
|
case CTRL('R'):
|
||||||
// 80 column mode
|
// 80 column mode
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CTRL('S'):
|
||||||
|
// stop listing until another key pressed.
|
||||||
|
break;
|
||||||
|
|
||||||
case CTRL('U'):
|
case CTRL('U'):
|
||||||
// deactivate 80 column firmware
|
// deactivate 80 column firmware
|
||||||
@ -157,11 +172,16 @@ enum {
|
|||||||
// cursor home
|
// cursor home
|
||||||
screen->setCursor(0, 0, true, true);
|
screen->setCursor(0, 0, true, true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CTRL('Z'):
|
case CTRL('Z'):
|
||||||
// clear entire line
|
// clear entire line
|
||||||
screen->erase(Screen::EraseLineAll);
|
screen->erase(Screen::EraseLineAll);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CTRL('['):
|
||||||
|
// mouse text on
|
||||||
|
screen->setFlagBit(Screen::FlagMouseText);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case CTRL('\\'):
|
case CTRL('\\'):
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -33,19 +33,21 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@property (nonatomic, retain) IBOutlet ExampleView *exampleView;
|
@property (nonatomic, assign) IBOutlet ExampleView *exampleView;
|
||||||
|
|
||||||
@property (nonatomic, retain) IBOutlet NSPopUpButton *terminalTypeButton;
|
@property (nonatomic, assign) IBOutlet NSPopUpButton *terminalTypeButton;
|
||||||
@property (nonatomic, retain) IBOutlet NSPopUpButton *colorSchemeButton;
|
@property (nonatomic, assign) IBOutlet NSPopUpButton *colorSchemeButton;
|
||||||
|
|
||||||
|
|
||||||
@property (nonatomic, retain) IBOutlet NSColorWell *foregroundColorControl;
|
@property (nonatomic, assign) IBOutlet NSColorWell *foregroundColorControl;
|
||||||
@property (nonatomic, retain) IBOutlet NSColorWell *backgroundColorControl;
|
@property (nonatomic, assign) IBOutlet NSColorWell *backgroundColorControl;
|
||||||
|
|
||||||
@property (nonatomic, retain) IBOutlet NSButton *effectsButton;
|
@property (nonatomic, assign) IBOutlet NSButton *effectsButton;
|
||||||
@property (nonatomic, retain) IBOutlet NSSlider *blurSlider;
|
@property (nonatomic, assign) IBOutlet NSSlider *blurSlider;
|
||||||
@property (nonatomic, retain) IBOutlet NSSlider *lightenSlider;
|
@property (nonatomic, assign) IBOutlet NSSlider *lightenSlider;
|
||||||
@property (nonatomic, retain) IBOutlet NSSlider *darkenSlider;
|
@property (nonatomic, assign) IBOutlet NSSlider *darkenSlider;
|
||||||
|
@property (nonatomic, assign) IBOutlet NSSlider *bloomSlider;
|
||||||
|
@property (nonatomic, assign) IBOutlet NSSlider *vignetteSlider;
|
||||||
|
|
||||||
@property (nonatomic, assign) BOOL effectsEnabled;
|
@property (nonatomic, assign) BOOL effectsEnabled;
|
||||||
|
|
||||||
@ -61,4 +63,6 @@
|
|||||||
|
|
||||||
-(NSMenu *)colorMenu;
|
-(NSMenu *)colorMenu;
|
||||||
|
|
||||||
|
-(NSColor *)recalcBackground;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
@synthesize lightenSlider = _lightenSlider;
|
@synthesize lightenSlider = _lightenSlider;
|
||||||
@synthesize darkenSlider = _darkenSlider;
|
@synthesize darkenSlider = _darkenSlider;
|
||||||
|
|
||||||
|
|
||||||
@synthesize effectsEnabled = _effectsEnabled;
|
@synthesize effectsEnabled = _effectsEnabled;
|
||||||
// colors
|
// colors
|
||||||
enum {
|
enum {
|
||||||
@ -46,21 +47,6 @@ enum {
|
|||||||
- (void)dealloc {
|
- (void)dealloc {
|
||||||
// Clean-up code here.
|
// Clean-up code here.
|
||||||
|
|
||||||
[_terminalTypeButton release];
|
|
||||||
[_colorSchemeButton release];
|
|
||||||
|
|
||||||
|
|
||||||
[_foregroundColorControl release];
|
|
||||||
[_backgroundColorControl release];
|
|
||||||
|
|
||||||
|
|
||||||
[_effectsButton release];
|
|
||||||
[_blurSlider release];
|
|
||||||
[_lightenSlider release];
|
|
||||||
[_darkenSlider release];
|
|
||||||
|
|
||||||
[_exampleView release];
|
|
||||||
|
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,7 +130,7 @@ enum {
|
|||||||
|
|
||||||
[userInfo setObject: klass forKey: kClass];
|
[userInfo setObject: klass forKey: kClass];
|
||||||
[userInfo setObject: [_foregroundColorControl color] forKey: kForegroundColor];
|
[userInfo setObject: [_foregroundColorControl color] forKey: kForegroundColor];
|
||||||
[userInfo setObject: [_backgroundColorControl color] forKey: kBackgroundColor];
|
[userInfo setObject: [self recalcBackground] forKey: kBackgroundColor];
|
||||||
|
|
||||||
if (_effectsEnabled)
|
if (_effectsEnabled)
|
||||||
{
|
{
|
||||||
@ -204,19 +190,24 @@ enum {
|
|||||||
{
|
{
|
||||||
|
|
||||||
[_exampleView setForegroundColor: [_foregroundColorControl color]];
|
[_exampleView setForegroundColor: [_foregroundColorControl color]];
|
||||||
[_exampleView setColor: [_backgroundColorControl color]];
|
[_exampleView setColor: [self recalcBackground]];
|
||||||
|
|
||||||
if (_effectsEnabled)
|
if (_effectsEnabled)
|
||||||
{
|
{
|
||||||
[_exampleView setBlur: [_blurSlider floatValue]];
|
[_exampleView setBlur: [_blurSlider floatValue]];
|
||||||
[_exampleView setLighten: [_lightenSlider floatValue]];
|
//[_exampleView setLighten: [_lightenSlider floatValue]];
|
||||||
[_exampleView setDarken: [_darkenSlider floatValue]];
|
[_exampleView setDarken: [_darkenSlider floatValue]];
|
||||||
|
[_exampleView setBloom: [_bloomSlider floatValue]];
|
||||||
|
[_exampleView setVignette: [_vignetteSlider floatValue]];
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[_exampleView setBlur: 0.0];
|
[_exampleView setBlur: 0.0];
|
||||||
[_exampleView setLighten: 0.0];
|
//[_exampleView setLighten: 0.0];
|
||||||
[_exampleView setDarken: 0.0];
|
[_exampleView setDarken: 0.0];
|
||||||
|
[_exampleView setBloom: 0.0];
|
||||||
|
[_exampleView setVignette: 0.0];
|
||||||
}
|
}
|
||||||
|
|
||||||
[_exampleView updateEffects];
|
[_exampleView updateEffects];
|
||||||
@ -240,4 +231,17 @@ enum {
|
|||||||
[self autorelease];
|
[self autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(NSColor *)recalcBackground {
|
||||||
|
|
||||||
|
NSColor *bg = [_backgroundColorControl color];
|
||||||
|
NSColor *fg = [_foregroundColorControl color];
|
||||||
|
CGFloat value = [_lightenSlider doubleValue];
|
||||||
|
|
||||||
|
if (_effectsEnabled) {
|
||||||
|
bg = [bg blendedColorWithFraction: value ofColor: fg];
|
||||||
|
}
|
||||||
|
return bg;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -287,7 +287,6 @@
|
|||||||
- (void)windowDidLoad
|
- (void)windowDidLoad
|
||||||
{
|
{
|
||||||
|
|
||||||
BOOL scanLines;
|
|
||||||
NSColor *foregroundColor;
|
NSColor *foregroundColor;
|
||||||
NSColor *backgroundColor;
|
NSColor *backgroundColor;
|
||||||
Class klass;
|
Class klass;
|
||||||
@ -313,9 +312,6 @@
|
|||||||
klass = [VT52 class];
|
klass = [VT52 class];
|
||||||
}
|
}
|
||||||
|
|
||||||
o = [_parameters objectForKey: kScanLines];
|
|
||||||
scanLines = o ? [(NSNumber *)o boolValue] : YES;
|
|
||||||
|
|
||||||
o = [_parameters objectForKey: kForegroundColor];
|
o = [_parameters objectForKey: kForegroundColor];
|
||||||
foregroundColor = o ? (NSColor *)o : [NSColor greenColor];
|
foregroundColor = o ? (NSColor *)o : [NSColor greenColor];
|
||||||
|
|
||||||
|
@ -11,7 +11,8 @@
|
|||||||
#import "TermWindowController.h"
|
#import "TermWindowController.h"
|
||||||
#import "NewTerminalWindowController.h"
|
#import "NewTerminalWindowController.h"
|
||||||
#import "Defaults.h"
|
#import "Defaults.h"
|
||||||
#import "VT52.h"
|
//#import "VT52.h"
|
||||||
|
#import "GNOConsole.h"
|
||||||
|
|
||||||
#import "ScanLineFilter.h"
|
#import "ScanLineFilter.h"
|
||||||
|
|
||||||
@ -35,26 +36,49 @@
|
|||||||
[nc addObserver: self selector: @selector(newTerminal:) name: kNotificationNewTerminal object: nil];
|
[nc addObserver: self selector: @selector(newTerminal:) name: kNotificationNewTerminal object: nil];
|
||||||
|
|
||||||
|
|
||||||
filters = [NSMutableArray arrayWithCapacity: 3];
|
filters = [NSMutableArray arrayWithCapacity: 5];
|
||||||
|
|
||||||
|
|
||||||
|
// vignette effect
|
||||||
|
filter = [CIFilter filterWithName: @"CIVignette"];
|
||||||
|
[filter setDefaults];
|
||||||
|
[filter setValue: @(1.0) forKey: @"inputIntensity"];
|
||||||
|
[filter setValue: @(1.0) forKey: @"inputRadius"];
|
||||||
|
[filters addObject: filter];
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
//blur it a bit...
|
||||||
|
filter = [CIFilter filterWithName: @"CIGaussianBlur"];
|
||||||
|
[filter setDefaults];
|
||||||
|
[filter setValue: @(.33) forKey: @"inputRadius"];
|
||||||
|
|
||||||
|
[filters addObject: filter];
|
||||||
|
#endif
|
||||||
|
|
||||||
//add the scanlines
|
//add the scanlines
|
||||||
|
|
||||||
filter = [[ScanLineFilter new] autorelease];
|
filter = [[ScanLineFilter new] autorelease];
|
||||||
[filter setValue: [NSNumber numberWithFloat: .5] forKey: @"inputDarken"];
|
[filter setValue: @(0.5) forKey: @"inputDarken"];
|
||||||
[filter setValue: [NSNumber numberWithFloat: .02] forKey: @"inputLighten"];
|
//[filter setValue: @(0.02) forKey: @"inputLighten"];
|
||||||
[filters addObject: filter];
|
[filters addObject: filter];
|
||||||
|
|
||||||
//blur it a bit...
|
|
||||||
|
|
||||||
filter = [CIFilter filterWithName: @"CIGaussianBlur"];
|
filter = [CIFilter filterWithName: @"CIBloom"];
|
||||||
[filter setDefaults];
|
[filter setDefaults];
|
||||||
[filter setValue: [NSNumber numberWithFloat: .33] forKey: @"inputRadius"];
|
[filter setValue: @2.0 forKey: @"inputRadius"];
|
||||||
|
[filter setValue: @(0.75) forKey: @"inputIntensity"];
|
||||||
|
|
||||||
[filters addObject: filter];
|
|
||||||
|
|
||||||
parameters = [NSDictionary dictionaryWithObject: filters forKey: kContentFilters];
|
|
||||||
|
|
||||||
|
parameters = @{
|
||||||
|
kClass: [GNOConsole class],
|
||||||
|
kContentFilters: filters,
|
||||||
|
kForegroundColor: [NSColor colorWithRed: 0.0 green: 1.0 blue: 0.6 alpha: 1.0],
|
||||||
|
kBackgroundColor: [NSColor colorWithRed: 0.0 green: .25 blue: .15 alpha: 1.0]
|
||||||
|
};
|
||||||
|
|
||||||
controller = [TermWindowController new];
|
controller = [TermWindowController new];
|
||||||
[controller setParameters: parameters];
|
[controller setParameters: parameters];
|
||||||
[controller showWindow: nil];
|
[controller showWindow: nil];
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
-(id)initWithContentRect:(NSRect)contentRect
|
-(id)initWithContentRect:(NSRect)contentRect
|
||||||
styleMask:(NSUInteger)styleMask
|
styleMask:(NSWindowStyleMask)styleMask
|
||||||
backing:(NSBackingStoreType)bufferingType
|
backing:(NSBackingStoreType)bufferingType
|
||||||
defer:(BOOL)flag
|
defer:(BOOL)flag
|
||||||
{
|
{
|
||||||
@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
|
|
||||||
-(id)initWithContentRect:(NSRect)contentRect
|
-(id)initWithContentRect:(NSRect)contentRect
|
||||||
styleMask:(NSUInteger)styleMask
|
styleMask:(NSWindowStyleMask)styleMask
|
||||||
backing:(NSBackingStoreType)bufferingType
|
backing:(NSBackingStoreType)bufferingType
|
||||||
defer:(BOOL)flag
|
defer:(BOOL)flag
|
||||||
screen:(NSScreen *)screen
|
screen:(NSScreen *)screen
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
CGFloat _blur;
|
CGFloat _blur;
|
||||||
CGFloat _lighten;
|
CGFloat _lighten;
|
||||||
CGFloat _darken;
|
CGFloat _darken;
|
||||||
|
CGFloat _bloom;
|
||||||
|
CGFloat _vignette;
|
||||||
|
|
||||||
CharacterGenerator *_charGenerator;
|
CharacterGenerator *_charGenerator;
|
||||||
|
|
||||||
@ -27,6 +29,8 @@
|
|||||||
@property (nonatomic, assign) CGFloat lighten;
|
@property (nonatomic, assign) CGFloat lighten;
|
||||||
@property (nonatomic, assign) CGFloat darken;
|
@property (nonatomic, assign) CGFloat darken;
|
||||||
@property (nonatomic, assign) CGFloat blur;
|
@property (nonatomic, assign) CGFloat blur;
|
||||||
|
@property (nonatomic, assign) CGFloat bloom;
|
||||||
|
@property (nonatomic, assign) CGFloat vignette;
|
||||||
|
|
||||||
|
|
||||||
-(void)updateEffects;
|
-(void)updateEffects;
|
||||||
|
@ -16,6 +16,9 @@
|
|||||||
@synthesize lighten = _lighten;
|
@synthesize lighten = _lighten;
|
||||||
@synthesize darken = _darken;
|
@synthesize darken = _darken;
|
||||||
@synthesize blur = _blur;
|
@synthesize blur = _blur;
|
||||||
|
@synthesize vignette = _vignette;
|
||||||
|
@synthesize bloom = _bloom;
|
||||||
|
|
||||||
@synthesize foregroundColor = _foregroundColor;
|
@synthesize foregroundColor = _foregroundColor;
|
||||||
|
|
||||||
|
|
||||||
@ -77,26 +80,48 @@
|
|||||||
NSMutableArray *filters;
|
NSMutableArray *filters;
|
||||||
CIFilter *filter;
|
CIFilter *filter;
|
||||||
|
|
||||||
filters = [NSMutableArray arrayWithCapacity: 3];
|
filters = [NSMutableArray arrayWithCapacity: 5];
|
||||||
|
|
||||||
|
|
||||||
//add the scanlines
|
|
||||||
|
|
||||||
filter = [[ScanLineFilter new] autorelease];
|
// vignette effect
|
||||||
[filter setValue: [NSNumber numberWithFloat: _darken] forKey: @"inputDarken"];
|
filter = [CIFilter filterWithName: @"CIVignette"];
|
||||||
[filter setValue: [NSNumber numberWithFloat: _lighten] forKey: @"inputLighten"];
|
|
||||||
[filters addObject: filter];
|
|
||||||
|
|
||||||
//blur it a bit...
|
|
||||||
|
|
||||||
filter = [CIFilter filterWithName: @"CIGaussianBlur"];
|
|
||||||
[filter setDefaults];
|
[filter setDefaults];
|
||||||
[filter setValue: [NSNumber numberWithFloat: _blur] forKey: @"inputRadius"];
|
[filter setValue: @(_vignette) forKey: @"inputIntensity"];
|
||||||
|
[filter setValue: @(1.0) forKey: @"inputRadius"];
|
||||||
|
|
||||||
[filters addObject: filter];
|
[filters addObject: filter];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//add the scanlines
|
||||||
|
|
||||||
|
filter = [[ScanLineFilter new] autorelease];
|
||||||
|
[filter setValue: @(_darken) forKey: @"inputDarken"];
|
||||||
|
[filter setValue: @(_lighten) forKey: @"inputLighten"];
|
||||||
|
[filters addObject: filter];
|
||||||
|
|
||||||
|
|
||||||
|
// bloom it...
|
||||||
|
|
||||||
|
filter = [CIFilter filterWithName: @"CIBloom"];
|
||||||
|
[filter setDefaults];
|
||||||
|
[filter setValue: @2.0 forKey: @"inputRadius"];
|
||||||
|
[filter setValue: @(_bloom) forKey: @"inputIntensity"];
|
||||||
|
|
||||||
|
[filters addObject: filter];
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
//blur it a bit...
|
||||||
|
|
||||||
|
filter = [CIFilter filterWithName: @"CIGaussianBlur"];
|
||||||
|
[filter setDefaults];
|
||||||
|
[filter setValue: @(_blur) forKey: @"inputRadius"];
|
||||||
|
|
||||||
|
[filters addObject: filter];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[self setContentFilters: filters];
|
[self setContentFilters: filters];
|
||||||
|
|
||||||
|
|
||||||
|
@ -59,7 +59,6 @@
|
|||||||
-(void)dealloc
|
-(void)dealloc
|
||||||
{
|
{
|
||||||
[_trackingArea release];
|
[_trackingArea release];
|
||||||
[_titleBar release];
|
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user