public override bool Equals(System.Object object_Renamed)
        {
            bool isEqual = false;

            if (object_Renamed is MorphFillStyle)
            {
                MorphFillStyle morphFillStyle = (MorphFillStyle)object_Renamed;

                if ((morphFillStyle.type == this.type) && (morphFillStyle.startColor == this.startColor) && (morphFillStyle.endColor == this.endColor) && (morphFillStyle.ratio1 == this.ratio1) && (morphFillStyle.ratio2 == this.ratio2) && (((morphFillStyle.startGradientMatrix == null) && (this.startGradientMatrix == null)) || ((morphFillStyle.startGradientMatrix != null) && (this.startGradientMatrix != null) && morphFillStyle.startGradientMatrix.Equals(this.startGradientMatrix))) && (((morphFillStyle.endGradientMatrix == null) && (this.endGradientMatrix == null)) || ((morphFillStyle.endGradientMatrix != null) && (this.endGradientMatrix != null) && morphFillStyle.endGradientMatrix.Equals(this.endGradientMatrix))) && ArrayUtil.equals(morphFillStyle.gradRecords, this.gradRecords) && (((morphFillStyle.bitmap == null) && (this.bitmap == null)) || ((morphFillStyle.bitmap != null) && (this.bitmap != null) && morphFillStyle.bitmap.Equals(this.bitmap))) && (((morphFillStyle.startBitmapMatrix == null) && (this.startBitmapMatrix == null)) || ((morphFillStyle.startBitmapMatrix != null) && (this.startBitmapMatrix != null) && morphFillStyle.startBitmapMatrix.Equals(this.startBitmapMatrix))) && (((morphFillStyle.endBitmapMatrix == null) && (this.endBitmapMatrix == null)) || ((morphFillStyle.endBitmapMatrix != null) && (this.endBitmapMatrix != null) && morphFillStyle.endBitmapMatrix.Equals(this.endBitmapMatrix))))
                {
                    isEqual = true;
                }
            }

            return(isEqual);
        }
Exemplo n.º 2
0
		private MorphFillStyle[] decodeMorphFillstyles(int shape)
		{
			int count = r.readUI8();
			if (count == 0xFF)
			{
				count = r.readUI16();
			}
			
			MorphFillStyle[] styles = new MorphFillStyle[count];
			
			for (int i = 0; i < count; i++)
			{
				styles[i] = decodeMorphFillStyle(shape);
			}
			
			return styles;
		}
Exemplo n.º 3
0
		private MorphFillStyle decodeMorphFillStyle(int shape)
		{
			MorphFillStyle s = new MorphFillStyle();
			
			s.type = r.readUI8();
			switch (s.type)
			{
				
				case FillStyle.FILL_SOLID:  // 0x00
					s.startColor = decodeRGBA(r);
					s.endColor = decodeRGBA(r);
					break;
				
				case FillStyle.FILL_GRADIENT: 
				// 0x10 linear gradient fill
				case FillStyle.FILL_RADIAL_GRADIENT: 
				// 0x12 radial gradient fill
				case FillStyle.FILL_FOCAL_RADIAL_GRADIENT:  // 0x13 focal radial gradient fill
					s.startGradientMatrix = decodeMatrix();
					s.endGradientMatrix = decodeMatrix();
					s.gradRecords = decodeMorphGradient();
					if (s.type == FillStyle.FILL_FOCAL_RADIAL_GRADIENT && shape == Flash.Swf.TagValues.stagDefineMorphShape2)
					{
						s.ratio1 = r.readSI16();
						s.ratio2 = r.readSI16();
					}
					break;
				
				case FillStyle.FILL_BITS: 
				// 0x40 tiled bitmap fill
				case (FillStyle.FILL_BITS | FillStyle.FILL_BITS_CLIP): 
				// 0x41 clipped bitmap fill
				case (FillStyle.FILL_BITS | FillStyle.FILL_BITS_NOSMOOTH): 
				// 0x42 tiled non-smoothed fill
				case (FillStyle.FILL_BITS | FillStyle.FILL_BITS_CLIP | FillStyle.FILL_BITS_NOSMOOTH):  // 0x43 clipped non-smoothed fill
					int idref = r.readUI16();
					try
					{
						s.bitmap = dict.getTag(idref);
					}
					catch (System.ArgumentException ex)
					{
						handler.error(ex.Message);
						s.bitmap = null;
					}
					s.startBitmapMatrix = decodeMatrix();
					s.endBitmapMatrix = decodeMatrix();
					break;
				
				default: 
					throw new SwfFormatException("unrecognized fill style type: " + s.type);
				
			}
			
			return s;
		}