Do not set Overflow attribute inside.

This commit is contained in:
H1Gdev 2020-02-22 02:17:43 +09:00 коммит произвёл mrbean-bremen
Родитель b84f28b007
Коммит 0a4ef76a37
3 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -89,7 +89,7 @@ namespace Svg
[SvgAttribute("overflow")]
public virtual SvgOverflow Overflow
{
get { return GetAttribute<SvgOverflow>("overflow", false); }
get { return GetAttribute("overflow", false, SvgOverflow.Hidden); }
set { Attributes["overflow"] = value; }
}

Просмотреть файл

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
@ -105,7 +105,7 @@ namespace Svg
[SvgAttribute("overflow")]
public SvgOverflow Overflow
{
get { return GetAttribute<SvgOverflow>("overflow", false); }
get { return GetAttribute("overflow", false, SvgOverflow.Hidden); }
set { Attributes["overflow"] = value; }
}

Просмотреть файл

@ -36,6 +36,11 @@ namespace Svg
private Dictionary<string, IEnumerable<SvgFontFace>> _fontDefns = null;
public override SvgOverflow Overflow
{
get { return GetAttribute("overflow", false, SvgOverflow.Visible); }
}
private static int GetSystemDpi()
{
bool isWindows;
@ -622,9 +627,6 @@ namespace Svg
using (var renderer = SvgRenderer.FromImage(bitmap))
{
// EO, 2014-12-05: Requested to ensure proper zooming out (reduce size). Otherwise it clip the image.
this.Overflow = SvgOverflow.Auto;
var boundable = new GenericBoundable(0, 0, bitmap.Width, bitmap.Height);
this.Draw(renderer, boundable);
}