-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v2.2.2 - Obsoleting some imprecise constructors, providing better ove…
…rrides
- Loading branch information
Showing
10 changed files
with
251 additions
and
196 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
Copyright © 2003 RiskCare Ltd. All rights reserved. | ||
Copyright © 2010 SvgNet & SvgGdi Bridge Project. All rights reserved. | ||
Copyright © 2015-2019 Rafael Teixeira, Mojmír Němeček, Benjamin Peterson and Other Contributors | ||
Original source code licensed with BSD-2-Clause spirit, treat it thus, see accompanied LICENSE for more | ||
*/ | ||
|
||
using SvgNet.SvgTypes; | ||
|
||
namespace SvgNet.SvgElements { | ||
public abstract class SvgBaseTextElement : SvgStyledTransformedElement { | ||
public SvgLength DX { | ||
get => (SvgLength)_atts["dx"]; | ||
set => _atts["dx"] = value; | ||
} | ||
|
||
public SvgLength DY { | ||
get => (SvgLength)_atts["dy"]; | ||
set => _atts["dy"] = value; | ||
} | ||
|
||
public string LengthAdjust { | ||
get => (string)_atts["lengthAdjust"]; | ||
set => _atts["lengthAdjust"] = value; | ||
} | ||
|
||
public SvgNumList Rotate { | ||
get => (SvgNumList)_atts["rotate"]; | ||
set => _atts["rotate"] = value; | ||
} | ||
|
||
public SvgLength X { | ||
get => (SvgLength)_atts["x"]; | ||
set => _atts["x"] = value; | ||
} | ||
|
||
public SvgLength Y { | ||
get => (SvgLength)_atts["y"]; | ||
set => _atts["y"] = value; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
Copyright © 2003 RiskCare Ltd. All rights reserved. | ||
Copyright © 2010 SvgNet & SvgGdi Bridge Project. All rights reserved. | ||
Copyright © 2015-2019 Rafael Teixeira, Mojmír Němeček, Benjamin Peterson and Other Contributors | ||
Original source code licensed with BSD-2-Clause spirit, treat it thus, see accompanied LICENSE for more | ||
*/ | ||
|
||
using System; | ||
|
||
using SvgNet.SvgTypes; | ||
|
||
namespace SvgNet.SvgElements { | ||
/// <summary> | ||
/// Represents a <c>tref</c> element. | ||
/// </summary> | ||
[Obsolete("Don't use it anymore")] | ||
public class SvgTrefElement : SvgBaseTextElement, IElementWithXRef { | ||
|
||
public SvgTrefElement() { | ||
} | ||
|
||
public SvgTrefElement(string href) => Href = href; | ||
|
||
public SvgTrefElement(string href, float x, float y) { | ||
Href = href; | ||
X = x; | ||
Y = y; | ||
} | ||
|
||
public string Href { | ||
get => (string)_atts["xlink:href"]; | ||
set => _atts["xlink:href"] = value; | ||
} | ||
|
||
public override string Name => "tref"; | ||
|
||
public SvgXRef XRef { | ||
get => new(this); | ||
set => value.WriteToElement(this); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
Copyright © 2003 RiskCare Ltd. All rights reserved. | ||
Copyright © 2010 SvgNet & SvgGdi Bridge Project. All rights reserved. | ||
Copyright © 2015-2019 Rafael Teixeira, Mojmír Němeček, Benjamin Peterson and Other Contributors | ||
Original source code licensed with BSD-2-Clause spirit, treat it thus, see accompanied LICENSE for more | ||
*/ | ||
|
||
using System; | ||
|
||
using SvgNet.SvgTypes; | ||
|
||
namespace SvgNet.SvgElements { | ||
/// <summary> | ||
/// Represents a <c>tspan</c> element. The tspan element is unique in that it expects actual XML text nodes below | ||
/// it, rather than consisting only of attributes and child elements. <c>SvgTextElement</c> therefore has to be serialized | ||
/// to XML slightly differently. | ||
/// </summary> | ||
public class SvgTspanElement : SvgTextElement { | ||
|
||
public SvgTspanElement() { | ||
} | ||
|
||
public SvgTspanElement(string s) : base(s) { | ||
} | ||
|
||
[Obsolete("Use constructor override that receives SvgLength for x and y")] | ||
public SvgTspanElement(string s, float x, float y) : base(s, x, y) { | ||
} | ||
|
||
public SvgTspanElement(string s, SvgLength x, SvgLength y) : base(s, x, y) { | ||
} | ||
|
||
public override string Name => "tspan"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.