Skip to content

Commit

Permalink
updated samples.
Browse files Browse the repository at this point in the history
  • Loading branch information
ccgus committed Aug 14, 2010
1 parent 50117b1 commit 2e39fe2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions bin/jstbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ if [ $? != 0 ]; then
fi


cd /tmp/jstalk/plugins/CIOpenCLTools
cd /tmp/jstalk/plugins/imagetools
$xcodebuild -configuration Release OBJROOT=/tmp/jstalk/build SYMROOT=/tmp/jstalk/build OTHER_CFLAGS=""
if [ $? != 0 ]; then
echo "****** Bad build for CIOpenCLTools ********"
echo "****** Bad build for Image Tools ********"
exit
fi

Expand Down Expand Up @@ -155,7 +155,7 @@ mkdir JSTalkFoo/plugins
cp -r JSTalk.acplugin JSTalkFoo/plugins/.
cp -r JSTalk.vpplugin JSTalkFoo/plugins/.
cp -r FMDB.jstplugin JSTalkFoo/plugins/.
cp -r CIOpenCL.jstplugin JSTalkFoo/plugins/.
cp -r ImageTools.jstplugin JSTalkFoo/plugins/.

mv /tmp/jstalk/plugins/proxitask/JSTalkProxiTask.bundle JSTalkFoo/plugins/.

Expand Down
1 change: 0 additions & 1 deletion plugins/imagetools/samples/ciimage.jstalk
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ kernel vec4 foo(vec4 colorA, vec4 colorB) {

var img = [filter outputImage];

[JSTImageTools setShouldUseCISofwareRenderer:NO];
[JSTImageTools viewCIImage:img inWindowNamed:"test" extent:CGRectMake(0, 0, 400, 200)];

10 changes: 5 additions & 5 deletions plugins/imagetools/samples/nsimage.jstalk
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ function drawInImage(img, f) {
[img unlockFocus];
}

function makeButton(pressed, size) {
function makeButton(pressed, size, scale) {

var img = [[[NSImage alloc] initWithSize:size] autorelease];
var img = [NSImage imageWithSize:size];

drawInImage(img, function() {

Expand Down Expand Up @@ -52,9 +52,9 @@ function makeButton(pressed, size) {
}

var imgRect = NSMakeRect(0, 0, 100, 26);
var up = makeButton(true, imgRect.size);
var down = makeButton(false, imgRect.size);
var both = [[[NSImage alloc] initWithSize:NSMakeSize(150, 100)] autorelease];
var up = makeButton(true, imgRect.size, 2);
var down = makeButton(false, imgRect.size, 1);
var both = [NSImage imageWithSize:NSMakeSize(150, 100)];

drawInImage(both, function() {
[[NSColor grayColor] set];
Expand Down

0 comments on commit 2e39fe2

Please sign in to comment.