Lines Matching refs:width

14     protected $width = 0;  variable in splitbrain\\slika\\GdAdapter
98 list($this->width, $this->height) = [$this->height, $this->width];
101 list($this->width, $this->height) = [$this->height, $this->width];
126 public function resize($width, $height) argument
128 list($width, $height) = $this->boundingBox($width, $height);
129 $this->resizeOperation($width, $height);
137 public function crop($width, $height) argument
139 … list($this->width, $this->height, $offsetX, $offsetY) = $this->cropPosition($width, $height);
140 $this->resizeOperation($width, $height, $offsetX, $offsetY);
184 $this->width = $info[0];
209 * @param int $width
214 protected function createImage($width, $height) argument
219 $canvas = @imagecreatetruecolor($width, $height);
222 $canvas = @imagecreate($width, $height);
291 * @param int $width width of the bounding box
296 protected function boundingBox($width, $height) argument
298 $width = $this->cleanDimension($width, $this->width);
301 if ($width == 0 && $height == 0) {
307 $height = round(($width * $this->height) / $this->width);
308 } else if (!$width) {
310 $width = round(($height * $this->width) / $this->height);
313 $scale = min($width / $this->width, $height / $this->height);
314 $width = $this->width * $scale;
318 return [$width, $height];
347 * @param int $width
352 protected function cropPosition($width, $height) argument
354 if ($width == 0 && $height == 0) {
359 $height = $width;
362 if (!$width) {
363 $width = $height;
367 $oldRatio = $this->width / $this->height;
368 $newRatio = $width / $height;
373 $cropWidth = $this->width;
374 $cropHeight = (int)($this->width / $newRatio);
384 $cropWidth = $this->width;
385 $cropHeight = (int)($this->width / $newRatio);
390 $offsetX = (int)(($this->width - $cropWidth) / 2);
421 $this->width,
434 $this->width,
442 $this->width = $toWidth;