Gets the dimension taken by the label, including the spacing and offset.
[0]: width
[1]: height

@return int[]
160709
public function getDimension() {
        $w = 0;
        $h = 0;

        $dimension = $this->font->getDimension();
        $w = $dimension[0];
        $h = $dimension[1];

        if ($this->position === self::POSITION_TOP || $this->position === self::POSITION_BOTTOM) {
            $h += $this->spacing;
            $w += max(0, $this->offset);
        } else {
            $w += $this->spacing;
            $h += max(0, $this->offset);
        }

        return array($w, $h);
    }
418674
public function getLogoDimensions()
    {
        // Initialise:
        
        $data = [];
        
        // Obtain Dimensions:
        
        $widths  = $this->dbObject('BrandLogoWidth');
        $heights = $this->dbObject('BrandLogoHeight');
        
        // Iterate Width Viewports:
        
        foreach ($widths->getViewports() as $viewport) {
            
            if ($value = $widths->getField($viewport)) {
                $data[$viewport]['Width'] = $value;
                $data[$viewport]['Breakpoint'] = $widths->getBreakpoint($viewport);
            }
            
        }
        
        // Iterate Height Viewports:
        
        foreach ($heights->getViewports() as $viewport) {
            
            if ($value = $heights->getField($viewport)) {
                $data[$viewport]['Height'] = $value;
                $data[$viewport]['Breakpoint'] = $heights->getBreakpoint($viewport);
            }
            
        }
        
        // Create Items List:
        
        $items = ArrayList::create();
        
        // Create Data Items:
        
        foreach ($data as $item) {
            $items->push(ArrayData::create($item));
        }
        
        // Answer Items List:
        
        return $items;
    }
171951
public function getDimensions()
    {
        $dimensions = [];

        if (!empty($this->getDimension())) {
            $dimensionId = str_replace('.', '_', $this->getDimension()->getId());
            $dimensions[$dimensionId] = $this->getDimension()->getName();
        }

        if (!empty($this->getSubtableDimension())) {
            $subDimensionId = str_replace('.', '_', $this->getSubtableDimension()->getId());
            $dimensions[$subDimensionId] = $this->getSubtableDimension()->getName();
        }

        if (!empty($this->getThirdLeveltableDimension())) {
            $subDimensionId = str_replace('.', '_', $this->getThirdLeveltableDimension()->getId());
            $dimensions[$subDimensionId] = $this->getThirdLeveltableDimension()->getName();
        }

        return $dimensions;
    }
1305459
public function getSizes()
    {
        $sizes = [];
        if ($this->phoneSize === 'auto') {
            $sizes['phone'] = $this->generatePhoneSize();
        } elseif ($this->phoneSize === true && $this->hasPhoneColumns) {
            $sizes['phone'] = $this->phoneColumns;
        }
        if ($this->tabletSize === 'auto') {
            $sizes['tablet'] = $this->generateTabletSize();
        } elseif ($this->tabletSize === true && $this->hasTabletColumns) {
            $sizes['tablet'] = $this->tabletColumns;
        }
        if ($this->mediumDesktopSize === 'auto') {
            $sizes['mediumDesktop'] = $this->generateMediumDesktopSize();
        } elseif ($this->mediumDesktopSize === true && $this->hasMediumDesktopColumns) {
            $sizes['mediumDesktop'] = $this->mediumDesktopColumns;
        }
        if ($this->largeDesktopSize === 'auto') {
            $sizes['largeDesktop'] = $this->generateLargeDesktopSize();
        } elseif ($this->largeDesktopSize === true && $this->hasLargeDesktopColumns) {
            $sizes['largeDesktop'] = $this->largeDesktopColumns;
        }

        return $sizes;
    }
986560
public function getWidth()
    {
      if ($this->width != null) {
        return $this->width;
      }

      list($width) = getimagesize($this->_files['tmp_name']);

      return $width;
    }
776506
protected function getColumnWidths()
    {
        $column_widths = [];

        for ($i = 0; $i < $this->column_count; $i++) {
            if (!isset($this->data[$i])) {
                $column_widths[] = 0;
                continue;
            }
            $column_widths[] = $this->getColumnWidth($this->data[$i]);
        }

        return $column_widths;
    }
