|
|
|
|
|
|
BoxFit fit, |
|
|
|
ImageRepeat repeat, |
|
|
|
Rect centerSlice, |
|
|
|
// TextDirection textDirection,
|
|
|
|
TextDirection textDirection, |
|
|
|
// AlignmentGeometry alignment = null,
|
|
|
|
Alignment alignment = null, |
|
|
|
double scale = 1.0 |
|
|
|
) |
|
|
|
{ |
|
|
|
|
|
|
this._fit = fit; |
|
|
|
this._repeat = repeat; |
|
|
|
this._centerSlice = centerSlice; |
|
|
|
// this._matchTextDirection = matchTextDirection;
|
|
|
|
this._matchTextDirection = matchTextDirection; |
|
|
|
// this._alignment = alignment ?? Alignment.center;
|
|
|
|
this._alignment = alignment ?? Alignment.center; |
|
|
|
this._textDirection = textDirection; |
|
|
|
_updateColorFilter(); |
|
|
|
} |
|
|
|
|
|
|
{ |
|
|
|
if (_resolvedAlignment != null) |
|
|
|
return; |
|
|
|
// _resolvedAlignment = alignment.resolve(textDirection);
|
|
|
|
_resolvedAlignment = alignment; |
|
|
|
_flipHorizontally = matchTextDirection && textDirection == TextDirection.rtl; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
return; |
|
|
|
_image = value; |
|
|
|
markNeedsPaint(); |
|
|
|
if (_width == null || _height == null) |
|
|
|
if (_width == 0.0 || _height == 0.0) |
|
|
|
markNeedsLayout(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// private AlignmentGeometry _alignment;
|
|
|
|
private Alignment _alignment; |
|
|
|
// public AlignmentGeometry alignment
|
|
|
|
// {
|
|
|
|
// get { return _alignment; }
|
|
|
|
// set
|
|
|
|
// {
|
|
|
|
// if (value == _alignment)
|
|
|
|
// return;
|
|
|
|
// _alignment = value;
|
|
|
|
// _markNeedsResolution();
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
public Alignment alignment |
|
|
|
{ |
|
|
|
get { return _alignment; } |
|
|
|
set |
|
|
|
{ |
|
|
|
if (value == _alignment) |
|
|
|
return; |
|
|
|
_alignment = value; |
|
|
|
_markNeedsResolution(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private ImageRepeat _repeat; |
|
|
|
|
|
|
|