private function findPosition($size1, $size2, $alignment) {
        $rsize1 = max($size1, $size2);
        $rsize2 = min($size1, $size2);

        if ($alignment === self::ALIGN_LEFT) { // Or TOP
            return 0;
        } elseif ($alignment === self::ALIGN_CENTER) {
            return $rsize1 / 2 - $rsize2 / 2;
        } else { // RIGHT or TOP
            return $rsize1 - $rsize2;
        }
    }
private function findPosition($size1, $size2, $alignment) {
        $rsize1 = max($size1, $size2);
        $rsize2 = min($size1, $size2);

        if ($alignment === self::ALIGN_LEFT) { // Or TOP
            return 0;
        } elseif ($alignment === self::ALIGN_CENTER) {
            return $rsize1 / 2 - $rsize2 / 2;
        } else { // RIGHT or TOP
            return $rsize1 - $rsize2;
        }
    }
private function findPosition ( $ size1 , $ size2 , $ alignment ) { $ rsize1 = max ( $ size1 , $ size2 ) ; $ rsize2 = min ( $ size1 , $ size2 ) ; if ( $ alignment === self :: ALIGN_LEFT ) { // Or TOP
 return 0 ; } elseif ( $ alignment === self :: ALIGN_CENTER ) { return $ rsize1 / 2 - $ rsize2 / 2 ; } else { // RIGHT or TOP
 return $ rsize1 - $ rsize2 ; } }
Finds the position where the barcode should be aligned.

@param int $size1
@param int $size2
@param int $ailgnment
@return int
Finds the position where the barcode should be aligned .