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
9b898cff
Commit
9b898cff
authored
Aug 10, 2015
by
Viktor Lidholt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds optional rect property to sprite layer class
parent
0a02ea45
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 @
9b898cff
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