Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions src/PdfSharp/Pdf.Advanced/PdfResourceMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,27 @@ namespace PdfSharp.Pdf.Advanced
/// <summary>
/// Base class for all dictionaries that map resource names to objects.
/// </summary>
internal class PdfResourceMap : PdfDictionary //, IEnumerable
public sealed class PdfResourceMap : PdfDictionary //, IEnumerable
{
/// <summary>
/// Instantiates a new instance of the <see cref="PdfResourceMap"/> class.
/// </summary>
public PdfResourceMap()
{ }

/// <summary>
/// Instantiates a new instance of the <see cref="PdfResourceMap"/> class.
/// </summary>
/// <param name="document">The <see cref="PdfDocument"/></param>
public PdfResourceMap(PdfDocument document)
: base(document)
{ }

protected PdfResourceMap(PdfDictionary dict)
/// <summary>
/// Instantiates a new instance of the <see cref="PdfResourceMap"/> class.
/// </summary>
/// <param name="dict">The <see cref="PdfDictionary"/></param>
public PdfResourceMap(PdfDictionary dict)
: base(dict)
{ }

Expand All @@ -61,7 +72,7 @@ protected PdfResourceMap(PdfDictionary dict)
/// <summary>
/// Adds all imported resource names to the specified hashtable.
/// </summary>
internal void CollectResourceNames(Dictionary<string, object> usedResourceNames)
public void CollectResourceNames(Dictionary<string, object> usedResourceNames)
{
// ?TODO: Imported resources (e.g. fonts) can be reused, but I think this is rather difficult. Will be an issue in PDFsharp 2.0.
PdfName[] names = Elements.KeyNames;
Expand Down
29 changes: 22 additions & 7 deletions src/PdfSharp/Pdf.Advanced/PdfResources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public string AddShading(PdfShading shading)
/// <summary>
/// Gets the fonts map.
/// </summary>
internal PdfResourceMap Fonts
public PdfResourceMap Fonts
{
get { return _fonts ?? (_fonts = (PdfResourceMap)Elements.GetValue(Keys.Font, VCF.Create)); }
}
Expand All @@ -194,14 +194,17 @@ internal PdfResourceMap Fonts
/// <summary>
/// Gets the external objects map.
/// </summary>
internal PdfResourceMap XObjects
public PdfResourceMap XObjects
{
get { return _xObjects ?? (_xObjects = (PdfResourceMap)Elements.GetValue(Keys.XObject, VCF.Create)); }
}
PdfResourceMap _xObjects;

/// <summary>
///
/// </summary>
// TODO: make own class
internal PdfResourceMap ExtGStates
public PdfResourceMap ExtGStates
{
get
{
Expand All @@ -210,29 +213,41 @@ internal PdfResourceMap ExtGStates
}
PdfResourceMap _extGStates;

/// <summary>
///
/// </summary>
// TODO: make own class
internal PdfResourceMap ColorSpaces
public PdfResourceMap ColorSpaces
{
get { return _colorSpaces ?? (_colorSpaces = (PdfResourceMap)Elements.GetValue(Keys.ColorSpace, VCF.Create)); }
}
PdfResourceMap _colorSpaces;

/// <summary>
///
/// </summary>
// TODO: make own class
internal PdfResourceMap Patterns
public PdfResourceMap Patterns
{
get { return _patterns ?? (_patterns = (PdfResourceMap) Elements.GetValue(Keys.Pattern, VCF.Create)); }
}
PdfResourceMap _patterns;

/// <summary>
///
/// </summary>
// TODO: make own class
internal PdfResourceMap Shadings
public PdfResourceMap Shadings
{
get { return _shadings ?? (_shadings = (PdfResourceMap) Elements.GetValue(Keys.Shading, VCF.Create)); }
}
PdfResourceMap _shadings;

/// <summary>
///
/// </summary>
// TODO: make own class
internal PdfResourceMap Properties
public PdfResourceMap Properties
{
get {return _properties ?? (_properties = (PdfResourceMap) Elements.GetValue(Keys.Properties, VCF.Create));}
}
Expand Down
2 changes: 1 addition & 1 deletion src/PdfSharp/root/ProductVersionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public static class ProductVersionInfo
/// <summary>
/// The build number of the product.
/// </summary>
public const string VersionBuild = "5185"; // V16G // Build = days since 2005-01-01 - change this values ONLY HERE
public const string VersionBuild = "5911"; // V16G // Build = days since 2005-01-01 - change this values ONLY HERE

/// <summary>
/// The patch number of the product.
Expand Down
2 changes: 1 addition & 1 deletion src/PdfSharp/root/VersionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace PdfSharp
/// <summary>
/// Version info of this assembly.
/// </summary>
static class VersionInfo
internal static class VersionInfo
{
public const string Title = ProductVersionInfo.Title;
public const string Description = ProductVersionInfo.Description;
Expand Down