A Vector graphic is an image that is stored in a file as a collection of objects such as a rectangle, ellipse, line and polygon.
The attributes of each object are stored such as
- X and Y co-ordinates
- fill colour
- line thickness
- line colour
Objects can be layered one on top of the other to create image.
- A Vector graphic is stored in a file as a group of objects and their attributes.
- The more objects that are added, the more data that must be stored, therefore the file size will increase.
- A Vector graphic is resolution independent, this means it can be resized without losing clarity (it does not pixelate).
The 4 vector graphics that you need to know for N5 Computing Science is:
A vector graphic does not store the picture itself but the instructions of how to draw the picture.
A ellipse might be stored as:
ellipse (centre xcoordinates , centre y coordinates start, radius, line colour, fill colour)
A line might be stored as
Line(x coordinates start, y coordinates start, x coordinates start, y coordinates start, line colour)