Minor features added to MSWLogo 6.0e based on some feedback from Yehuda. Yehuda Katz wrote: > > Here is the clock face of your program. I added to it the black circle. > > Compare the "3" side with that of the "9" side. > > It would be more offending if the face was smaller. > > [[Yehuda]] Here is the OLD CLOCK.LGO example fixed to draw a perfect FACE. Except it does not handle 2 digits perfectly. See new way below. *********************** OLD WAY ************************ to drawface cs circle 120 setheading 30 pu repeat 12 ~ [ fd 120 setx xcor-5 sety ycor+12 make "sh heading setheading 90 label repcount setheading :sh setx xcor+5 sety ycor-12 bk 120 rt 30 ] pd end ************************************************************ This will handle any length string, in any font perfectly with no change. What was missing is LABELSIZE, there was nothing wrong with LABEL. If you wanted LABEL to behave as CENTERLABEL does below, that is simply a matter of taste. For example you like drawing ARCs from the edge I like drawing them from the center. You like drawing Text from the center and I like drawing it from the edge :-). Maybe I'll add centeredlabel to the library. In the old way you could find the "LABELSIZE" by trial and error, which was clumsy, but still doable. *********************** NEW WAY **************************** to centeredlabel :text ; You can add this to your library LABELSIZE is part of MSWLogo 6.0e make "width (first labelsize :text)/2 make "height (last labelsize :text)/2 setx xcor-:width sety ycor+:height make "sh heading setheading 90 label :text setheading :sh setx xcor+:width sety ycor-:height end to drawface cs circle 120 setheading 30 pu repeat 12 ~ [ fd 120 centeredlabel repcount bk 120 rt 30 ] pd end -- =============================================================== George Mills email: mills@softronix.com http://www.softronix.com The www page contains some very powerful educational software. Our single most important investment is our kids. --------------------------------------------------------------- Please post messages to the Logo forum to logo-l@gsn.org. Mail questions about the list administration to logofdn@gsn.org. To unsubscribe send unsubscribe logo-l to majordomo@gsn.org.
Global SchoolNet Foundation -
Linking Kids Around the World!
Copyright GSN - All Rights Reserved
- Comments
& Questions
Visit GSN's
Global
Schoolhouse for more exciting learning resources!
Search our Site
-
Home