public void EndGroup(string id)
        {
            // Restore previous (if any)
            if (_groups.ContainsKey(id))
            {
                _activeGroup = _groups[id];
                _groups.Remove(id);

                // Pop clipping rect
                _drawingContext.Pop();
            }
        }
        private void PopRenderStates(bool clipped)
        {
            // Pop current transform
            _drawingContext.Pop();

            // Pop clipping rect
            if (clipped)
            {
                _drawingContext.Pop();  // inverse transform
                _drawingContext.Pop();  // clipping rect
                _drawingContext.Pop();  // transform
            }
        }