Beispiel #1
0
        public void RegisterDrawing(string elementId, string uniqueId, Drawing drawing)
        {
            if (_drawingDocument != null) // && _interactiveMode != SvgInteractiveModes.None
            {
                if (_settings != null && _settings.IncludeRuntime)
                {
                    if (!string.IsNullOrWhiteSpace(elementId))
                    {
                        SvgObject.SetId(drawing, elementId);
                    }
                    if (!string.IsNullOrWhiteSpace(uniqueId))
                    {
                        SvgObject.SetUniqueId(drawing, uniqueId);
                    }

                    if (_interactiveMode != SvgInteractiveModes.None)
                    {
                        _elementOrder += 1;
                        SvgObject.SetOrder(drawing, _elementOrder);
                    }
                }

                if (_interactiveMode != SvgInteractiveModes.None)
                {
                    _drawingDocument.Add(elementId, uniqueId, drawing);
                }
            }
        }
Beispiel #2
0
 public void RegisterDrawing(string elementId, string uniqueId, Drawing drawing)
 {
     if (_drawingDocument != null)
     {
         if (_settings != null && _settings.IncludeRuntime)
         {
             if (!string.IsNullOrWhiteSpace(elementId))
             {
                 SvgObject.SetId(drawing, elementId);
             }
             if (!string.IsNullOrWhiteSpace(uniqueId))
             {
                 SvgObject.SetUniqueId(drawing, uniqueId);
             }
         }
         _drawingDocument.Add(elementId, uniqueId, drawing);
     }
 }