add pressure control flag on size and flow, change data directory in OSX to Documents
This commit is contained in:
@@ -288,26 +288,14 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime
|
|||||||
|
|
||||||
@interface Window : NSWindow
|
@interface Window : NSWindow
|
||||||
@end @implementation Window
|
@end @implementation Window
|
||||||
- (void)keyDown:(NSEvent *)theEvent
|
|
||||||
{
|
|
||||||
[[self windowController] keyDown:theEvent];
|
|
||||||
}
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface Controller : NSWindowController<NSWindowDelegate>
|
@interface Controller : NSWindowController<NSWindowDelegate>
|
||||||
@end @implementation Controller
|
@end @implementation Controller
|
||||||
- (void)keyDown:(NSEvent *)theEvent
|
- (void)windowWillClose:(NSNotification *)notification
|
||||||
{
|
|
||||||
unichar c = [[theEvent charactersIgnoringModifiers] characterAtIndex:0];
|
|
||||||
if (c == 27)
|
|
||||||
{
|
{
|
||||||
[[NSApplication sharedApplication] terminate:nil];
|
[[NSApplication sharedApplication] terminate:nil];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
- (void)windowDidResize:(NSNotification *)notification
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface AppOSX : NSApplication<NSApplicationDelegate>
|
@interface AppOSX : NSApplication<NSApplicationDelegate>
|
||||||
@@ -336,9 +324,11 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime
|
|||||||
NSRect r = NSMakeRect(0, 0, App::I.width, App::I.height);
|
NSRect r = NSMakeRect(0, 0, App::I.width, App::I.height);
|
||||||
|
|
||||||
view = [[View alloc] initWithFrame:r];
|
view = [[View alloc] initWithFrame:r];
|
||||||
|
controller = [[Controller alloc] initWithWindow:window];
|
||||||
|
|
||||||
auto style = NSTitledWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask;
|
auto style = NSTitledWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask|NSClosableWindowMask;
|
||||||
window = [[Window alloc] initWithContentRect:r styleMask:style backing:NSBackingStoreBuffered defer:NO];
|
window = [[Window alloc] initWithContentRect:r styleMask:style backing:NSBackingStoreBuffered defer:NO];
|
||||||
|
[window setDelegate:controller];
|
||||||
[window setTitle:@"PanoPainter 0.1.2 alpha"];
|
[window setTitle:@"PanoPainter 0.1.2 alpha"];
|
||||||
[window center];
|
[window center];
|
||||||
[window makeKeyAndOrderFront:controller];
|
[window makeKeyAndOrderFront:controller];
|
||||||
@@ -346,8 +336,6 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime
|
|||||||
[window setAcceptsMouseMovedEvents:true];
|
[window setAcceptsMouseMovedEvents:true];
|
||||||
[window makeFirstResponder:view];
|
[window makeFirstResponder:view];
|
||||||
|
|
||||||
controller = [[Controller alloc] initWithWindow:window];
|
|
||||||
|
|
||||||
auto menubar = [NSMenu new];
|
auto menubar = [NSMenu new];
|
||||||
auto appMenuItem = [NSMenuItem new];
|
auto appMenuItem = [NSMenuItem new];
|
||||||
[menubar addItem:appMenuItem];
|
[menubar addItem:appMenuItem];
|
||||||
|
|||||||
@@ -204,6 +204,7 @@ glm::vec2 t_pos;
|
|||||||
App::I.initLog();
|
App::I.initLog();
|
||||||
App::I.ios_view = self;
|
App::I.ios_view = self;
|
||||||
|
|
||||||
|
self.preferredFramesPerSecond = 60;
|
||||||
self.context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3];
|
self.context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3];
|
||||||
|
|
||||||
if (!self.context) {
|
if (!self.context) {
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>NSPhotoLibraryAddUsageDescription</key>
|
|
||||||
<string>Save the pano image in the user gallery</string>
|
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>en</string>
|
<string>en</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
@@ -24,6 +22,8 @@
|
|||||||
<string>1</string>
|
<string>1</string>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>NSPhotoLibraryAddUsageDescription</key>
|
||||||
|
<string>Save the pano image in the user gallery</string>
|
||||||
<key>UILaunchStoryboardName</key>
|
<key>UILaunchStoryboardName</key>
|
||||||
<string>LaunchScreen</string>
|
<string>LaunchScreen</string>
|
||||||
<key>UIMainStoryboardFile</key>
|
<key>UIMainStoryboardFile</key>
|
||||||
|
|||||||
BIN
data/Icons/Edge.png
Normal file
BIN
data/Icons/Edge.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 413 B |
@@ -119,8 +119,18 @@
|
|||||||
<node height="20" justify="center"><text text="Mixer" font-face="arial" font-size="11"/></node>
|
<node height="20" justify="center"><text text="Mixer" font-face="arial" font-size="11"/></node>
|
||||||
</node>
|
</node>
|
||||||
<border dir="col" align="center" grow="1" width="1">
|
<border dir="col" align="center" grow="1" width="1">
|
||||||
<node height="20" pad="1" width="100%"><slider-h id="tip-size" value=".25"/></node>
|
<node height="20" pad="1" width="100%" dir="row">
|
||||||
<node height="20" pad="1" width="100%"><slider-h id="tip-flow" value=".5"/></node>
|
<slider-h id="tip-size" width="1" grow="1" value=".25"/>
|
||||||
|
<node width="20" pad="0" margin="0 0 0 2">
|
||||||
|
<checkbox id="tip-size-pressure"></checkbox>
|
||||||
|
</node>
|
||||||
|
</node>
|
||||||
|
<node height="20" pad="1" width="100%" dir="row">
|
||||||
|
<slider-h id="tip-flow" width="1" grow="1" value=".5"/>
|
||||||
|
<node width="20" pad="0" margin="0 0 0 2">
|
||||||
|
<checkbox id="tip-flow-pressure"></checkbox>
|
||||||
|
</node>
|
||||||
|
</node>
|
||||||
<node height="20" pad="1" width="100%"><slider-h id="tip-opacity" value="1"/></node>
|
<node height="20" pad="1" width="100%"><slider-h id="tip-opacity" value="1"/></node>
|
||||||
<node height="20" pad="1" width="100%"><slider-h id="tip-spacing" value=".25"/></node>
|
<node height="20" pad="1" width="100%"><slider-h id="tip-spacing" value=".25"/></node>
|
||||||
<node height="20" pad="1" width="100%" dir="row">
|
<node height="20" pad="1" width="100%" dir="row">
|
||||||
@@ -394,6 +404,10 @@
|
|||||||
<!--layers menu-->
|
<!--layers menu-->
|
||||||
<layout id="layers-menu">
|
<layout id="layers-menu">
|
||||||
<popup-menu positioning="absolute" position="100 100" width="250" thickness="1" border-color=".1" color=".4 .4 .4 .8" dir="col">
|
<popup-menu positioning="absolute" position="100 100" width="250" thickness="1" border-color=".1" color=".4 .4 .4 .8" dir="col">
|
||||||
|
<button-custom id="layer-clear" height="40" align="center" color=".2" pad="0 0 0 10" dir="row">
|
||||||
|
<icon icon="cancel" width="20"/>
|
||||||
|
<text id="menu-label" text="Clear layer" margin="0 0 0 5" font-face="arial" font-size="11"/>
|
||||||
|
</button-custom>
|
||||||
<button-custom id="clear-grids" height="40" align="center" color=".2" pad="0 0 0 10" dir="row">
|
<button-custom id="clear-grids" height="40" align="center" color=".2" pad="0 0 0 10" dir="row">
|
||||||
<icon icon="add" width="20"/>
|
<icon icon="add" width="20"/>
|
||||||
<text text="Clear grids" margin="0 0 0 5" font-face="arial" font-size="11"/>
|
<text text="Clear grids" margin="0 0 0 5" font-face="arial" font-size="11"/>
|
||||||
@@ -450,12 +464,17 @@
|
|||||||
<button-custom id="menu-file" width="50" height="100%" margin="0 0 0 0" justify="center" align="center" pad="8" color=".1">
|
<button-custom id="menu-file" width="50" height="100%" margin="0 0 0 0" justify="center" align="center" pad="8" color=".1">
|
||||||
<text text="File" font-face="arial" font-size="11"/>
|
<text text="File" font-face="arial" font-size="11"/>
|
||||||
</button-custom>
|
</button-custom>
|
||||||
|
<!--
|
||||||
<button-custom id="menu-edit" width="50" height="100%" margin="0 0 0 0" justify="center" align="center" pad="8" color=".1">
|
<button-custom id="menu-edit" width="50" height="100%" margin="0 0 0 0" justify="center" align="center" pad="8" color=".1">
|
||||||
<text text="Edit" font-face="arial" font-size="11"/>
|
<text text="Edit" font-face="arial" font-size="11"/>
|
||||||
</button-custom>
|
</button-custom>
|
||||||
|
-->
|
||||||
<button-custom id="menu-layers" width="60" height="100%" margin="0 0 0 0" justify="center" align="center" pad="8" color=".1">
|
<button-custom id="menu-layers" width="60" height="100%" margin="0 0 0 0" justify="center" align="center" pad="8" color=".1">
|
||||||
<text text="Layers" font-face="arial" font-size="11"/>
|
<text text="Layers" font-face="arial" font-size="11"/>
|
||||||
</button-custom>
|
</button-custom>
|
||||||
|
<button-custom id="menu-about" width="60" height="100%" margin="0 0 0 0" justify="center" align="center" pad="8" color=".1">
|
||||||
|
<text text="About" font-face="arial" font-size="11"/>
|
||||||
|
</button-custom>
|
||||||
<node dir="row" justify="center" grow="1">
|
<node dir="row" justify="center" grow="1">
|
||||||
<button id="btn-pen" width="50" height="100%" margin="0 0 0 0" text="Pen"/>
|
<button id="btn-pen" width="50" height="100%" margin="0 0 0 0" text="Pen"/>
|
||||||
<button id="btn-pick" width="50" height="100%" margin="0 0 0 0" text="Pick"/>
|
<button id="btn-pick" width="50" height="100%" margin="0 0 0 0" text="Pick"/>
|
||||||
@@ -467,7 +486,7 @@
|
|||||||
|
|
||||||
<button id="btn-line" width="50" height="100%" margin="0 0 0 5" text="Line"/>
|
<button id="btn-line" width="50" height="100%" margin="0 0 0 5" text="Line"/>
|
||||||
<button id="btn-grid" width="50" height="100%" margin="0 0 0 0" text="Grid"/>
|
<button id="btn-grid" width="50" height="100%" margin="0 0 0 0" text="Grid"/>
|
||||||
<button id="btn-fill" width="50" height="100%" margin="0 0 0 0" text="Fill"/>
|
<!-- <button id="btn-fill" width="50" height="100%" margin="0 0 0 0" text="Fill"/> -->
|
||||||
|
|
||||||
<button-custom id="btn-bucket" width="50" height="100%" margin="0 0 0 5" thickness="1" border-color="0 0 0 1" pad="2">
|
<button-custom id="btn-bucket" width="50" height="100%" margin="0 0 0 5" thickness="1" border-color="0 0 0 1" pad="2">
|
||||||
<image path="data/ui/bucket.png" width="100%" height="100%" align="center" justify="flex-end"/>
|
<image path="data/ui/bucket.png" width="100%" height="100%" align="center" justify="flex-end"/>
|
||||||
|
|||||||
@@ -135,7 +135,6 @@
|
|||||||
AD4C08DC1E89BD0F0051D85F /* canvas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD4C08D51E89BD0F0051D85F /* canvas.cpp */; };
|
AD4C08DC1E89BD0F0051D85F /* canvas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD4C08D51E89BD0F0051D85F /* canvas.cpp */; };
|
||||||
AD4C08DD1E89BD0F0051D85F /* rtt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD4C08D71E89BD0F0051D85F /* rtt.cpp */; };
|
AD4C08DD1E89BD0F0051D85F /* rtt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD4C08D71E89BD0F0051D85F /* rtt.cpp */; };
|
||||||
AD5016591EBFC7F00079A826 /* data in Resources */ = {isa = PBXBuildFile; fileRef = AD58E0611E17F23D006ACC15 /* data */; };
|
AD5016591EBFC7F00079A826 /* data in Resources */ = {isa = PBXBuildFile; fileRef = AD58E0611E17F23D006ACC15 /* data */; };
|
||||||
AD58E0531E107411006ACC15 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD58E0521E107411006ACC15 /* main.cpp */; };
|
|
||||||
AD58E05A1E10752E006ACC15 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD58E0591E10752E006ACC15 /* OpenGL.framework */; };
|
AD58E05A1E10752E006ACC15 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD58E0591E10752E006ACC15 /* OpenGL.framework */; };
|
||||||
AD58E05C1E107536006ACC15 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD58E05B1E107536006ACC15 /* Cocoa.framework */; };
|
AD58E05C1E107536006ACC15 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD58E05B1E107536006ACC15 /* Cocoa.framework */; };
|
||||||
AD58E05E1E10754F006ACC15 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD58E05D1E10754F006ACC15 /* CoreFoundation.framework */; };
|
AD58E05E1E10754F006ACC15 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD58E05D1E10754F006ACC15 /* CoreFoundation.framework */; };
|
||||||
@@ -164,6 +163,7 @@
|
|||||||
ADC6F4661F3E66FB004177FA /* app_dialogs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ADC6F4651F3E66FA004177FA /* app_dialogs.cpp */; };
|
ADC6F4661F3E66FB004177FA /* app_dialogs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ADC6F4651F3E66FA004177FA /* app_dialogs.cpp */; };
|
||||||
ADC6F4671F3E66FB004177FA /* app_dialogs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ADC6F4651F3E66FA004177FA /* app_dialogs.cpp */; };
|
ADC6F4671F3E66FB004177FA /* app_dialogs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ADC6F4651F3E66FA004177FA /* app_dialogs.cpp */; };
|
||||||
ADC6F4681F3E66FB004177FA /* app_dialogs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ADC6F4651F3E66FA004177FA /* app_dialogs.cpp */; };
|
ADC6F4681F3E66FB004177FA /* app_dialogs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ADC6F4651F3E66FA004177FA /* app_dialogs.cpp */; };
|
||||||
|
ADCB41B61F6FF2DD006D46FE /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD58E0521E107411006ACC15 /* main.cpp */; };
|
||||||
ADD7D26F1EBF9AE300D5A897 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = ADD7D26E1EBF9AE300D5A897 /* main.m */; };
|
ADD7D26F1EBF9AE300D5A897 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = ADD7D26E1EBF9AE300D5A897 /* main.m */; };
|
||||||
ADD7D2721EBF9AE300D5A897 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = ADD7D2711EBF9AE300D5A897 /* AppDelegate.m */; };
|
ADD7D2721EBF9AE300D5A897 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = ADD7D2711EBF9AE300D5A897 /* AppDelegate.m */; };
|
||||||
ADD7D2791EBF9AE300D5A897 /* GameViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = ADD7D2781EBF9AE300D5A897 /* GameViewController.m */; };
|
ADD7D2791EBF9AE300D5A897 /* GameViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = ADD7D2781EBF9AE300D5A897 /* GameViewController.m */; };
|
||||||
@@ -672,7 +672,7 @@
|
|||||||
};
|
};
|
||||||
ADD7D26A1EBF9AE300D5A897 = {
|
ADD7D26A1EBF9AE300D5A897 = {
|
||||||
CreatedOnToolsVersion = 7.2;
|
CreatedOnToolsVersion = 7.2;
|
||||||
DevelopmentTeam = A6Y3VHN7V9;
|
DevelopmentTeam = ERD9AYQ49S;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -788,6 +788,7 @@
|
|||||||
files = (
|
files = (
|
||||||
AD58E0791E342205006ACC15 /* tinyxml2.cpp in Sources */,
|
AD58E0791E342205006ACC15 /* tinyxml2.cpp in Sources */,
|
||||||
AD10638B1EC7ADFA002A525F /* node_panel_color.cpp in Sources */,
|
AD10638B1EC7ADFA002A525F /* node_panel_color.cpp in Sources */,
|
||||||
|
ADCB41B61F6FF2DD006D46FE /* main.cpp in Sources */,
|
||||||
AD10638C1EC7ADFA002A525F /* node_panel_layer.cpp in Sources */,
|
AD10638C1EC7ADFA002A525F /* node_panel_layer.cpp in Sources */,
|
||||||
AD29CC621EA2B214008C8BFA /* action.cpp in Sources */,
|
AD29CC621EA2B214008C8BFA /* action.cpp in Sources */,
|
||||||
AD1063891EC7ADFA002A525F /* node_message_box.cpp in Sources */,
|
AD1063891EC7ADFA002A525F /* node_message_box.cpp in Sources */,
|
||||||
@@ -822,7 +823,6 @@
|
|||||||
AD1063911EC7ADFA002A525F /* node_stroke_preview.cpp in Sources */,
|
AD1063911EC7ADFA002A525F /* node_stroke_preview.cpp in Sources */,
|
||||||
AD0E11A31ECA61B500CDA6BB /* jpge.cpp in Sources */,
|
AD0E11A31ECA61B500CDA6BB /* jpge.cpp in Sources */,
|
||||||
AD1063811EC7ADFA002A525F /* node_button.cpp in Sources */,
|
AD1063811EC7ADFA002A525F /* node_button.cpp in Sources */,
|
||||||
AD58E0531E107411006ACC15 /* main.cpp in Sources */,
|
|
||||||
ADB1C3DA1EA3A156009A65BD /* event.cpp in Sources */,
|
ADB1C3DA1EA3A156009A65BD /* event.cpp in Sources */,
|
||||||
AD4C08D91E89BD0F0051D85F /* asset.cpp in Sources */,
|
AD4C08D91E89BD0F0051D85F /* asset.cpp in Sources */,
|
||||||
AD1063851EC7ADFA002A525F /* node_dialog_open.cpp in Sources */,
|
AD1063851EC7ADFA002A525F /* node_dialog_open.cpp in Sources */,
|
||||||
@@ -972,7 +972,7 @@
|
|||||||
ARCHS = "$(ARCHS_STANDARD)";
|
ARCHS = "$(ARCHS_STANDARD)";
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
|
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = NO;
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
@@ -1027,7 +1027,7 @@
|
|||||||
ARCHS = "$(ARCHS_STANDARD)";
|
ARCHS = "$(ARCHS_STANDARD)";
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
|
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = NO;
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
@@ -1100,7 +1100,7 @@
|
|||||||
CLANG_ENABLE_MODULES = NO;
|
CLANG_ENABLE_MODULES = NO;
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
DEVELOPMENT_TEAM = A6Y3VHN7V9;
|
DEVELOPMENT_TEAM = ERD9AYQ49S;
|
||||||
HEADER_SEARCH_PATHS = (
|
HEADER_SEARCH_PATHS = (
|
||||||
"/Users/omimac/Downloads/curl-android-ios-master/prebuilt-with-ssl/iOS/include",
|
"/Users/omimac/Downloads/curl-android-ios-master/prebuilt-with-ssl/iOS/include",
|
||||||
libs/stb,
|
libs/stb,
|
||||||
@@ -1114,7 +1114,7 @@
|
|||||||
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
|
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
LIBRARY_SEARCH_PATHS = "/Users/omimac/Downloads/curl-android-ios-master/prebuilt-with-ssl/iOS";
|
LIBRARY_SEARCH_PATHS = "/Users/omimac/Downloads/curl-android-ios-master/prebuilt-with-ssl/iOS";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.omixlab.PanoPainter;
|
PRODUCT_BUNDLE_IDENTIFIER = com.omixlab;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
@@ -1128,7 +1128,7 @@
|
|||||||
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
|
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
|
||||||
CLANG_ENABLE_MODULES = NO;
|
CLANG_ENABLE_MODULES = NO;
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
DEVELOPMENT_TEAM = A6Y3VHN7V9;
|
DEVELOPMENT_TEAM = ERD9AYQ49S;
|
||||||
HEADER_SEARCH_PATHS = (
|
HEADER_SEARCH_PATHS = (
|
||||||
"/Users/omimac/Downloads/curl-android-ios-master/prebuilt-with-ssl/iOS/include",
|
"/Users/omimac/Downloads/curl-android-ios-master/prebuilt-with-ssl/iOS/include",
|
||||||
libs/stb,
|
libs/stb,
|
||||||
@@ -1142,7 +1142,7 @@
|
|||||||
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
|
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
LIBRARY_SEARCH_PATHS = "/Users/omimac/Downloads/curl-android-ios-master/prebuilt-with-ssl/iOS";
|
LIBRARY_SEARCH_PATHS = "/Users/omimac/Downloads/curl-android-ios-master/prebuilt-with-ssl/iOS";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.omixlab.PanoPainter;
|
PRODUCT_BUNDLE_IDENTIFIER = com.omixlab;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
|||||||
@@ -43,6 +43,12 @@ void App::initAssets()
|
|||||||
|
|
||||||
void App::initLog()
|
void App::initLog()
|
||||||
{
|
{
|
||||||
|
#if defined(__IOS__) || defined(__OSX__)
|
||||||
|
NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
||||||
|
NSString* docpath = [paths objectAtIndex:0];
|
||||||
|
data_path = [docpath cStringUsingEncoding:NSASCIIStringEncoding];
|
||||||
|
#endif
|
||||||
|
|
||||||
LogRemote::I.start();
|
LogRemote::I.start();
|
||||||
LogRemote::I.file_init();
|
LogRemote::I.file_init();
|
||||||
}
|
}
|
||||||
@@ -91,12 +97,6 @@ void App::init()
|
|||||||
//zoom = ceilf(width / 2000.f);
|
//zoom = ceilf(width / 2000.f);
|
||||||
//zoom = 2;
|
//zoom = 2;
|
||||||
|
|
||||||
#ifdef __IOS__
|
|
||||||
NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
|
||||||
NSString* docpath = [paths objectAtIndex:0];
|
|
||||||
data_path = [docpath cStringUsingEncoding:NSASCIIStringEncoding];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
glDisable(GL_DEPTH_TEST);
|
glDisable(GL_DEPTH_TEST);
|
||||||
#if defined(_WIN32) || defined(__OSX__)
|
#if defined(_WIN32) || defined(__OSX__)
|
||||||
glEnable(GL_PROGRAM_POINT_SIZE);
|
glEnable(GL_PROGRAM_POINT_SIZE);
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ void App::init_toolbar_draw()
|
|||||||
layout[main_id]->find<NodeButton>("btn-line")->set_color(color_button_normal);
|
layout[main_id]->find<NodeButton>("btn-line")->set_color(color_button_normal);
|
||||||
layout[main_id]->find<NodeButton>("btn-cam")->set_color(color_button_normal);
|
layout[main_id]->find<NodeButton>("btn-cam")->set_color(color_button_normal);
|
||||||
layout[main_id]->find<NodeButton>("btn-grid")->set_color(color_button_normal);
|
layout[main_id]->find<NodeButton>("btn-grid")->set_color(color_button_normal);
|
||||||
layout[main_id]->find<NodeButton>("btn-fill")->set_color(color_button_normal);
|
//layout[main_id]->find<NodeButton>("btn-fill")->set_color(color_button_normal);
|
||||||
Canvas::set_mode(Canvas::kCanvasMode::Erase);
|
Canvas::set_mode(Canvas::kCanvasMode::Erase);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -266,7 +266,7 @@ void App::init_toolbar_draw()
|
|||||||
layout[main_id]->find<NodeButton>("btn-line")->set_color(color_button_hlight);
|
layout[main_id]->find<NodeButton>("btn-line")->set_color(color_button_hlight);
|
||||||
layout[main_id]->find<NodeButton>("btn-cam")->set_color(color_button_normal);
|
layout[main_id]->find<NodeButton>("btn-cam")->set_color(color_button_normal);
|
||||||
layout[main_id]->find<NodeButton>("btn-grid")->set_color(color_button_normal);
|
layout[main_id]->find<NodeButton>("btn-grid")->set_color(color_button_normal);
|
||||||
layout[main_id]->find<NodeButton>("btn-fill")->set_color(color_button_normal);
|
//layout[main_id]->find<NodeButton>("btn-fill")->set_color(color_button_normal);
|
||||||
Canvas::set_mode(Canvas::kCanvasMode::Line);
|
Canvas::set_mode(Canvas::kCanvasMode::Line);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -278,7 +278,7 @@ void App::init_toolbar_draw()
|
|||||||
layout[main_id]->find<NodeButton>("btn-line")->set_color(color_button_normal);
|
layout[main_id]->find<NodeButton>("btn-line")->set_color(color_button_normal);
|
||||||
layout[main_id]->find<NodeButton>("btn-cam")->set_color(color_button_hlight);
|
layout[main_id]->find<NodeButton>("btn-cam")->set_color(color_button_hlight);
|
||||||
layout[main_id]->find<NodeButton>("btn-grid")->set_color(color_button_normal);
|
layout[main_id]->find<NodeButton>("btn-grid")->set_color(color_button_normal);
|
||||||
layout[main_id]->find<NodeButton>("btn-fill")->set_color(color_button_normal);
|
//layout[main_id]->find<NodeButton>("btn-fill")->set_color(color_button_normal);
|
||||||
Canvas::set_mode(Canvas::kCanvasMode::Camera);
|
Canvas::set_mode(Canvas::kCanvasMode::Camera);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -395,6 +395,14 @@ void App::init_menu_layer()
|
|||||||
popup->destroy();
|
popup->destroy();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
popup->find<NodeButtonCustom>("layer-clear")->on_click = [this](Node*) {
|
||||||
|
canvas->m_canvas->clear();
|
||||||
|
};
|
||||||
|
if (layers->m_current_layer)
|
||||||
|
popup->find<NodeButtonCustom>("layer-clear")->
|
||||||
|
find<NodeText>("menu-label")->
|
||||||
|
set_text(("Clear Layer " + layers->m_current_layer->m_label_text).c_str());
|
||||||
|
|
||||||
popup->find<NodeButtonCustom>("layer-rename")->on_click = [this](Node*) {
|
popup->find<NodeButtonCustom>("layer-rename")->on_click = [this](Node*) {
|
||||||
dialog_layer_rename();
|
dialog_layer_rename();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -161,12 +161,15 @@ ui::StrokeSample ui::Stroke::randomize_sample(const glm::vec2& pos, float pressu
|
|||||||
auto rnd_rad = [&] { return float((double)prng() / (double)prng.max() * M_PI * 2.0); }; // normalized [0, 2pi]
|
auto rnd_rad = [&] { return float((double)prng() / (double)prng.max() * M_PI * 2.0); }; // normalized [0, 2pi]
|
||||||
auto rnd_vec = [&] { float rad = rnd_rad(); return glm::vec2(cosf(rad), sinf(rad)); }; // normalized direction vector
|
auto rnd_vec = [&] { float rad = rnd_rad(); return glm::vec2(cosf(rad), sinf(rad)); }; // normalized direction vector
|
||||||
|
|
||||||
|
float size_dyn = m_brush.m_tip_size_pressure ? pressure : 1.f;
|
||||||
|
float flow_dyn = m_brush.m_tip_flow_pressure ? pressure : 1.f;
|
||||||
|
|
||||||
StrokeSample s;
|
StrokeSample s;
|
||||||
s.origin = pos;
|
s.origin = pos;
|
||||||
s.angle = -curve_angle + (m_brush.m_tip_angle + rnd_nor() * m_brush.m_jitter_angle) * (float)(M_PI * 2.0);
|
s.angle = -curve_angle + (m_brush.m_tip_angle + rnd_nor() * m_brush.m_jitter_angle) * (float)(M_PI * 2.0);
|
||||||
s.pos = pos + (rnd_vec() * m_brush.m_jitter_spread * 100.f);
|
s.pos = pos + (rnd_vec() * m_brush.m_jitter_spread * 100.f);
|
||||||
s.size = 800.f * glm::pow(m_brush.m_tip_size, 3.f) * (1.f - rnd_nor() * m_brush.m_jitter_scale);
|
s.size = 800.f * glm::pow(m_brush.m_tip_size, 3.f) * (1.f - rnd_nor() * m_brush.m_jitter_scale) * size_dyn;
|
||||||
s.flow = glm::pow(m_brush.m_tip_flow, 2.f) * (1.f - rnd_nor() * m_brush.m_jitter_flow) * pressure;
|
s.flow = glm::pow(m_brush.m_tip_flow, 2.f) * (1.f - rnd_nor() * m_brush.m_jitter_flow) * flow_dyn;
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
std::vector<ui::StrokeSample> ui::Stroke::compute_samples()
|
std::vector<ui::StrokeSample> ui::Stroke::compute_samples()
|
||||||
@@ -219,6 +222,12 @@ void ui::Stroke::reset(bool clear_keypoints /*= false*/)
|
|||||||
}
|
}
|
||||||
void ui::Stroke::add_point(glm::vec2 pos, float pressure)
|
void ui::Stroke::add_point(glm::vec2 pos, float pressure)
|
||||||
{
|
{
|
||||||
|
m_curve = glm::min(m_curve + 0.1f, 1.f);
|
||||||
|
pressure = pressure * glm::pow(m_curve, 2.f);
|
||||||
|
|
||||||
|
if (m_brush.m_tip_size_pressure)
|
||||||
|
m_step = glm::max(m_brush.m_tip_spacing * m_brush.m_tip_size * 100 * pressure, 1.f);
|
||||||
|
|
||||||
float dist = m_keypoints.empty() ? 0.f :
|
float dist = m_keypoints.empty() ? 0.f :
|
||||||
m_keypoints.back().dist + glm::distance(m_keypoints.back().pos, pos);
|
m_keypoints.back().dist + glm::distance(m_keypoints.back().pos, pos);
|
||||||
if (m_keypoints.empty())
|
if (m_keypoints.empty())
|
||||||
@@ -231,6 +240,7 @@ void ui::Stroke::add_point(glm::vec2 pos, float pressure)
|
|||||||
}
|
}
|
||||||
void ui::Stroke::start(const ui::Brush& brush)
|
void ui::Stroke::start(const ui::Brush& brush)
|
||||||
{
|
{
|
||||||
|
m_curve = 0.f;
|
||||||
m_curve_angles.clear();
|
m_curve_angles.clear();
|
||||||
m_last_kp = 0;
|
m_last_kp = 0;
|
||||||
m_dist = 0.f;
|
m_dist = 0.f;
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ public:
|
|||||||
float m_tip_opacity;
|
float m_tip_opacity;
|
||||||
float m_tip_angle;
|
float m_tip_angle;
|
||||||
bool m_tip_angle_follow = false;
|
bool m_tip_angle_follow = false;
|
||||||
|
bool m_tip_flow_pressure = false;
|
||||||
|
bool m_tip_size_pressure = false;
|
||||||
float m_jitter_scale;
|
float m_jitter_scale;
|
||||||
float m_jitter_angle;
|
float m_jitter_angle;
|
||||||
float m_jitter_spread;
|
float m_jitter_spread;
|
||||||
@@ -62,6 +64,7 @@ public:
|
|||||||
float fov;
|
float fov;
|
||||||
};
|
};
|
||||||
int m_layer;
|
int m_layer;
|
||||||
|
float m_curve;
|
||||||
float m_dist;
|
float m_dist;
|
||||||
float m_step;
|
float m_step;
|
||||||
Camera m_camera;
|
Camera m_camera;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
LogRemote LogRemote::I;
|
LogRemote LogRemote::I;
|
||||||
|
|
||||||
@@ -71,7 +72,7 @@ void LogRemote::net_close()
|
|||||||
void LogRemote::file_init()
|
void LogRemote::file_init()
|
||||||
{
|
{
|
||||||
if (!m_logfile.is_open())
|
if (!m_logfile.is_open())
|
||||||
m_logfile.open("log.txt");
|
m_logfile.open(App::I.data_path + "/panopainter-log.txt");
|
||||||
}
|
}
|
||||||
void LogRemote::file_close()
|
void LogRemote::file_close()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "node_canvas.h"
|
#include "node_canvas.h"
|
||||||
|
|
||||||
#define RES 1024
|
#define RES 2048
|
||||||
|
|
||||||
Node* NodeCanvas::clone_instantiate() const
|
Node* NodeCanvas::clone_instantiate() const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ void NodePanelStroke::init_controls()
|
|||||||
init_slider(m_jitter_flow, "jitter-flow", &ui::Brush::m_jitter_flow);
|
init_slider(m_jitter_flow, "jitter-flow", &ui::Brush::m_jitter_flow);
|
||||||
|
|
||||||
init_checkbox(m_tip_angle_follow, "tip-angle-follow", &ui::Brush::m_tip_angle_follow);
|
init_checkbox(m_tip_angle_follow, "tip-angle-follow", &ui::Brush::m_tip_angle_follow);
|
||||||
|
init_checkbox(m_tip_flow_pressure, "tip-flow-pressure", &ui::Brush::m_tip_flow_pressure);
|
||||||
|
init_checkbox(m_tip_size_pressure, "tip-size-pressure", &ui::Brush::m_tip_size_pressure);
|
||||||
|
|
||||||
//m_canvas->draw_stroke();
|
//m_canvas->draw_stroke();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ public:
|
|||||||
NodeSliderH* m_jitter_spread;
|
NodeSliderH* m_jitter_spread;
|
||||||
NodeSliderH* m_jitter_flow;
|
NodeSliderH* m_jitter_flow;
|
||||||
NodeCheckBox* m_tip_angle_follow;
|
NodeCheckBox* m_tip_angle_follow;
|
||||||
|
NodeCheckBox* m_tip_flow_pressure;
|
||||||
|
NodeCheckBox* m_tip_size_pressure;
|
||||||
std::function<void(Node* target)> on_stroke_change;
|
std::function<void(Node* target)> on_stroke_change;
|
||||||
virtual Node* clone_instantiate() const override;
|
virtual Node* clone_instantiate() const override;
|
||||||
virtual void clone_finalize(Node* dest) const override;
|
virtual void clone_finalize(Node* dest) const override;
|
||||||
|
|||||||
Reference in New Issue
Block a user