+ $this->aViewBox[0] = max(-180.0, min(180, $this->aViewBox[0]));
+ $this->aViewBox[1] = max(-90.0, min(90, $this->aViewBox[1]));
+ $this->aViewBox[2] = max(-180.0, min(180, $this->aViewBox[2]));
+ $this->aViewBox[3] = max(-90.0, min(90, $this->aViewBox[3]));
+
+ if (abs($this->aViewBox[0] - $this->aViewBox[2]) < 0.000000001
+ || abs($this->aViewBox[1] - $this->aViewBox[3]) < 0.000000001
+ ) {
+ userError("Bad parameter 'viewbox'. Not a box.");
+ }
+