632325
public function dimensions()
	{
		if (!$this->dimensions)
		{
			$this->dimensions = array(0, 0);

			if ($this->isImage() && file_exists($this->path()))
			{
				$this->dimensions = getimagesize($this->path());
			}
		}

		return $this->dimensions;
	}
264040
public function getBoxSize()
    {
        $box = [];

        // build draw object
        $draw = new \ImagickDraw();
        $draw->setStrokeAntialias(true);
        $draw->setTextAntialias(true);

        // set font file
        if ($this->hasApplicableFontFile()) {
            $draw->setFont($this->file);
        } else {
            throw new \Intervention\Image\Exception\RuntimeException(
                "Font file must be provided to apply text to image."
            );
        }

        $draw->setFontSize($this->size);

        $dimensions = (new \Imagick())->queryFontMetrics($draw, $this->text);

        if (strlen($this->text) == 0) {
            // no text -> no boxsize
            $box['width'] = 0;
            $box['height'] = 0;
        } else {
            // get boxsize
            $box['width'] = intval(abs($dimensions['textWidth']));
            $box['height'] = intval(abs($dimensions['textHeight']));
        }

        return $box;
    }
510066
public function getWidth()
    {
        try {
            list($width) = explode('x', $this->getSize());
        } catch (Exception $e) {
            $width = '';
        }
        return $width;
    }
462743
public function getSize()
    {
        $size = $this->image->getSize();

        return $this->arr([
                              'width'  => $size->getWidth(),
                              'height' => $size->getHeight()
                          ]
        );
    }
1155600
protected function getDimensions($text)
    {
        $box = imagettfbbox(38, 0, $this->fontPath, $text);

        return [
            'width' => abs($box[4] - $box[0]),
            'height' => abs($box[5] - $box[1]),
        ];
    }
49007
protected function getInsertDimensions()
    {
        $width = $this->owner->getWidth();
        $height = $this->owner->getHeight();
        if (!$height || !$width) {
            return null;
        }

        $maxWidth = $this->owner->config()->get('insert_width');
        $maxHeight = $this->owner->config()->get('insert_height');

        // Within bounds
        if ($width < $maxWidth && $height < $maxHeight) {
            return [
                'width' => $width,
                'height' => $height,
            ];
        }

        // Check if sizing by height or width
        if (($width * $maxHeight) < ($height * $maxWidth)) {
            // Size by height
            return [
                'width' => intval(($width * $maxHeight) / $height + 0.5),
                'height' => $maxHeight,
            ];
        } else {
            // Size by width
            return [
                'width' => $maxWidth,
                'height' => intval(($height * $maxWidth) / $width + 0.5),
            ];
        }
    }
681651
public function getSize()
    {
        $command = $this->driver->factoryCommand(
            'window/' . $this->windowHandle . '/size',
            WebDriver_Command::METHOD_GET
        );
        $value = $this->driver->curl($command)['value'];
        return ['height' => $value['height'], 'width' => $value['width']];
    }
717525
public function size(){
        if(empty($this->img)) $this->throwError('没有指定图像资源');
        return array($this->info['width'], $this->info['height']);
    }
70391
public function getWidth() : int {
        $first = $this->getStart();
        $last = $this->getEndPosition();

        return $last - $first;
    }
640280
public function getFolderName()
	{
		$return = array($this->getWidth(), 'x', $this->getHeight());
		
		if ($this->isCropped()) {
			
			if ($this->isCropVariant()) {
				$return[] = 'c';
				$return[] = intval($this->getCropSourceWidth());
				$return[] = 'x';
				$return[] = intval($this->getCropSourceHeight());
			}

			$return[] = 't';
			$return[] = intval($this->getCropTop());
			$return[] = 'l';
			$return[] = intval($this->getCropLeft());
			$return[] = 'w';
			$return[] = intval($this->getCropWidth());
			$return[] = 'h';
			$return[] = intval($this->getCropHeight());
		}
		
		return join('', $return);
	}
1001282
public function getDimension() {
        $w = imagefontwidth($this->font) * strlen($this->text);
        $h = imagefontheight($this->font);

        $rotationAngle = $this->getRotationAngle();
        if ($rotationAngle === 90 || $rotationAngle === 270) {
            return array($h, $w);
        } else {
            return array($w, $h);
        }
    }