Permalink
Browse files

An example for code sketcher.

  • Loading branch information...
1 parent ea3d4f1 commit 8fa83b0997741d4fb4a7060c4c1d515550c35efe @ccgus committed Nov 12, 2011
Showing with 16 additions and 0 deletions.
  1. +16 −0 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;

0 comments on commit 8fa83b0

Please sign in to comment.