Programmerare, skeptiker, sekulärhumanist, antirasist.
Författare till bok om C64 och senbliven lantis.
Röstar pirat.
2009-10-31
To do bars, the Bar instruction is used. It takes the color, position and size as arguments. This code…
//Set image size and background color. Clear 100x100 #003366 //Draw a dark blue bar that covers most of the image. Bar #225599 X:10 Y:10 W:80 H:80
…produces this blue rectangle:
To do a bar that is only party filled; you can specify the percentage of the filling as an additional argument. In this example, I draw a white rectangle over the blue rectangle, on the exact same place as it. Also, I use the VFill argument to specify that the height will be only 75% of the full rectangle. This code…
//Set image size and background color. Clear 100x100 #003366 //Draw a dark blue bar that covers most of the image. Bar #225599 X:10 Y:10 W:80 H:80 //Draw a white bar on over the dark blue bar. //Let it be a horizontal bar, 75% filled. Bar #ffffff X:10 Y:10 W:80 H:80 VFill:75%
…produces this white bar over the blue rectangle:
The argument used for doing a bar that is partly filled horizontally, use HFill instead of VFill.
Categories: General
Tags: Monkeybone
Bjud mig på en kopp kaffe (20:-) som tack för bra innehåll!
Leave a Reply