Engines/FlatRedBallXNA/FlatRedBall/IO/PngLoader.cs
/// <summary>
/// Converts a 4-byte uint into an enumerated ChunkType
/// </summary>
/// <param name="type">The 4-byte value read from the .png image to signify a Chunk type</param>
/// <returns>The enumerated ChunkType matching the uint passed in</returns>
Converts a 4-byte uint into an enumerated ChunkType
Converts a 4 - byte uint into an enumerated ChunkType
private static ChunkTypes ConvertToType(uint type)
        {
            switch ((ChunkTypes)type)
            {
                case ChunkTypes.IHDR: return ChunkTypes.IHDR;
                case ChunkTypes.PLTE: return ChunkTypes.PLTE;
                case ChunkTypes.IDAT: return ChunkTypes.IDAT;
                case ChunkTypes.IEND: return ChunkTypes.IEND;
                case ChunkTypes.tRNS: return ChunkTypes.tRNS;
                default:  return ChunkTypes.UNSUPPORTED;
            }
        }
private static ChunkTypes ConvertToType ( uint type ) { switch ( ( ChunkTypes ) type ) { case ChunkTypes . IHDR : return ChunkTypes . IHDR ; case ChunkTypes . PLTE : return ChunkTypes . PLTE ; case ChunkTypes . IDAT : return ChunkTypes . IDAT ; case ChunkTypes . IEND : return ChunkTypes . IEND ; case ChunkTypes . tRNS : return ChunkTypes . tRNS ; default : return ChunkTypes . UNSUPPORTED ; } }
Converts a 4-byte uint into an enumerated ChunkType
Converts a 4 - byte uint into an enumerated ChunkType
/*System.Diagnostics.Trace.WriteLine(type);*/
The enumerated ChunkType matching the uint passed in
The enumerated ChunkType matching the uint passed in
type
uint
The 4-byte value read from the .png image to signify a Chunk type
The 4 - byte value read from the . png image to signify a Chunk type