Interface

TimelineCanvasLayerDrawContext

Context passed to a custom canvas layer draw callback.

Signature

Type Definition
Interface TimelineCanvasLayerDrawContext

Type parameters

NameConstraintDefaultDescription
TrackKindNonestringNo type parameter summary yet.

Properties

NameSignatureDescription
canvascanvas: HTMLCanvasElementApp-owned canvas element being drawn.
clipRectsclipRects: TimelineClipRect<TrackKind>[]All clip rectangles in track order.
ctxctx: CanvasRenderingContext2DCanvas 2D context scaled to CSS pixels.
dprdpr: numberCurrent device pixel ratio used for the backing bitmap.
heightheight: numberCanvas height in CSS pixels.
keyframeRectskeyframeRects: TimelineKeyframeRect<TrackKind>[]All keyframe rectangles in track order.
reasonreason: TimelineCanvasLayerRenderReasonReason this draw was scheduled.
requestDraw(): voidSchedules another draw, useful after an async asset cache finishes.
statestate: TimelineStateCurrent timeline state snapshot.
viewportviewport: TimelineCanvasLayerViewportCurrent viewport metrics.
visibleClipsvisibleClips: VisibleTimelineClip<TrackKind>[]Viewport-intersecting clips in track order.
visibleKeyframesvisibleKeyframes: VisibleTimelineKeyframe<TrackKind>[]Viewport-intersecting keyframes in track order.
widthwidth: numberCanvas width in CSS pixels.