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
7d3a6c4a
Commit
7d3a6c4a
authored
Aug 11, 2015
by
Viktor Lidholt
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #527 from vlidholt/master
Adds optional rect property to sprite layer class
parents
2701b469
9b898cff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
layer.dart
examples/game/lib/layer.dart
+5
-1
No files found.
examples/game/lib/layer.dart
View file @
7d3a6c4a
part of
sprites
;
class
Layer
extends
Node
with
SpritePaint
{
Rect
layerRect
;
Layer
([
Rect
this
.
layerRect
=
null
]);
Paint
_cachedPaint
=
new
Paint
()
..
setFilterQuality
(
FilterQuality
.
low
)
..
isAntiAlias
=
false
;
...
...
@@ -9,7 +13,7 @@ class Layer extends Node with SpritePaint {
super
.
_prePaint
(
canvas
,
matrix
);
_updatePaint
(
_cachedPaint
);
canvas
.
saveLayer
(
null
,
_cachedPaint
);
canvas
.
saveLayer
(
layerRect
,
_cachedPaint
);
}
void
_postPaint
(
PaintingCanvas
canvas
,
Matrix4
totalMatrix
)
{
...
...
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