This assignment expands on the shapes hierarchy assignment.

The VectorCanvas class

Create a new class called "VectorCanvas". (NOTE: I chose the name VectorCanvas since this class will be used to implement the general concept of "vector graphics" - for more information about vector graphics look up the term online). VectorCanvas should be a subclass of the Canvas class, ie.

    Class VectorCanvas
        inherits Canvas
        ...

A VectorCanvas "remembers" which shapes were drawn onto it. In this way the picture can be modified later by changing the dimensions of one or more shapes. The VectorCanvas should contain an array of DrawableObjects that were placed on the VectorCanvas. VectorCanvas should also include a Draw method as shown below. (This Draw is NOT the same as the Draw method that is in the DrawableObject class):

	Private items(100) as DrawableObject
    Public Sub Draw(DrawableObject d)

The Draw method takes a single DrawableObject as a parameter. When the Draw method is called, it should save the DrawableObject, d, into the array of items for the VectorCanvas. It should then call the Draw method of the DrawableObject to actually draw the image onto the Canvas. e.g.

    Public Sub Draw(DrawableObject d)
		' WRITE CODE HERE TO STORE d INTO THE items ARRAY (see above)
		...
		
		' Then call the Draw method of the DrawableObject to actually draw the image. 
		' The Draw method of a DrawableObject expects a Canvas parameter. For this parameter simply
		' use "Me" (without the quotes) since the VectorCanvas object ISA Canvas.
		
		d.Draw(Me)
	End Sub
The DrawableObject.Move method

Create the following method in the DrawableObject class:

    Public Sub MustOverride Move(deltaX as Integer, deltaY as Integer)

The Move method should "move" the DrawableObject in the X and Y directions by the values

deltaX
and
deltaY
. deltaX and deltaY could be positive or negative. The actual implementation of this class will be different for class that inherits from DrawableObject. For example in the circle class, the Move method will need to adjust the X and Y values of the center point. In the Polygon class, every point that is stored for the Polygon must be adjusted.

The VectorCanvas.Move method

Create the following method in the VectorCanvas class:

    Public Sub Move(deltaX as Integer, deltaY as Integer)

This method should call the Move method for each object that is stored in the array of items in the VectorCanvas. This will have the effect of shifting the entire picture by deltaX in the X direction and by deltaY in the Y direction.