Vector Graphics

Vector Graphics are images that are made up from defintions of objects.

This is what we have here.

Adding some Vector Graphic Functionality

With Vector Graphics you should be able to scale without any distortion

With Vector Graphics you should be able to rotate by mathematically manipulating the data.

The Scaled Drawings

The Rotated Drawings

Implementation

Below, you can see the functions scale() and rotate() that we will manipulate the data with. Once maipulated, we will redraw the image

Make note of the following:

  • the data is manipulated NOT the object defintions
  • some mathematics needs to carried out on the data

Controller Routine

Scale

The function is passed the data and the scaleFactor.

The scaleFactor is applied and then the data is returned

Rotate

The function is passes the data and the direction of rotation

The rotation is applied - is it correct?





This is a development site to gather together teaching materials for AQA A Level Computer Science. It will be changing and being remodelled throughout this year.

No data is stored on the site but cookies are used to enable the website to function properly.

© 2025 Jay Patel - Dixons Sixth Form Academy, Bradford

Contact: jpatel@dixons6a.com