The next thing are some commands to draw to the image.
The drawing commands use the fore and background color. Most things can be drawn a line, dotted line, filled and dotted filled.
`This is an example of how to use the comamnds of the ImageEnhance - plugin (c)2004 by Stefan Mahr
`Use and change this as you wish
` - TOPIC -
`Draw to image and render text to the image
`Hitimer needs the plugin from IanM - matrix1Utility: You can find it here:
`Otherwise use the normal timer command instead
Sync on
If make image(16, 500, 500)
T3 = Hitimer(1000000)
`t3 = timer()
If Lock image(16) <> -1
`generally speaking there are two ways to draw standard fugures to an image:
`dotted the last parameter defindes the step to the next dot
Image line 16, 50, 50, 100, 100, 5
`or solid
Image line 16, 110, 110, 130, 200
` frams are drawn with fore And background color
Ink Rgb(255, 255, 28), Rgb(255, 55, 128)
Image frame 16, 150, 150, 200, 200, 5
Image frame 16, 210, 200, 260, 270
`draw filled objects
`a box is a filled frame...
`also here: dotted
Image box 16, 350, 150, 400, 200, 5
`and solid
Image box 16, 410, 200, 460, 270
`and the same for the other objects
Ink Rgb(128, 128, 255), Rgb(255, 255, 128)
Image circle 16, 350, 350, 100
Image circle 16, 410, 360, 60, 10
Image ellipse 16, 110, 350, 100, 80
Image ellipse 16, 90, 350, 60, 30, 27
Image ellipse fill 16, 210, 70, 70, 30, 8
Image ellipse fill 16, 110, 65, 20, 10
Image circle fill 16, 350, 360, 40, 3
Image circle fill 16, 350, 50, 40
`image text
Ink Rgb(255, 00,0), Rgb(255, 255, 000)
Set text size 20
Set text to bolditalic
Set text font "Times New Roman"
T7 = Hitimer(1000000)
`t7 = timer()
`the text is drawn using the standard settings
Image text 16, 1, 1, "First text"
` option underlined
Set text to italic
Image text 16, 301, 91, "underlined text", 1
Set text to bold
Image text 16, 211, 111, "StrikeOut text", 2
T8 = Hitimer(1000000)
`t8 = timer()
Unlock image 16
Else
Print "Can not Lock image 16"
Endif
Else
Print "Can not create image 16"
Endif
T4 = Hitimer(1000000)
`t4 = timer()
`show image
Paste image 16, 10, 10
`show some stats
Ink Rgb(255, 255, 255), 0
Text 790, 290, "time in 1/1'000'000 sec"
Text 790, 310, "time draw graphic : "+ Str$(t4-t3)
Text 790, 350, "time text rendering : "+ Str$(t8-t7)
Text 790, 370, "Press right mousekey "
Do
`Repeat until right mouseclick
If Mouseclick() = 2 Then Exit
Sync
Loop
GALACTIC X - A very early demo is now available - comments very welcome - http://www.angelfire.com/droid/galacticx/
also my IDE - jaPROe and some snippets and tools