canvas_renderer_flutter 0.13.0 copy "canvas_renderer_flutter: ^0.13.0" to clipboard
canvas_renderer_flutter: ^0.13.0 copied to clipboard

Flutter rendering and canonical scene PNG output for canvas_core.

0.13.0 #

  • Breaking: require canvas_core 0.14.x.
  • Breaking: paint prepared scenes directly through CanvasRenderer.paintScene(canvas, SceneEvaluation) instead of replaying core PaintOp snapshots. Flutter now draws scene content and underlays using computed order, geometry, and transforms.
  • Render linear gradients from authored target-local endpoints and ordered color stops, with clamp behavior and existing opacity handling. Keep authored path fills authoritative rather than relying on compiled path fill style.
  • Retain strict PNG resource preflight and interactive missing-image behavior during the direct-rendering transition.

0.12.0 #

  • Breaking: toUiImage() now propagates provider, image-stream, and clone errors with their available original stack traces instead of returning null. Direct callers must handle these failures.
  • Breaking: change resolveSceneIntrinsics() and preloadScene() from Future<void> to Future<List<FlutterImageLoadFailure>>, returning immutable operation-local failures. Interactive consumers may ignore results; superseded or disposed operations return an empty list.
  • Add CanvasImageRenderException, a StateError subtype retaining missing node IDs and relevant image-loading failures for strict PNG output. Formatted errors omit source values and original exception text; structured causes and references require host-controlled redaction.
  • Convert file URIs only in the native image-provider adapter, propagating unsupported or invalid conversions instead of treating URIs as filenames.
  • Prevent obsolete intrinsic-resolution results from populating the active metadata cache. Preserve independent metadata/raster loading, retry behavior, stale image disposal, and the existing strict PNG requirements.
  • Breaking: remove CanvasPngSpec.fit and CanvasPngSpec.bleedPx; canonical PNG output now uses contain fitting without an export-space bleed option.
  • Move content/artboard source selection and tight crop output sizing into the PNG renderer while preserving content padding, transparency, pixel-ratio clamping, and final raster rounding.

0.11.0 #

  • Breaking: require canvas_core 0.12.x.
  • No rendering behavior changes.

0.10.0 #

  • Breaking: require canvas_core 0.11.x.
  • Render ordered CanvasSourceUnderlay values for text and icons.
  • Support configurable shadow underlays, including enablement, offset, blur, color, and back-to-front ordering.
  • Support effect-only text and icons whose foreground is CanvasFill.none().
  • Keep source-underlay expansion confined to paint bounds so effects do not change layout geometry or transform pivots.
  • Include expanded effect paint bounds in content fitting and final-output cropping.

0.9.0 #

  • Breaking: require canvas_core 0.10.x.
  • Breaking: replace CanvasDocumentExporter and CanvasExportSpec with the canonical CanvasPngRenderer / CanvasPngSpec boundary.
  • Add FlutterCanvasPngRenderer, which owns strict final-output validation, resource preflight, optional scene preparation, layout, paint replay, PNG encoding, and operation-scoped resource disposal.
  • Add FlutterFontLoader, BundledFlutterFont, and BundledFlutterFontLoader for explicit renderer-owned font availability.
  • Breaking: replace the four image resolver callbacks on FlutterImagePool with CanvasImageAssetResolver from canvas_core.
  • Resolve renderable image sources per preload operation so temporary or rotating URLs are never treated as persistent identity.
  • Keep stable intrinsic metadata cached by logical source reference while preserving stale-request and decoded-image ownership guarantees.
  • Enforce final-output resource preservation across preparation: prepared font families, icon refs, and active logical image source refs must be subsets of canonical dependencies.

0.8.1 #

  • Start raster decoding without waiting for optional intrinsic metadata.
  • Contain bulk metadata resolver failures and fall back to isolated per-source resolution when available.

0.8.0 #

  • Breaking: require canvas_core 0.9.x.
  • Resolve image sources through the document-local image asset registry.
  • Prefer persisted image intrinsic dimensions before falling back to host metadata resolution.

0.7.0 #

  • Breaking: require canvas_core 0.8.x.
  • No rendering behavior changes.

0.6.0 #

  • Breaking: require canvas_core 0.7.x.
  • Support the explicit component behavior version and data envelope introduced by canvas_core 0.7.0.

0.5.0 #

  • Breaking: require canvas_core 0.6.x.
  • Breaking: stop re-exporting CanvasFit and ContentBoundsPolicy. Import these core-owned types from canvas_core_runtime.dart.
  • Breaking: require one typed CanvasSceneDocument in CanvasDocumentExporter.exportPng() and remove the documentJson input.
  • Breaking: remove exporter-level renderBuilder support. Callers that use scene preparation must supply the already-prepared runtime scene.
  • Render the supplied scene directly through CanvasRenderPipeline.build().
  • Consume the CanvasViewportTransform returned directly by CanvasViewportPlanner.plan().

0.4.0 #

  • Breaking: make FlutterTextPipeline implement the core TextMeasurer contract directly.
  • Breaking: remove FlutterTextMeasurer, TextMetrics, and the previous FlutterTextPipeline.measure(TextSpec) API.
  • Breaking: require a caller-owned FlutterTextPipeline when constructing CanvasRenderer and CanvasDocumentExporter.
  • Breaking: remove fallbackFontFamilies from CanvasDocumentExporter; fallback fonts are configured on the supplied text pipeline instead.
  • Dispose cached TextPainter instances during LRU eviction, cache clearing, and pipeline disposal.
  • Dispose operation-scoped shadow, solid-color, and gradient text painters after painting.
  • Add reusable clearCache() and idempotent terminal dispose() lifecycle behavior.
  • Throw StateError when measurement or painting is attempted after pipeline disposal.
  • Reject non-positive text-layout cache limits with ArgumentError in all build modes.

0.3.1 #

  • Make PNG output image cleanup exception-safe.
  • Document that export input images remain caller-owned.

0.3.0 #

  • Breaking: make FlutterImagePool the sole owner of decoded images and stable intrinsic image metadata.
  • Remove FlutterImageIntrinsics and the separate intrinsics method parameters.
  • Expose decoded images through a live, read-only map.
  • Add injectable image decoding with explicit ownership transfer.
  • Dispose replaced, removed, stale, late, and retained image handles.
  • Prevent older intrinsic and raster requests from overwriting newer state.

0.2.0 #

  • Breaking: require canvas_core 0.4.x.
  • Replace pre-expanded text with native double letter spacing.
  • Forward letter spacing through measurement, caching, and painting.

0.1.1 #

  • Expand the supported canvas_core range to include 0.3.x.
  • No renderer behavior or API changes.

0.1.0 #

  • Initial open-source release of canvas_renderer_flutter.
  • Provides Flutter rendering, text measurement, decoded image caching, image intrinsic helpers, and PNG export support for canvas_core scenes.
  • Includes optional ImageProvider helpers behind a separate import for apps that want to resolve common image refs across mobile and web.
0
likes
150
points
637
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter rendering and canonical scene PNG output for canvas_core.

Repository (GitHub)
View/report issues

Topics

#canvas #flutter #graphics #renderer

License

Apache-2.0 (license)

Dependencies

canvas_core, flutter

More

Packages that depend on canvas_renderer_flutter