Example #1
0
        internal CSMTextSettingsTag(SwfReader r)
            : base(TagType.CSMTextSettings)
        {
            TextId       = r.GetUI16();
            UseFlashType = r.GetBits(2);
            GridFit      = r.GetBits(3);
            r.GetBits(3);             // reserved
            r.Align();

            Thickness = r.GetFixedNBits(32);
            Sharpness = r.GetFixedNBits(32);

            r.GetByte();             // reserved
        }
Example #2
0
        internal Matrix(SwfReader r)
        {
            float sx = 1.0F;
            float sy = 1.0F;
            float r0 = 0.0F;
            float r1 = 0.0F;
            float tx = 0.0F;
            float ty = 0.0F;

            r.Align();
            bool hasScale = r.GetBit();

            if (hasScale)
            {
                uint scaleBits = r.GetBits(5);
                sx = r.GetFixedNBits(scaleBits);
                sy = r.GetFixedNBits(scaleBits);
            }
            bool hasRotate = r.GetBit();

            if (hasRotate)
            {
                uint nRotateBits = r.GetBits(5);
                r0 = r.GetFixedNBits(nRotateBits);
                r1 = r.GetFixedNBits(nRotateBits);
            }
            // always has translation
            uint nTranslateBits = r.GetBits(5);

            tx = r.GetSignedNBits(nTranslateBits);
            ty = r.GetSignedNBits(nTranslateBits);
            r.Align();

            this.ScaleX     = sx;
            this.Rotate0    = r0;
            this.Rotate1    = r1;
            this.ScaleY     = sy;
            this.TranslateX = tx;
            this.TranslateY = ty;
        }
Example #3
0
 internal PrimitiveFloat(SwfReader r)
 {
     FloatValue = r.GetFixedNBits(32);
 }