GraphViewport constructor

const GraphViewport({
  1. double x = 0.0,
  2. double y = 0.0,
  3. double zoom = 1.0,
})

Creates a viewport with the specified pan and zoom.

Parameters:

  • x: Horizontal pan offset in screen pixels (default: 0.0)
  • y: Vertical pan offset in screen pixels (default: 0.0)
  • zoom: Zoom scale factor, where 1.0 is 100% (default: 1.0)

The pan offset represents how much the graph has been translated on screen. Positive values move the graph right/down.

Implementation

const GraphViewport({this.x = 0.0, this.y = 0.0, this.zoom = 1.0});