public void Reset() { gsStack.Clear(); gsStack.Push(new GraphicsState()); textMatrix = null; textLineMatrix = null; resources = new ResourceDictionary(); }