GetChildTagMethods() public méthode

public GetChildTagMethods ( ) : TiffTagMethods
Résultat TiffTagMethods
Exemple #1
0
        public override void PrintDir(Tiff tif, Stream fd, TiffPrintFlags flags)
        {
            CodecWithPredictor sp = tif.m_currentCodec as CodecWithPredictor;

            Debug.Assert(sp != null);

            if (tif.fieldSet(CodecWithPredictor.FIELD_PREDICTOR))
            {
                Tiff.fprintf(fd, "  Predictor: ");
                Predictor predictor = sp.GetPredictorValue();
                switch (predictor)
                {
                case Predictor.NONE:
                    Tiff.fprintf(fd, "none ");
                    break;

                case Predictor.HORIZONTAL:
                    Tiff.fprintf(fd, "horizontal differencing ");
                    break;

                case Predictor.FLOATINGPOINT:
                    Tiff.fprintf(fd, "floating point predictor ");
                    break;
                }

                Tiff.fprintf(fd, "{0} (0x{1:x})\r\n", predictor, predictor);
            }

            TiffTagMethods childMethods = sp.GetChildTagMethods();

            if (childMethods != null)
            {
                childMethods.PrintDir(tif, fd, flags);
            }
            else
            {
                base.PrintDir(tif, fd, flags);
            }
        }
Exemple #2
0
        public override FieldValue[] GetField(Tiff tif, TiffTag tag)
        {
            CodecWithPredictor sp = tif.m_currentCodec as CodecWithPredictor;

            Debug.Assert(sp != null);

            switch (tag)
            {
            case TiffTag.PREDICTOR:
                FieldValue[] result = new FieldValue[1];
                result[0].Set(sp.GetPredictorValue());
                return(result);
            }

            TiffTagMethods childMethods = sp.GetChildTagMethods();

            if (childMethods != null)
            {
                return(childMethods.GetField(tif, tag));
            }

            return(base.GetField(tif, tag));
        }
Exemple #3
0
        public override bool SetField(Tiff tif, TiffTag tag, FieldValue[] ap)
        {
            CodecWithPredictor sp = tif.m_currentCodec as CodecWithPredictor;

            Debug.Assert(sp != null);

            switch (tag)
            {
            case TiffTag.PREDICTOR:
                sp.SetPredictorValue((Predictor)ap[0].ToByte());
                tif.setFieldBit(CodecWithPredictor.FIELD_PREDICTOR);
                tif.m_flags |= TiffFlags.DIRTYDIRECT;
                return(true);
            }

            TiffTagMethods childMethods = sp.GetChildTagMethods();

            if (childMethods != null)
            {
                return(childMethods.SetField(tif, tag, ap));
            }

            return(base.SetField(tif, tag, ap));
        }