Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
8af91f04
Commit
8af91f04
authored
Mar 29, 2017
by
Adam Barth
Committed by
Ian Hickson
Mar 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some more ImageFit -> BoxFit updates (#8927)
parent
ee3fcafc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
box_painter.dart
packages/flutter/lib/src/painting/box_painter.dart
+4
-4
box_fit_test.dart
packages/flutter/test/painting/box_fit_test.dart
+1
-1
No files found.
packages/flutter/lib/src/painting/box_painter.dart
View file @
8af91f04
...
...
@@ -868,8 +868,8 @@ Iterable<Rect> _generateImageTileRects(Rect outputRect, Rect fundamentalRect, Im
/// image.
/// * `fit`: How the image should be inscribed into `rect`. If null, the
/// default behavior depends on `centerSlice`. If `centerSlice` is also null,
/// the default behavior is [
Image
Fit.scaleDown]. If `centerSlice` is
/// non-null, the default behavior is [
ImageFit.fill]. See [Image
Fit] for
/// the default behavior is [
Box
Fit.scaleDown]. If `centerSlice` is
/// non-null, the default behavior is [
BoxFit.fill]. See [Box
Fit] for
/// details.
/// * `repeat`: If the image does not fill `rect`, whether and how the image
/// should be repeated to fill `rect`. By default, the image is not repeated.
...
...
@@ -885,7 +885,7 @@ Iterable<Rect> _generateImageTileRects(Rect outputRect, Rect fundamentalRect, Im
/// exactly cover the destination rectangle while maintaining their relative
/// positions.
/// * `alignment`: How the destination rectangle defined by applying `fit` is
/// aligned within `rect`. For example, if `fit` is [
Image
Fit.contain] and
/// aligned within `rect`. For example, if `fit` is [
Box
Fit.contain] and
/// `alignment` is [FractionalOffset.bottomRight], the image will be as large
/// as possible within `rect` and placed with its bottom right corner at the
/// bottom right corner of `rect`.
...
...
@@ -1043,7 +1043,7 @@ class BackgroundImage {
/// backgroundColor: const Color(0xff7c94b6),
/// backgroundImage: new BackgroundImage(
/// image: new ExactAssetImage('images/flowers.jpeg'),
/// fit:
Image
Fit.cover,
/// fit:
Box
Fit.cover,
/// ),
/// border: new Border.all(
/// color: Colors.black,
...
...
packages/flutter/test/painting/
image
_fit_test.dart
→
packages/flutter/test/painting/
box
_fit_test.dart
View file @
8af91f04
...
...
@@ -7,7 +7,7 @@ import 'package:flutter/painting.dart';
import
'package:test/test.dart'
;
void
main
(
)
{
test
(
'apply
Image
Fit'
,
()
{
test
(
'apply
Box
Fit'
,
()
{
FittedSizes
result
;
result
=
applyBoxFit
(
BoxFit
.
scaleDown
,
const
Size
(
100.0
,
1000.0
),
const
Size
(
200.0
,
2000.0
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment