Sg2.9
Placing Image
Recent RSS
Placing Image
From:  invdr
Date:  10. January 2010, 04:40

Hi there, I'm working on a school project and I've been trying to get Scriptographer to place a raster image from a file but even as I start with a basic script

function onMouseDown(event) {
var file = new java.io.File('/images/mono_R.jpg');
var raster = new Raster(file);
}

it gives me an error

Error: Unable to create placed item.
at tools/mono.js:3

This all might be something I'm doing wrong but I looked all over the site for more information but couldn't find anything or any examples

nevermind
From:  invdr
Date:  10. January 2010, 20:03

Nevermind, the problem was not putting the whole path of the image. I thought that it could handle relative paths?

Scripts
08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
Posts
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19
Script of the Moment
L-System 26.10.11