rito_flutter_protocol library

Typed encoders, decoders, and models for Rito's versioned wire protocols.

Classes

RitoAdjacentAvailability
RitoAdjacentDirection
RitoAdjacentRequest
RitoArtifact
RitoArtifactDecoder
RitoArtifactPainter
Paints an artifact's primitive list. The list is resolved on the device grid at the request's render ratio; the painter maps that grid onto the logical canvas by the inverse ratio, so under the framework's own device-pixel transform every coordinate lands where the engine resolved it. Text runs, which the list keeps in CSS pixels, paint under the ratio again — back in logical pixels, at their CSS size.
RitoArtifactRequest
RitoBackgroundAdvance
RitoBackgroundDecoder
RitoBackgroundEncoder
RitoBackgroundHandoff
RitoBackgroundHandoffAck
RitoBackgroundRequest
RitoClusterPosition
The text run body the RITODL1 text and ruby primitives carry: every length is in CSS pixels, painted under the list's ratio. Where one cluster of a run paints: the origin of the cluster starting at byte of the run's text, in CSS pixels, spacing and justification already applied. Where one cluster of a run paints: the origin of the cluster starting at byte of the run's UTF-8 text — y is the alphabetic baseline, for a text run and an annotation alike.
RitoColor
RitoColorNoneFlags
RitoColorSpace
RitoDashPattern
RitoDevicePath
A device-space outline. Arc angles are radians from the +x axis; a positive sweep turns clockwise on the y-down device plane. An ellipse is its own closed subpath.
RitoDeviceRotate
RitoDeviceScale
RitoDeviceTransform
RitoDeviceTranslate
RitoDisplayListPayload
The artifact's paint: its display commands lowered to the host's device grid, carried as the RITODL1 format-2 primitive list.
RitoDisplayPoint
RitoDisplayRect
RitoFillGround
What a fill declares to the theme override: the page ground, an opaque block ground the ink over it was typeset against (with the unsnapped box it covers), or nothing.
RitoFillRule
RitoFontPaint
RitoFontRef
RitoFontStyle
RitoFootnote
A resolved footnote definition.
RitoFootnoteDecoder
RitoForegroundDecoder
RitoForegroundEncoder
RitoForegroundHandoff
RitoForegroundHandoffAck
RitoHitEntry
RitoHitResolver
Resolves taps against an artifact's pages.
RitoLayoutRequest
RitoLocator
RitoNavigation
RitoPage
RitoPaintRuby
RitoPaintText
RitoPathArc
RitoPathClose
RitoPathEllipse
RitoPathLineTo
RitoPathMoveTo
RitoPathOp
RitoPathRect
RitoPrimitive
RitoPrimitiveClipPath
RitoPrimitiveDrawImage
src sampled over sourceRect (raster pixels; the whole raster when null) into dest, once or per tiles.
RitoPrimitiveFillPath
RitoPrimitiveFillRect
RitoPrimitiveList
RITODL1 format version 2: the device-resolved primitive list.
RitoPrimitiveListDecoder
Strict little-endian decoder for RITODL1 format version 2, the device-resolved primitive list the engine paints every frame as.
RitoPrimitiveListReplayer
RitoPrimitiveOpacity
RitoPrimitivePopState
RitoPrimitivePushState
RitoPrimitiveRuby
RitoPrimitiveShadow
A canvas-style shadow: shape blurred by Gaussian sigma (device pixels) and drawn at offset, then the shape itself on top, both with clipOut excluded from the result.
RitoPrimitiveStrokePath
RitoPrimitiveTarget
A renderer of the device-resolved primitive list: it blits what the engine resolved and never measures or snaps.
RitoPrimitiveText
A text run with every length in device pixels; glyph placement is still the renderer's.
RitoPrimitiveTransform
RitoPrimitiveTranslate
RitoPublication
RitoPublicationDecoder
RitoPublicationMetadata
RitoPublicationSpineItem
RitoPublicationTocEntry
RitoPublicationTocExternalTarget
RitoPublicationTocLocatorTarget
RitoPublicationTocTarget
RitoPublicationTocUnresolvedTarget
RitoRect
RitoRequestEncoder
RitoResource
RitoResourceDecoder
RitoResourceRef
RitoRunPaint
The paint a text run carries: what the pen needs to raster its glyphs. The run's inline box (background band, padding, borders) and its decoration line lower to primitives around the run in the engine.
RitoSemanticNode
RitoSourcePoint
RitoSourceRange
RitoStrokeCap
RitoTapFootnote
A note anchor: read the note under key with readFootnote.
RitoTapImage
An image outside any link.
A link that is not a note anchor: navigate or open externally.
RitoTapTarget
What a tap on the painted surface lands on, resolved from the artifact's hit entries — the engine's own account of links, note anchors and images, already in display-list space. Hosts hit-test against this instead of reading semantics off paint commands: the engine classifies note anchors (and reports whether their definition is indexed yet), and a link wrapping an image resolves as the link.
RitoTextPaintCommand
RitoTextRunOffset
RitoTextShadow
RitoTilePlan
A grid of image tiles: columns by rows copies of the destination, stepping stepX/stepY from origin.

Enums

RitoBackgroundState
RitoFootnoteKind
EPUB semantic role of a footnote definition, taken from the publication's own epub:type. Hosts title the popup with it — a footnote and an endnote are read differently.
RitoLocatorMatch
RitoResourceKind
RitoSemanticRole
RitoSpreadMode
RitoTextProfile

Exceptions / Errors

RitoWireException