mirror of
https://github.com/UglyToad/PdfPig.git
synced 2026-03-10 00:23:29 +08:00
35 lines
961 B
C#
35 lines
961 B
C#
namespace UglyToad.PdfPig.Fonts.CompactFontFormat
|
|
{
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Util.JetBrains.Annotations;
|
|
|
|
internal class CompactFontFormatIndex : IReadOnlyList<IReadOnlyList<byte>>
|
|
{
|
|
[CanBeNull]
|
|
private readonly IReadOnlyList<IReadOnlyList<byte>> bytes;
|
|
|
|
public int Count => bytes.Count;
|
|
|
|
public IReadOnlyList<byte> this[int index] => bytes[index];
|
|
|
|
public static CompactFontFormatIndex None { get; } = new CompactFontFormatIndex(new byte[0][]);
|
|
|
|
public CompactFontFormatIndex(byte[][] bytes)
|
|
{
|
|
this.bytes = bytes ?? Array.Empty<IReadOnlyList<byte>>();
|
|
}
|
|
|
|
public IEnumerator<IReadOnlyList<byte>> GetEnumerator()
|
|
{
|
|
return bytes.GetEnumerator();
|
|
}
|
|
|
|
IEnumerator IEnumerable.GetEnumerator()
|
|
{
|
|
return GetEnumerator();
|
|
}
|
|
}
|
|
}
|