ComicScreenGrid constructor

ComicScreenGrid(
  1. double pitch,
  2. double radius,
  3. double dpr, {
  4. bool staggered = true,
  5. double rowFactor = .5,
})

Creates a ComicScreenGrid.

Implementation

ComicScreenGrid(
  double pitch,
  double radius,
  this.dpr, {
  this.staggered = true,
  double rowFactor = .5,
}) : devicePitch = _snap(pitch * dpr, staggered),
     deviceRow = math.max(
       1,
       (_snap(pitch * dpr, staggered) * rowFactor).round(),
     ),
     radius = radius * _snap(pitch * dpr, staggered) / (pitch * dpr);