Skip to content

Commit f6c6abd

Browse files
committed
Tidy up
1 parent 6622ff1 commit f6c6abd

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/UglyToad.PdfPig/Graphics/CurrentGraphicsState.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public class CurrentGraphicsState : IDeepCloneable<CurrentGraphicsState>
104104
public IColor CurrentNonStrokingColor { get; set; }
105105

106106
/// <summary>
107-
/// TODO.
107+
/// The current blend mode.
108108
/// </summary>
109109
public BlendMode BlendMode { get; set; } = BlendMode.Normal;
110110

src/UglyToad.PdfPig/Graphics/InlineImageBuilder.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,17 @@ internal InlineImage CreateInlineImage(
6262
{
6363
if (!sMaskToken.StreamDictionary.TryGet(NameToken.Subtype, out NameToken softMaskSubType) || !softMaskSubType.Equals(NameToken.Image))
6464
{
65-
throw new Exception("");
65+
throw new Exception("The SMask dictionary does not contain a 'Subtype' entry, or its value is not 'Image'.");
6666
}
6767

6868
if (!sMaskToken.StreamDictionary.TryGet(NameToken.ColorSpace, out NameToken softMaskColorSpace) || !softMaskColorSpace.Equals(NameToken.Devicegray))
6969
{
70-
throw new Exception("");
70+
throw new Exception("The SMask dictionary does not contain a 'ColorSpace' entry, or its value is not 'Devicegray'.");
7171
}
7272

7373
if (sMaskToken.StreamDictionary.ContainsKey(NameToken.Mask) || sMaskToken.StreamDictionary.ContainsKey(NameToken.Smask))
7474
{
75-
throw new Exception("");
75+
throw new Exception("The SMask dictionary contains a 'Mask' or 'Smask' entry.");
7676
}
7777

7878
XObjectContentRecord softMaskImageRecord = new XObjectContentRecord(XObjectType.Image, sMaskToken, TransformationMatrix.Identity,

src/UglyToad.PdfPig/Graphics/SoftMask.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
using UglyToad.PdfPig.Util;
1010

1111
/// <summary>
12-
/// TODO.
12+
/// Soft Mask.
1313
/// </summary>
1414
public sealed class SoftMask
1515
{
@@ -154,12 +154,12 @@ internal static SoftMask Parse(DictionaryToken dictionaryToken, IPdfTokenScanner
154154
public enum SoftMaskType : byte
155155
{
156156
/// <summary>
157-
/// TODO.
157+
/// Alpha - The group's computed alpha shall be used, disregarding its colour.
158158
/// </summary>
159159
Alpha = 0,
160160

161161
/// <summary>
162-
/// TODO.
162+
/// Luminosity - The group's computed colour shall be converted to a single-component luminosity value.
163163
/// </summary>
164164
Luminosity = 1
165165
}

src/UglyToad.PdfPig/XObjects/XObjectFactory.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@ public static XObjectImage ReadImage(XObjectContentRecord xObject,
5050
{
5151
if (!sMaskToken.StreamDictionary.TryGet(NameToken.Subtype, out NameToken softMaskSubType) || !softMaskSubType.Equals(NameToken.Image))
5252
{
53-
throw new Exception("");
53+
throw new Exception("The SMask dictionary does not contain a 'Subtype' entry, or its value is not 'Image'.");
5454
}
5555

5656
if (!sMaskToken.StreamDictionary.TryGet(NameToken.ColorSpace, out NameToken softMaskColorSpace) || !softMaskColorSpace.Equals(NameToken.Devicegray))
5757
{
58-
throw new Exception("");
58+
throw new Exception("The SMask dictionary does not contain a 'ColorSpace' entry, or its value is not 'Devicegray'.");
5959
}
6060

6161
if (sMaskToken.StreamDictionary.ContainsKey(NameToken.Mask) || sMaskToken.StreamDictionary.ContainsKey(NameToken.Smask))
6262
{
63-
throw new Exception("");
63+
throw new Exception("The SMask dictionary contains a 'Mask' or 'Smask' entry.");
6464
}
6565

6666
var renderingIntent = xObject.DefaultRenderingIntent; // Ignored

0 commit comments

Comments
 (0)