public function setAlignment($alignment) {
        $alignment = intval($alignment);
        if ($alignment !== self::ALIGN_LEFT && $alignment !== self::ALIGN_TOP && $alignment !== self::ALIGN_CENTER && $alignment !== self::ALIGN_RIGHT && $alignment !== self::ALIGN_BOTTOM) {
            throw new CINArgumentException('The text alignment must be one of a valid constant.', 'alignment');
        }

        $this->alignment = $alignment;
    }
public function setAlignment($alignment) {
        $alignment = intval($alignment);
        if ($alignment !== self::ALIGN_LEFT && $alignment !== self::ALIGN_TOP && $alignment !== self::ALIGN_CENTER && $alignment !== self::ALIGN_RIGHT && $alignment !== self::ALIGN_BOTTOM) {
            throw new CINArgumentException('The text alignment must be one of a valid constant.', 'alignment');
        }

        $this->alignment = $alignment;
    }
public function setAlignment ( $ alignment ) { $ alignment = intval ( $ alignment ) ; if ( $ alignment !== self :: ALIGN_LEFT && $ alignment !== self :: ALIGN_TOP && $ alignment !== self :: ALIGN_CENTER && $ alignment !== self :: ALIGN_RIGHT && $ alignment !== self :: ALIGN_BOTTOM ) { throw new CINArgumentException ( 'The text alignment must be one of a valid constant.' , 'alignment' ) ; } $ this -> alignment = $ alignment ; }
Sets the text alignment for drawing.

@param int $alignment
Sets the text alignment for drawing .