Overview
The ImageLib library extends the support for drawings and images.
The library includes five types of objects:
- Drawer - The main object, includes methods for drawing on other images.
- Bitmap - Bitmaps are images loaded from image files or newly created.
- Brush - Brushes are graphic objects which are used when filling shapes (eg:
FillRectangle).
- Pen - Pens are graphic objects which are used when drawing shapes (eg:
DrawRectangle).
- Rectangle - Rectangle objects represent a set of four points (organized as a rectangle)
and are used in other drawing methods. It is more efficient to use rectangles than using
four points each time.
Example:
'Add a Bitmap object named bitmap1, Brush object named brush1, a Drawer
object named drawer and a Rectangle object named rect1.
Sub Globals
End Sub
Sub App_Start
Form1.Show
bitmap1.New2(100,100)
rect1.New1(0,0,bitmap1.Width,bitmap1.Height)
drawer.New2(bitmap1.Value, b4pObject(5)) 'The drawer will draw on
bitmap1
brush1.New1(cGold)
drawer.FillRectangle(brush1.Value,rect1.Value)
brush1.Color = cBlue
rect1.Width = 40
drawer.FillEllipse(brush1.Value,rect1.Value)
form1.DrawImage(bitmap1.Value,10,10) 'Draws bitmap1 on form1
End Sub