Page 1 of 1
Drawing tools (now moved to the correct forum!)
Posted: Wed Feb 27, 2008 12:20 pm
by Andycal
Just had a look around on the forums and someone pointed to an excellent resource, albeit in Japanese for some example stacks that you can draw on an image with.
(
http://www.kenjikojima.com/runrev/handbook/download/ - 015, 016, 017)
However, I can't make head nor tail of them.
Reading the scripts, it looks like this should work:
Code: Select all
choose pencil tool
set the pencolor to "black"
I get the pencil tool, but it doesn't draw anything. Also, in the example scripts, he manages to get it to draw just on the image, not the whole card.
Can anyone shed any light? [/code]
Posted: Wed Feb 27, 2008 7:35 pm
by Klaus
Hi Andy,
you cannot paint directly on a card!
Create a new (empty) image and start painting happily

Posted: Wed Feb 27, 2008 8:19 pm
by Andycal
Hi Klaus,
Thanks for that. I thought I'd done that actually, but it won't paint on anything. I set the pen colour, but nothing happens.
The pen just stays a pen with no apparent way of stopping it.
Posted: Thu Feb 28, 2008 2:44 pm
by Klaus
Hi Andy,
hmm, works here as described!
I created a new image and a button with your script and could paint in black on the image...
You can only change the tool in a palette window, sorry!
Best
Klaus
Posted: Thu Feb 28, 2008 2:57 pm
by Andycal
You can only change the tool in a palette window, sorry!
Ahhhhh!.....
Posted: Thu Feb 28, 2008 3:20 pm
by Andycal
Me again. Are you saying that the stack with the image in it needs to be a palette or the stack where you press the button needs to be a palette?
Posted: Thu Feb 28, 2008 3:30 pm
by Klaus
The latter one, the palette is needed to change the tool!
Posted: Thu Feb 28, 2008 4:26 pm
by Andycal
OK. I'm sure I'm doing something really stupid here 'cos it looks easy but it just 'aint working!!!
I've got a mainstack that opens up and allows me to press a button to get a screen grab. It then exports this to a file and opens up a substack.
The substack opens up the file and displays it in the middle of the stack. All good so far.
I've put a button on this stack that does this:
Code: Select all
on mouseUp pMouseBtnNo
open stack "pal"
palette stack "pal"
end mouseUp
This opens up the 'Pal' stack that has just one button on it that does this:
Code: Select all
on mouseUp pMouseBtnNo
choose pencil tool
set pencolor to "black"
end mouseUp
If I press this button it turns it into a pencil when I move onto the previous substack (the one with the image in it), however, it doesn't let me draw anything.
What am I doing wrong here?
Posted: Thu Feb 28, 2008 4:46 pm
by Klaus
You can only paint on internal (imported) images and NOT on referenced ones!
Are setting the filenmae of your image to the (screenshot) file?
Maybe that is you problem...
AND you should add another button to your palette!!!!
Code: Select all
on mouseup
choose browse tool
end mouseup
Or your user must use the pencil tool until doomsday

Posted: Thu Feb 28, 2008 5:08 pm
by Andycal
Klaus wrote:You can only paint on internal (imported) images and NOT on referenced ones!
Are setting the filenmae of your image to the (screenshot) file?
Maybe that is you problem...
Ahh, yes. I'm setting the image to the screenshot file. So I'm guessing I need to import rather than change the filename? And then when imported, how do I put this on the screen?
Sorry about all the questions but sometimes RunRev is amazingly simple and other times it leaves me tearing my hair out with its strange methods!
Posted: Thu Feb 28, 2008 7:58 pm
by Klaus
Hi Andy,
since you probably already have an image on your card, you can easily "fill" it with the content of the image file on disk:
Code: Select all
...
put url("binfile:path/to/your/image.jpg") into img "Name of your image here")
...
That's it

Posted: Thu Feb 28, 2008 9:20 pm
by Andycal
Klaus, next time I'm at the Oktoberfest, I'll buy you a beer!
Posted: Thu Feb 28, 2008 9:23 pm
by Klaus
Hi Andy,
thanks a lot, but that's about 600 km away from my home!
But if you ever come to or near Cologne, drop a line
