Sets the text position for drawing.

@param int $position
18012
public function setPosition($position) {
        $position = intval($position);
        if ($position !== self::POSITION_TOP && $position !== self::POSITION_RIGHT && $position !== self::POSITION_BOTTOM && $position !== self::POSITION_LEFT) {
            throw new CINArgumentException('The text position must be one of a valid constant.', 'position');
        }

        $this->position = $position;
    }
1365598
public void setPosition(CmsPositionBean position) {

        setPosition(position.getHeight(), position.getWidth(), position.getLeft(), position.getTop());
    }
509311
public function seek($position): void
    {
        $args = [$position];
        $methodName = __FUNCTION__;

        $this->findAndCall($methodName, $args);
    }
288257
public function addStringWater(Text $text, $position) {

        if ( !$this->imgDst ) return;

        $this->position = $position;

        if ( !$position ) {
            $this->position = self::POS_RANDOM;
        } else {
            $this->position = $position;
        }
        $fontColor = StringUtils::hex2rgb($text->getColor());
        $color = imagecolorallocatealpha($this->imgDst,
            $fontColor['r'],
            $fontColor['g'],
            $fontColor['b'],
            $text->getAlpha());

        $sizeSrc = $this->getImageSize($this->imgDst);
        if ( !file_exists($text->getFont()) ) {
            $text->setFont(dirname(__FILE__).$text->getFont());
        }

        $ttfBox = imagettfbbox($text->getFontsize(), $text->getAngle(), $text->getFont(), $text->getContent());
        $textWidth = $ttfBox[2] - $ttfBox[0];
        $textHeight = abs($ttfBox[7]);
        $waterPosition = $this->getWaterPos($sizeSrc, array($textWidth, $textHeight));
        if ( $this->imgDst ) {
            imagettftext(
                $this->imgDst,
                $text->getFontsize(),
                $this->angle,
                $waterPosition[0],
                $waterPosition[1]+$textHeight,
                $color,
                $text->getFont(),
                $this->getEncodedText($text->getContent()));
        }

        return $this;

    }
1068177
public function reposition($position)
    {
        return Basecamp::todoListGroups($this->bucket->id)
                       ->reposition($this->id, $position);
    }
1178966
public function setPosition($position)
    {
        if (!in_array($position, array('first', 'last'))){
            throw new \InvalidArgumentException(sprintf('Button position "%s" does not exist', $position));
        }
        $this->position = $position;
        return $this;
    }
702637
public function reset(int $position = 0): bool
    {
        $this->pos = $position;
        if (\fseek($this->fp, $position, SEEK_SET) === 0) {
            return true;
        }
        // @codeCoverageIgnoreStart
        throw new CannotPerformOperation(
            'fseek() failed'
        );
        // @codeCoverageIgnoreEnd
    }
1331156
public function setByPosition($pos, $value)
    {
        switch ($pos) {
            case 0:
                $this->setCustomerId($value);
                break;
            case 1:
                $this->setCustomerGroupId($value);
                break;
        } // switch()
    }
1006930
public function setIndex($position)
	{
		if ( ! is_int($position) || $position < 0)
		{
			throw new \InvalidArgumentException('Wrong index value.');
		}
		
		$this->index = $position;
		
		return $this;
	}
426890
public function setSalt(string $salt, string $position = self::SALT_AFTER): self
    {
        $this->checkSaltPositionArgument($position);
        $this->salt = $salt;
        $this->saltPosition = $position;

        return $this;
    }
807285
private function forward($position)
    {
        $encoder = $this->getEncoder();

        while ($this->cursor < $position) {
            $length = strlen($this->buffer);

            if ($this->cursor + $length > $position) {
                $this->buffer = substr($this->buffer, $position - $this->cursor);
                $this->cursor = $position;
                break;
            }

            $this->cursor += $length;
            $this->buffer = '';

            if (!$encoder->valid()) {
                $this->buffer = null;
                break;
            }

            $this->buffer = $encoder->current();
            $encoder->next();
        }
    }
74087
public function set_align($location) {
        if (in_array($location, array('left', 'centre', 'center', 'right', 'fill', 'merge', 'justify', 'equal_space'))) {
            $this->set_h_align($location);

        } else if (in_array($location, array('top', 'vcentre', 'vcenter', 'bottom', 'vjustify', 'vequal_space'))) {
            $this->set_v_align($location);
        }
    }
1035810
public function setJobTitle($position)
    {
        $this->jobTitle = new Element('small', 'source');
        $this->jobTitle->textContent->push($position);

        return $this;
    }
420618
public function position(string $position): Log
    {
        $acceptablePositions = [
            'top right',
            'top left',
            'bottom right',
            'bottom left'
        ];

        if (array_search(strtolower($position), $acceptablePositions) === false) {
            $acceptablePositions = implode(', ', $acceptablePositions);
            throw new \Exception("position can only be: ${acceptablePositions}");
        }

        $this->position = $position;
        Alertify::flash();
        return $this;
    }
82629
public function setPosition($position)
    {
        if (in_array($position, [self::ADDON_LEFT, self::ADDON_RIGHT])) {
            $this->position = $position;
        }

        return $this;
    }
496251
public function set_seek_position($position)
    {
        $this->seek_position = isset($position) ? (integer)$position : null;

        return $this;
    }
651847
public function seek($position) {
		$index       = $this->getIndexData();
		$maxPosition = count($index) - 1;
		
		if ($position > $maxPosition) {
			$position = $maxPosition;
		}
		
		fseek($this->file, $index[$position]);
		$this->pointer = $position;
	}