digital_electricity: Implemented zooming of components

Authored by rudranilbasu on Aug 20 2017, 6:28 PM.

Description

digital_electricity: Implemented zooming of components

Currently zooming is done via "+" and "-" keys (icons will be added
shortly) for zoom in and zoom out respectively.

Zoom in is done in the zoomIn() function where the currentZoom is
updated to it's value in between maxZoom and minZoom. and the final zoom
ratio is calculated, which is multiplied by the imgWidth and imgHwight,
thus updating the values of the dimensions of the components present in the
playArea.

Similar procedure is done for the ZoomOut, only in this case, the
currentZoom is subtracted by the zoomStep.

Signed-off-by: Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>

Details

Committed
rudranilbasuAug 20 2017, 6:28 PM
Parents
R2:abfae71c78a3: digital_electricity: use 7 segment display in level 22
Branches
Unknown
Tags
Unknown