예제 #1
0
        internal static Result constructResult(List <ExpandedPair> pairs)
        {
            BitArray binary = BitArrayBuilder.buildBitArray(pairs);

            AbstractExpandedDecoder decoder = AbstractExpandedDecoder.createDecoder(binary);
            String resultingString          = decoder.parseInformation();

            if (resultingString == null)
            {
                return(null);
            }

            ResultPoint[] firstPoints = pairs[0].FinderPattern.ResultPoints;
            ResultPoint[] lastPoints  = pairs[pairs.Count - 1].FinderPattern.ResultPoints;

            var result = new Result(
                resultingString,
                null,
                new ResultPoint[] { firstPoints[0], firstPoints[1], lastPoints[0], lastPoints[1] },
                BarcodeFormat.RSS_EXPANDED
                );

            result.putMetadata(ResultMetadataType.SYMBOLOGY_IDENTIFIER, "]e0");
            return(result);
        }
예제 #2
0
        private static Result constructResult(ArrayList pairs)
        {
            BitArray binary = BitArrayBuilder.buildBitArray(pairs);

            AbstractExpandedDecoder decoder = AbstractExpandedDecoder.createDecoder(binary);
            String resultingString          = decoder.parseInformation();

            ResultPoint[] firstPoints = ((ExpandedPair)pairs[0]).FinderPattern.ResultPoints;
            ResultPoint[] lastPoints  = ((ExpandedPair)pairs[pairs.Count - 1]).FinderPattern.ResultPoints;

            return(new Result(
                       resultingString,
                       null,
                       new ResultPoint[] { firstPoints[0], firstPoints[1], lastPoints[0], lastPoints[1] },
                       BarcodeFormat.RSS_EXPANDED
                       ));
        }