This site requires JavaScript, please enable it in your browser!
Greenfoot back
jaycee1021
jaycee1021 wrote ...

2017/3/3

help please!!!

jaycee1021 jaycee1021

2017/3/3

#
how do you draw a horizontal line? i have a school project and i have no idea what to do..
danpost danpost

2017/3/3

#
jaycee1021 wrote...
how do you draw a horizontal line? i have a school project and i have no idea what to do..
GreenfootImage image = << some image >>;
image.drawLine(<< some x value >>, << some y value >>, << a different x value >>, << the same y value >>);
Using the same y values makes the line horizontal; the difference in x values determines the length of the line. The x and y values must be less than the width and height of the image respectively.
You need to login to post a reply.