Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

An example for code sketcher.

  • Loading branch information...
commit 8fa83b0997741d4fb4a7060c4c1d515550c35efe 1 parent ea3d4f1
@ccgus authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 plugins/imagetools/samples/codesketcher.jstalk
View
16 plugins/imagetools/samples/codesketcher.jstalk
@@ -0,0 +1,16 @@
+var sketcher = [JSTCodeSketcher codeSketcherWithName:"Test!"];
+
+sketcher.draw = function() {
+
+ [[NSColor redColor] set];
+ [NSBezierPath fillRect:NSMakeRect(0, 0, 150, 100)];
+
+
+ [[NSColor blueColor] set];
+
+ [NSBezierPath strokeRect:NSMakeRect([sketcher mouseX] - 10.5,
+ [sketcher mouseY] - 10.5, 20, 20)];
+
+};
+
+sketcher.framesPerSecond = 30;
Please sign in to comment.
Something went wrong with that request. Please try again.