CanvasImageViewer class

An image viewer that can render points, rectangles, clip and grid over.

Constructors

CanvasImageViewer({CanvasElement? canvas, int? width, int? height, int? maxWidth, int? maxHeight, bool canvasSizeSameOfRenderedImageSize = true, CanvasImageSource? image, ImageFilter? imageFilter, ViewerElement<Rectangle<num>>? clip, ViewerElement<List<Rectangle<num>>>? rectangles, ViewerElement<List<Point<num>>>? points, ViewerElement<List<Label<num>>>? labels, ViewerElement<List<Point<num>>>? perspective, ViewerElement<num>? gridSize, bool? cropPerspective, DateTime? time, EditionType? editable})

Properties

canvas CanvasElement
no setter
canvasSizeSameOfRenderedImageSize bool
final
clip Rectangle<num>?
Clip area element rendered in the image.
no setter
clipKey String
no setter
cropPerspective bool
no setter
editionType EditionType?
Type of edition (EditionType). If null edition is not enabled.
no setter
gridSize num?
The size of grid boxes when rendering the grid.
no setter
gridSizeKey String
no setter
hashCode int
The hash code for this object.
no setterinherited
height int
Height of the image.
no setter
inDOM bool
Returns true if this component is in DOM.
no setter
isEditable bool
Returns true if edition is enable. See editionType.
no setter
isOffsetRenderScaleGoodForHighQuality bool
no setter
labels List<Label<num>>?
Labels elements rendered in the image.
no setter
labelsKey String
no setter
offsetHeightRatio double
no setter
offsetRenderScale double
no setter
offsetWidthRatio double
no setter
onChange EventStream
getter/setter pair
perspective List<Point<num>>?
The perspective points to use in the Perspective filter of the image.
no setter
perspectiveKey String
no setter
points List<Point<num>>?
Point elements rendered in the image.
no setter
pointsKey String
no setter
rectangles List<Rectangle<num>>?
Rectangle elements rendered in the image.
no setter
rectanglesKey String
no setter
renderScaleQualityHigh double
no setter
renderScaleQualityLow double
no setter
renderScaleQualityMedium double
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
time DateTime?
Time of the image.
final
width int
Width of the image.
no setter

Methods

adjustClip(Point<num> mouse, bool click) Quality?
adjustLabels(Point<num> mouse, bool click) Quality?
adjustPerspective(Point<num> mouse, bool click) Quality?
adjustPoints(Point<num> mouse, bool click) Quality?
adjustRectangles(Point<num> mouse, bool click) Quality?
edit(Point<num> mouse, bool click) Quality?
hideHint() → void
interact(Point<num> mouse, bool click) Quality?
nearestPoint(List<Point<num>>? points, Point<num> p) Point<num>?
nearestRectangle(List<Rectangle<num>> rectangles, Point<num> p) Rectangle<num>?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render() → void
Renders this component.
renderAsync(Duration delay) → void
Renders this component asynchronously.
showHint(String label, Point<num> point) → void
Shows a hint with label at point in canvas.
showHintAtRectangle(String label, Rectangle<num> rect) → void
Shows a hint with label bellow rect in canvas.
showLabel(Point<num> mouse) Quality?
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

dateFormatYYYYMMDDHHMMSS → DateFormat
final

Static Methods

clipViewerElement(Rectangle<num>? clip, [Color? color]) ViewerElement<Rectangle<num>>
Converts Rectangle<num> to ViewerElement<Rectangle<num>>.
clipViewerElementFromMap(Map? clip, [Color? color]) ViewerElement<Rectangle<num>>
clipViewerElementFromNums(List? clip, [Color? color]) ViewerElement<Rectangle<num>>
getRectangleCenter(Rectangle<num> r) Point<num>
gridSizeViewerElement(num gridSize, [Color? color]) ViewerElement<num>
labelsViewerElement(List<Label<num>> labels, [Color? color, int? strokeSize]) ViewerElement<List<Label<num>>>
Converts a List<Rectangle<num>> to ViewerElement< List<Rectangle<num>> >.
labelsViewerElementFromNums(List labels, [Color? color, int? strokeSize]) ViewerElement<List<Label<num>>>
Converts a List if labels to ViewerElement< List<Label<num>> >.
perspectiveViewerElement(List<Point<num>>? perspective, [Color? color]) ViewerElement<List<Point<num>>>
Converts List< Point<num> > (perspective points) to ViewerElement< List<Point<num>> >.
perspectiveViewerElementFromNums(List? perspective, [Color? color]) ViewerElement<List<Point<num>>>
Converts a List<num> (pairs of perspective points) to ViewerElement< List<Point<num>> >.
pointsViewerElement(List<Point<num>> points, [Color? color]) ViewerElement<List<Point<num>>>
Converts a List<Point<num>> to ViewerElement< List<Point<num>> >.
rectanglesViewerElement(List<Rectangle<num>> rectangles, [Color? color, int? strokeSize]) ViewerElement<List<Rectangle<num>>>
Converts a List<Rectangle<num>> to ViewerElement< List<Rectangle<num>> >.
rectanglesViewerElementFromNums(List rectangles, [Color? color, int? strokeSize]) ViewerElement<List<Rectangle<num>>>
Converts a List if rectangles to ViewerElement< List<Rectangle<num>> >.