/// <summary> /// Clones this instance. /// </summary> public XGraphicsPath Clone() { XGraphicsPath path = (XGraphicsPath)MemberwiseClone(); _corePath = new CoreGraphicsPath(_corePath); return(path); }
/// <summary> /// Initializes a new instance of the <see cref="XGraphicsPath"/> class. /// </summary> public XGraphicsPath() { #if CORE _corePath = new CoreGraphicsPath(); #endif #if GDI try { Lock.EnterGdiPlus(); _gdipPath = new GraphicsPath(); } finally { Lock.ExitGdiPlus(); } #endif #if WPF || NETFX_CORE _pathGeometry = new PathGeometry(); #endif }
public CoreGraphicsPath(CoreGraphicsPath path) { _points = new List<XPoint>(path._points); _types = new List<byte>(path._types); }
/// <summary> /// Initializes a new instance of the <see cref="XGraphicsPath"/> class. /// </summary> public XGraphicsPath() { _corePath = new CoreGraphicsPath(); }
/// <summary> /// Clones this instance. /// </summary> public XGraphicsPath Clone() { XGraphicsPath path = (XGraphicsPath)MemberwiseClone(); #if CORE _corePath = new CoreGraphicsPath(_corePath); #endif #if GDI try { Lock.EnterGdiPlus(); path._gdipPath = _gdipPath.Clone() as GraphicsPath; } finally { Lock.ExitGdiPlus(); } #endif #if WPF || NETFX_CORE #if !SILVERLIGHT && !NETFX_CORE path._pathGeometry = _pathGeometry.Clone(); #else // AG-HACK throw new InvalidOperationException("Silverlight cannot clone geometry objects."); // TODO: make it manually... #pragma warning disable 0162 #endif #endif return path; }
public CoreGraphicsPath(CoreGraphicsPath path) { _points = new List <XPoint>(path._points); _types = new List <byte>(path._types); }