Programmerare, skeptiker, sekulärhumanist, antirasist.
Författare till bok om C64 och senbliven lantis.
Röstar pirat.
2010-01-27
The filters in Monkeybone rely on regions to know what area on the image they apply to. The following lines define a picture 400 pixels wide and 300 pixels with black background. Also, it defines an invisible region.
Clear 400x300 #000000 Region (10,10) (200,10) (200,200) (250,250) (60,250) (10,200)
The Tint filter takes only arguments: The color and the opacity. Opacity can be given as an integer between 0 and 255 where 0 is completely transparent and 255 is completely solid, but it can also be given as a percent value. This adds some purple color to the region with opacity of 100:
Tint #ff00ff O:100
These two lines move the region 10 pixels to the right, and fill the region with solid purple color. O:100% gives a solid fill, but O:100 gives an opacity that is less than 50%.
Region (20,10) (210,10) (210,200) (260,250) (70,250) (20,200) Tint #ff00ff O:100%
Finally, these two lines move the region another 10 pixels to the right, and fill the region with blue color, with 50% opacity. An opacity of 50% can be written as O:127 or O:50%.
Region (30,10) (220,10) (220,200) (270,250) (80,250) (30,200) Tint #0000ff O:50%
To try this out, create a text file, change the file ending to .mob, and insert these lines:
Clear 400x300 #000000 Region (10,10) (200,10) (200,200) (250,250) (60,250) (10,200) Tint #ff00ff O:100 Region (20,10) (210,10) (210,200) (260,250) (70,250) (20,200) Tint #ff00ff O:100% Region (30,10) (220,10) (220,200) (270,250) (80,250) (30,200) Tint #0000ff O:50%
When you open the file in the Monkeybone viewer, this is the result:
The Monkeybone viewer is available for download on this page.
Categories: General
Tags: Monkeybone
Bjud mig på en kopp kaffe (20:-) som tack för bra innehåll!
Leave a Reply