public function getSize($TextString, $Format = "")
    {
        $Angle = isset($Format["Angle"]) ? $Format["Angle"] : 0;
        $ShowLegend = isset($Format["ShowLegend"]) ? $Format["ShowLegend"] : false;
        $LegendOffset = isset($Format["LegendOffset"]) ? $Format["LegendOffset"] : 5;
        $DrawArea = isset($Format["DrawArea"]) ? $Format["DrawArea"] : false;
        $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : 12;
        $Height = isset($Format["Height"]) ? $Format["Height"] : 30;

        $TextString = $this->encode128($TextString);
        $BarcodeLength = strlen($this->Result);

        $WOffset = $DrawArea ? 20 : 0;
        $HOffset = $ShowLegend ? $FontSize + $LegendOffset + $WOffset : 0;

        $X1 = cos($Angle * PI / 180) * ($WOffset + $BarcodeLength);
        $Y1 = sin($Angle * PI / 180) * ($WOffset + $BarcodeLength);

        $X2 = $X1 + cos(($Angle + 90) * PI / 180) * ($HOffset + $Height);
        $Y2 = $Y1 + sin(($Angle + 90) * PI / 180) * ($HOffset + $Height);


        $AreaWidth = max(abs($X1), abs($X2));
        $AreaHeight = max(abs($Y1), abs($Y2));

        return ["Width" => $AreaWidth, "Height" => $AreaHeight];
    }
public function getSize($TextString, $Format = "")
    {
        $Angle = isset($Format["Angle"]) ? $Format["Angle"] : 0;
        $ShowLegend = isset($Format["ShowLegend"]) ? $Format["ShowLegend"] : false;
        $LegendOffset = isset($Format["LegendOffset"]) ? $Format["LegendOffset"] : 5;
        $DrawArea = isset($Format["DrawArea"]) ? $Format["DrawArea"] : false;
        $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : 12;
        $Height = isset($Format["Height"]) ? $Format["Height"] : 30;

        $TextString = $this->encode128($TextString);
        $BarcodeLength = strlen($this->Result);

        $WOffset = $DrawArea ? 20 : 0;
        $HOffset = $ShowLegend ? $FontSize + $LegendOffset + $WOffset : 0;

        $X1 = cos($Angle * PI / 180) * ($WOffset + $BarcodeLength);
        $Y1 = sin($Angle * PI / 180) * ($WOffset + $BarcodeLength);

        $X2 = $X1 + cos(($Angle + 90) * PI / 180) * ($HOffset + $Height);
        $Y2 = $Y1 + sin(($Angle + 90) * PI / 180) * ($HOffset + $Height);


        $AreaWidth = max(abs($X1), abs($X2));
        $AreaHeight = max(abs($Y1), abs($Y2));

        return ["Width" => $AreaWidth, "Height" => $AreaHeight];
    }
public function getSize ( $ TextString , $ Format = "" ) { $ Angle = isset ( $ Format [ "Angle" ] ) ? $ Format [ "Angle" ] : 0 ; $ ShowLegend = isset ( $ Format [ "ShowLegend" ] ) ? $ Format [ "ShowLegend" ] : false ; $ LegendOffset = isset ( $ Format [ "LegendOffset" ] ) ? $ Format [ "LegendOffset" ] : 5 ; $ DrawArea = isset ( $ Format [ "DrawArea" ] ) ? $ Format [ "DrawArea" ] : false ; $ FontSize = isset ( $ Format [ "FontSize" ] ) ? $ Format [ "FontSize" ] : 12 ; $ Height = isset ( $ Format [ "Height" ] ) ? $ Format [ "Height" ] : 30 ; $ TextString = $ this -> encode128 ( $ TextString ) ; $ BarcodeLength = strlen ( $ this -> Result ) ; $ WOffset = $ DrawArea ? 20 : 0 ; $ HOffset = $ ShowLegend ? $ FontSize + $ LegendOffset + $ WOffset : 0 ; $ X1 = cos ( $ Angle * PI / 180 ) * ( $ WOffset + $ BarcodeLength ) ; $ Y1 = sin ( $ Angle * PI / 180 ) * ( $ WOffset + $ BarcodeLength ) ; $ X2 = $ X1 + cos ( ( $ Angle + 90 ) * PI / 180 ) * ( $ HOffset + $ Height ) ; $ Y2 = $ Y1 + sin ( ( $ Angle + 90 ) * PI / 180 ) * ( $ HOffset + $ Height ) ; $ AreaWidth = max ( abs ( $ X1 ) , abs ( $ X2 ) ) ; $ AreaHeight = max ( abs ( $ Y1 ) , abs ( $ Y2 ) ) ; return [ "Width" => $ AreaWidth , "Height" => $ AreaHeight ] ; }
Return the projected size of a barcode

@param string $TextString
@param string $Format
@return array
Return the projected size of a barcode