I see a post by nXIII in the future of this thread.[/psychic]
I don't know. I'll look into it.
Offline
Jwosty wrote:
ScratchReallyROCKS wrote:
I see a post by nXIII in the future of this thread.[/psychic]
Ohhhhhhhhhhh yeaya!
![]()
It's almost impossible for it not to happen.[/stupid]SRR wrote:
I don't know. I'll look into it.
Thanks!
![]()
Mwhaha!
Offline
bbbeb wrote:
Jwosty wrote:
ScratchReallyROCKS wrote:
I see a post by nXIII in the future of this thread.[/psychic]
Ohhhhhhhhhhh yeaya!
![]()
It's almost impossible for it not to happen.[/stupid]SRR wrote:
I don't know. I'll look into it.
Thanks!
![]()
Mwhaha!
?!
Google it.
Offline
well, i guess your psychic mind was wrong. there's me instead.
the easy way is probably to create a new method (and call it through the draw on) to add an ellipseMorph to the morph you're drawing using something that looks like
| circle |
circle _ EllipseMorph new.
circle extent: X@Y.
circle position: self position.
circle color: aColor.
self addMorph: circle
get it?
Offline
MUHUHAHAHA You were right!
Anyway, just use the #fillOval:color: method on any Canvas.
ex:
aCanvas fillOval: (self position extent: 20 asPoint) color: color. "This fills a 20x20 oval (circle in this case) at the morph's position with the morph's color."
Offline
MUHAHAHAHAHAHAHA! ScratchReallyROCKS is psychic!
To save a few characters, 20@20 is quicker than 20 asPoint. But I don't know why you'd want to save a few characters' typing. And also, I'm probably wrong as usual.
Offline
TheSuccessor wrote:
MUHAHAHAHAHAHAHA! ScratchReallyROCKS is psychic!
![]()
To save a few characters, 20@20 is quicker than 20 asPoint. But I don't know why you'd want to save a few characters' typing. And also, I'm probably wrong as usual.![]()
well you know what? i don't think so! MUAHAHA nXIII will give the verdict
Offline
TheSuccessor wrote:
MUHAHAHAHAHAHAHA! ScratchReallyROCKS is psychic!
![]()
To save a few characters, 20@20 is quicker than 20 asPoint. But I don't know why you'd want to save a few characters' typing. And also, I'm probably wrong as usual.![]()
No, I think you're right, it just might be easier to change the radius (one place instead of two)
Offline
nXIII wrote:
MUHUHAHAHA You were right!
Anyway, just use the #fillOval:color: method on any Canvas.
ex:
aCanvas fillOval: (self position extent: 20 asPoint) color: color. "This fills a 20x20 oval (circle in this case) at the morph's position with the morph's color."
Oh yay! Thanks!
Google it.
Offline
Jwosty wrote:
Uh oh... One more thing: It seems that the default bounds or whatever is called is something like 50@50... How do I change this?
![]()
override #initialize to be something like this:
initialize
super initialize. "THIS LINE IS VERY IMPORTANT!"
self extent: 20@20. "Or something else."
Offline
nXIII wrote:
super initialize. "THIS LINE IS VERY IMPORTANT!"
What does that do?
Offline
nXIII wrote:
Jwosty wrote:
Uh oh... One more thing: It seems that the default bounds or whatever is called is something like 50@50... How do I change this?
![]()
override #initialize to be something like this:
initialize
super initialize. "THIS LINE IS VERY IMPORTANT!"
self extent: 20@20. "Or something else."
Thanks!
In case you are wondering what this is for, I am making an iPhone app in Pharo Smalltalk.
Google it.
Offline
nXIII wrote:
Jwosty wrote:
Another thing: how do you clear all the pen trails in the world?
in the World? What are you using to MAKE the pen drawings?
Yes, and... wait a second. Dang! I almost forgot that the Smalltalk pen trails are different than it's Scratch counterpart...
hmm...
This is what I am using for the orbiting algorithm (I am making my Scratch project, WhirlyGigs into an iPhone app with Smalltalk):
xPos := theta sin * 50.
yPos := theta cos * 50.
self position: xPos @ yPos.
theta := theta + anInteger.
(Delay forMilliseconds: 100) waitvs the my project's algorithm. You can see it here.
Google it.
Offline
Jwosty wrote:
nXIII wrote:
Jwosty wrote:
Another thing: how do you clear all the pen trails in the world?
in the World? What are you using to MAKE the pen drawings?
Yes, and... wait a second. Dang! I almost forgot that the Smalltalk pen trails are different than it's Scratch counterpart...
hmm...
This is what I am using for the orbiting algorithm (I am making my Scratch project, WhirlyGigs into an iPhone app with Smalltalk):Code:
xPos := theta sin * 50. yPos := theta cos * 50. self position: xPos @ yPos. theta := theta + anInteger. (Delay forMilliseconds: 100) waitvs the my project's algorithm. You can see it here.
So what are you using for pen trails?
Offline
nXIII wrote:
Jwosty wrote:
nXIII wrote:
in the World? What are you using to MAKE the pen drawings?
Yes, and... wait a second. Dang! I almost forgot that the Smalltalk pen trails are different than it's Scratch counterpart...
hmm...
This is what I am using for the orbiting algorithm (I am making my Scratch project, WhirlyGigs into an iPhone app with Smalltalk):Code:
xPos := theta sin * 50. yPos := theta cos * 50. self position: xPos @ yPos. theta := theta + anInteger. (Delay forMilliseconds: 100) waitvs the my project's algorithm. You can see it here.
So what are you using for pen trails?
I don't know now... I'll figure it out though. Thanks for all your help!
Google it.
Offline
Jwosty wrote:
nXIII wrote:
Jwosty wrote:
Yes, and... wait a second. Dang! I almost forgot that the Smalltalk pen trails are different than it's Scratch counterpart...hmm...
This is what I am using for the orbiting algorithm (I am making my Scratch project, WhirlyGigs into an iPhone app with Smalltalk):Code:
xPos := theta sin * 50. yPos := theta cos * 50. self position: xPos @ yPos. theta := theta + anInteger. (Delay forMilliseconds: 100) waitvs the my project's algorithm. You can see it here.
So what are you using for pen trails?
I don't know now... I'll figure it out though. Thanks for all your help!
![]()
I think Squeak has a built-in pen mechanism, the Pen class in the Graphics categories. The class has some testing/example methods for using it. Good luck!
Offline
Jwosty wrote:
Code:
xPos := theta sin * 50. yPos := theta cos * 50. self position: xPos @ yPos. theta := theta + anInteger. (Delay forMilliseconds: 100) wait
The Point class has something like this already built in:
tempPoint := Point r: (number) degrees: (number). xPos := tempPoint x. yPos := tempPoint y. (Delay forMilliseconds: 100) wait
Offline