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
1883d06a
Commit
1883d06a
authored
Aug 25, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build
I removed these functions by mistake in my previous patch.
parent
10fe17a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
object.dart
packages/flutter/lib/rendering/object.dart
+15
-2
No files found.
packages/flutter/lib/rendering/object.dart
View file @
1883d06a
...
...
@@ -181,6 +181,13 @@ class PaintingContext {
}
}
static
Paint
_getPaintForAlpha
(
int
alpha
)
{
return
new
Paint
()
..
color
=
new
Color
.
fromARGB
(
alpha
,
0
,
0
,
0
)
..
setTransferMode
(
sky
.
TransferMode
.
srcOver
)
..
isAntiAlias
=
false
;
}
void
paintChildWithOpacity
(
RenderObject
child
,
Point
childPosition
,
Rect
bounds
,
...
...
@@ -188,7 +195,7 @@ class PaintingContext {
assert
(
debugCanPaintChild
(
child
));
final
Offset
childOffset
=
childPosition
.
toOffset
();
if
(!
child
.
needsCompositing
)
{
canvas
.
saveLayer
(
bounds
,
OpacityLayer
.
p
aintForAlpha
(
alpha
));
canvas
.
saveLayer
(
bounds
,
_getP
aintForAlpha
(
alpha
));
canvas
.
translate
(
childOffset
.
dx
,
childOffset
.
dy
);
insertChild
(
child
,
Offset
.
zero
);
canvas
.
restore
();
...
...
@@ -202,6 +209,12 @@ class PaintingContext {
}
}
static
Paint
_getPaintForColorFilter
(
Color
color
,
sky
.
TransferMode
transferMode
)
{
return
new
Paint
()
..
setColorFilter
(
new
sky
.
ColorFilter
.
mode
(
color
,
transferMode
))
..
isAntiAlias
=
false
;
}
void
paintChildWithColorFilter
(
RenderObject
child
,
Point
childPosition
,
Rect
bounds
,
...
...
@@ -210,7 +223,7 @@ class PaintingContext {
assert
(
debugCanPaintChild
(
child
));
final
Offset
childOffset
=
childPosition
.
toOffset
();
if
(!
child
.
needsCompositing
)
{
canvas
.
saveLayer
(
bounds
,
ColorFilterLayer
.
p
aintForColorFilter
(
color
,
transferMode
));
canvas
.
saveLayer
(
bounds
,
_getP
aintForColorFilter
(
color
,
transferMode
));
canvas
.
translate
(
childOffset
.
dx
,
childOffset
.
dy
);
insertChild
(
child
,
Offset
.
zero
);
canvas
.
restore
();
...
...
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