PhpOffice\PhpPresentation\Reader\PowerPoint97::readRecordOfficeArtClientAnchor PHP Method

readRecordOfficeArtClientAnchor() private method

An atom record that specifies the location of a shape.
private readRecordOfficeArtClientAnchor ( string $stream, integer $pos )
$stream string
$pos integer
    private function readRecordOfficeArtClientAnchor($stream, $pos)
    {
        $arrayReturn = array('length' => 0);
        $data = $this->loadRecordHeader($stream, $pos);
        if ($data['recVer'] == 0x0 && $data['recInstance'] == 0x0 && $data['recType'] == 0xf010 && ($data['recLen'] == 0x8 || $data['recLen'] == 0x10)) {
            // Record Header
            $arrayReturn['length'] += 8;
            // Datas
            switch ($data['recLen']) {
                case 0x8:
                    $arrayReturn['top'] = (int) (self::getInt2d($stream, $pos + $arrayReturn['length']) / 6);
                    $arrayReturn['length'] += 2;
                    $arrayReturn['left'] = (int) (self::getInt2d($stream, $pos + $arrayReturn['length']) / 6);
                    $arrayReturn['length'] += 2;
                    $arrayReturn['width'] = (int) (self::getInt2d($stream, $pos + $arrayReturn['length']) / 6) - $arrayReturn['left'];
                    $arrayReturn['length'] += 2;
                    $arrayReturn['height'] = (int) (self::getInt2d($stream, $pos + $arrayReturn['length']) / 6) - $arrayReturn['left'];
                    $arrayReturn['length'] += 2;
                    $pos += 8;
                    break;
                case 0x10:
                    throw new \Exception('PowerPoint97 Reader : record OfficeArtClientAnchor (0x00000010)');
            }
        }
        return $arrayReturn;
    }
PowerPoint97