summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxant <xant@xant.net>2013-09-24 09:42:04 (GMT)
committer xant <xant@xant.net>2013-09-24 09:42:04 (GMT)
commit49fadf8a0d5d3e2baecc9a3c6ec4a956fbedf958 (patch)
tree592ef0241cc1e0721dda7abf1dfede4d33bad9ab
parenta5d84af99beefef9e1fc652224c859d3fe90f857 (diff)
invertYCoordinates is now true by default
-rw-r--r--core/JMXCanvasElement.mm1
-rw-r--r--entities/video_outputs/JMXOpenGLScreen.mm1
-rw-r--r--javascript_examples/drag_movies.js1
-rw-r--r--javascript_examples/processing_sample1.js2
4 files changed, 4 insertions, 1 deletions
diff --git a/core/JMXCanvasElement.mm b/core/JMXCanvasElement.mm
index 59736ea..2a32dc9 100644
--- a/core/JMXCanvasElement.mm
+++ b/core/JMXCanvasElement.mm
@@ -31,6 +31,7 @@ JMXV8_EXPORT_NODE_CLASS(JMXCanvasElement);
width = frameSize.width;
height = frameSize.height;
drawPath = [[JMXDrawPath alloc] initWithFrameSize:[JMXSize sizeWithNSSize:NSMakeSize(width, height)]];
+ drawPath.invertYCoordinates = YES;
}
return self;
}
diff --git a/entities/video_outputs/JMXOpenGLScreen.mm b/entities/video_outputs/JMXOpenGLScreen.mm
index 4f934c5..de405bc 100644
--- a/entities/video_outputs/JMXOpenGLScreen.mm
+++ b/entities/video_outputs/JMXOpenGLScreen.mm
@@ -402,6 +402,7 @@ static CVReturn renderCallback(CVDisplayLinkRef displayLink,
{
[super jsInit:argsValue];
ctx = [JMXScript getContext];
+ self.invertYCoordinates = YES;
}
- (id)initWithSize:(NSSize)screenSize
diff --git a/javascript_examples/drag_movies.js b/javascript_examples/drag_movies.js
index 1743432..bfaba76 100644
--- a/javascript_examples/drag_movies.js
+++ b/javascript_examples/drag_movies.js
@@ -17,6 +17,7 @@ movies = new Array(m1, m2, m3);
// create a video output (size doesn't really matter)
v = new VideoOutput(640, 480);
+v.invertYCoordinates = false;
// and create a videomixer so that we can blend the movie files on the same video frame
mixer = new VideoMixer();
diff --git a/javascript_examples/processing_sample1.js b/javascript_examples/processing_sample1.js
index 4bf6734..3e3704a 100644
--- a/javascript_examples/processing_sample1.js
+++ b/javascript_examples/processing_sample1.js
@@ -3,7 +3,7 @@ height = 480;
drawer = new DrawPath(width, height);
// the following is necessary to have coordinates matching between mouse events and the canvas context
-drawer.canvas.getContext('2d').invertYCoordinates = true;
+//drawer.canvas.getContext('2d').invertYCoordinates = true;
// comment the following lines if you don't want
// the output window to be automatically created