Added way to set viewport width/height

Merge from nbrogi repository