private void DrawVerticalComponent(int index, Graphics g, LiveSplitState state, float width, float height, Region clipRegion)
{
var component = VisibleComponents.ElementAt(index);
var topPadding = Math.Min(GetPaddingAbove(index), component.PaddingTop) / 2f;
var bottomPadding = Math.Min(GetPaddingBelow(index), component.PaddingBottom) / 2f;
g.IntersectClip(new RectangleF(0, topPadding, width, component.VerticalHeight - topPadding - bottomPadding));
var scale = g.Transform.Elements.First();
var separatorOffset = component.VerticalHeight * scale < 3 ? 1 : 0;
if (clipRegion.IsVisible(new RectangleF(
g.Transform.OffsetX,
-separatorOffset + g.Transform.OffsetY - topPadding * scale,
width,
separatorOffset * 2f + scale * (component.VerticalHeight + bottomPadding))))
component.DrawVertical(g, state, width, clipRegion);
g.TranslateTransform(0.0f, component.VerticalHeight - bottomPadding * 2f);
}