/// <summary> /// Constructor taking a timeline renderer</summary> public TimelineDocument(TimelineRenderer timelineRenderer) { Renderer = timelineRenderer; }
/// <summary> /// Constructor</summary> /// <param name="renderer">Timeline renderer</param> /// <param name="transform">Transform, taking timeline coordinates to display</param> /// <param name="clientRectangle">Bounds of displayed area of timeline, in screen space</param> /// <param name="g">Graphics object</param> public Context( D2dTimelineRenderer renderer, Matrix transform, RectangleF clientRectangle, D2dGraphics g) { Graphics = g; Transform = transform; ClientRectangle = clientRectangle; Bounds = GdiUtil.InverseTransform(transform, clientRectangle); TextFormat = renderer.m_textFormat; FontHeight = renderer.m_textFormat.FontHeight; PixelSize = new SizeF(1 / transform.Elements[0], 1 / transform.Elements[3]); }