Remove VisualStudio2015 incompatibilities (Remove C#7.0-isms)
This commit is contained in:
@@ -87,14 +87,16 @@ namespace VAR.PdfTools
|
|||||||
char actualChar = firstChar;
|
char actualChar = firstChar;
|
||||||
foreach (IPdfElement elem in widths.Values)
|
foreach (IPdfElement elem in widths.Values)
|
||||||
{
|
{
|
||||||
if (elem is PdfReal widthReal)
|
var widthReal = elem as PdfReal;
|
||||||
|
if (widthReal != null)
|
||||||
{
|
{
|
||||||
double charWidth = widthReal.Value / glyphSpaceToTextSpace;
|
double charWidth = widthReal.Value / glyphSpaceToTextSpace;
|
||||||
_widths.Add(actualChar, charWidth);
|
_widths.Add(actualChar, charWidth);
|
||||||
actualChar++;
|
actualChar++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (elem is PdfInteger widthInt)
|
var widthInt = elem as PdfInteger;
|
||||||
|
if (widthInt != null)
|
||||||
{
|
{
|
||||||
double charWidth = widthInt.Value / glyphSpaceToTextSpace;
|
double charWidth = widthInt.Value / glyphSpaceToTextSpace;
|
||||||
_widths.Add(actualChar, charWidth);
|
_widths.Add(actualChar, charWidth);
|
||||||
|
|||||||
Reference in New Issue
Block a user