Exemple #1
0
        private Color3ds readRGBColor()
        {
            Color3ds lvColor = new Color3ds();

            lvColor.mRed = ReadFloat();
            lvColor.mGreen = ReadFloat();
            lvColor.mBlue = ReadFloat();

            return lvColor;
        }
Exemple #2
0
        private Color3ds readTrueColor()
        {
            Color3ds lvColor = new Color3ds();

            lvColor.mRed = (float)(ReadByte() & 0xff) / 255;
            lvColor.mGreen = (float)(ReadByte() & 0xff) / 255;
            lvColor.mBlue = (float)(ReadByte() & 0xff) / 255;

            return lvColor;
        }
Exemple #3
0
        private Color3ds readColor(int chunk_len)
        {
            long chunk_end = filePos() + chunk_len;

            if (mDecode != null)
            {
                mDecode.enter();
            }

            Color3ds lvColor = new Color3ds();

            while (filePos() < chunk_end)
            {
                Head head = read_HEAD();
                switch (head.id)
                {
                    case CHUNK_COL_RGB:
                        lvColor = readRGBColor();
                        break;
                    case CHUNK_COL_TRU:
                        lvColor = readTrueColor();
                        break;
                    default:
                        SkipChunk(head.length - 6);
                        break;
                }
            }

            if (mDecode != null)
            {
                mDecode.leave();
            }

            return lvColor;
        }