PdfTileZoomLadder class
The discrete ×√2 (or ×2) pixel-ratio ladder tiles are rastered on.
A continuous zoom would raster every tile at a slightly different ratio and never reuse one; snapping the desired ratio to a rung means a small pan or pinch keeps hitting the same rung's tiles. Rung 0 is ratio 1.0; each rung is stepsPerOctave-th of a doubling, so the default of 2 gives a ×√2 ladder.
- Annotations
Constructors
- PdfTileZoomLadder({int stepsPerOctave = 2, int minRung = -8, int maxRung = 18})
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxRung → int
-
Highest resolution bucket. The default is 512 physical pixels per PDF
point, keeping a 10000% view sharp at device pixel ratios up to 5.
final
- minRung → int
-
Clamp bounds so a degenerate desired ratio can't select an absurd bucket
(ratio floor 0.05 / a huge accidental zoom). minRung ratio ≈ 2^(min/steps).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stepsPerOctave → int
-
Rungs per factor-of-two of pixel ratio. 1 is a ×2 ladder, 2 is ×√2.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
ratioFor(
int rung) → double -
The exact pixel ratio a
rung's tiles are rastered at. -
rungAtOrAbove(
double ratio) → int -
The first rung whose pixel ratio is at or above
ratio, clamped. -
rungFor(
double ratio) → int -
The rung whose ratio is nearest
ratio(in log space), clamped. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited