Dart Documentationorson_chartsFit2D

Fit2D class

A utility class that fits one rectangle (the 'source') to another rectangle (the 'destination') according to some simple scaling rules.

Static Properties

final Fit2D BOTTOM_CENTER_NO_SCALING #

Aligns the source to the bottom center of the destination without changing its dimensions.

final Fit2D BOTTOM_LEFT_NO_SCALING #

Aligns the source to the bottom left of the destination without changing its dimensions.

final Fit2D BOTTOM_RIGHT_NO_SCALING #

Aligns the source to the bottom right of the destination without changing its dimensions.

final Fit2D CENTER_LEFT_NO_SCALING #

Aligns the source to the center left of the destination without changing its dimensions.

final Fit2D CENTER_NO_SCALING #

Centers the source within the destination without changing its dimensions.

final Fit2D CENTER_RIGHT_NO_SCALING #

Aligns the source to the center right of the destination without changing its dimensions.

final Fit2D SCALE_TO_FIT_TARGET #

Aligns the source to the destination and changes its dimensions to match those of the destination.

final Fit2D TOP_CENTER_NO_SCALING #

Aligns the source to the top center of the destination without changing its dimensions.

final Fit2D TOP_LEFT_NO_SCALING #

Aligns the source to the top left of the destination without changing its dimensions.

final Fit2D TOP_RIGHT_NO_SCALING #

Aligns the source to the top right of the destination without changing its dimensions.

Static Methods

Fit2D getNoScalingFitter(RefPt2D refPt) #

Returns a no scaling fitter matching the specified reference point ( refPt).

Constructors

new Fit2D(Anchor2D anchor, Scale2D scale) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object

Properties

Anchor2D anchor #

The anchor point for alignment.

Scale2D scale #

The scaling to apply.

Methods

Rectangle fit(Dimension2D srcDim, Rectangle target) #