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
5108e15e
Commit
5108e15e
authored
Sep 08, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduce painting.dart and move painting code to src/painting
parent
25b80399
Changes
37
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
63 additions
and
50 deletions
+63
-50
main.dart
examples/demo_launcher/lib/main.dart
+1
-1
main.dart
examples/fitness/lib/main.dart
+1
-1
game_demo.dart
examples/game/lib/game_demo.dart
+1
-1
main.dart
examples/game/lib/main.dart
+1
-1
main.dart
examples/mine_digger/lib/main.dart
+1
-1
README.md
packages/flutter/lib/README.md
+6
-6
painting.dart
packages/flutter/lib/painting.dart
+14
-0
README.md
packages/flutter/lib/src/painting/README.md
+0
-0
box_painter.dart
packages/flutter/lib/src/painting/box_painter.dart
+1
-1
radial_reaction.dart
packages/flutter/lib/src/painting/radial_reaction.dart
+0
-0
shadows.dart
packages/flutter/lib/src/painting/shadows.dart
+0
-0
text_painter.dart
packages/flutter/lib/src/painting/text_painter.dart
+2
-2
text_style.dart
packages/flutter/lib/src/painting/text_style.dart
+0
-0
README.md
packages/flutter/lib/src/rendering/README.md
+2
-1
box.dart
packages/flutter/lib/src/rendering/box.dart
+2
-3
image.dart
packages/flutter/lib/src/rendering/image.dart
+1
-1
paragraph.dart
packages/flutter/lib/src/rendering/paragraph.dart
+2
-2
proxy_box.dart
packages/flutter/lib/src/rendering/proxy_box.dart
+3
-3
shifted_box.dart
packages/flutter/lib/src/rendering/shifted_box.dart
+1
-2
README.md
packages/flutter/lib/src/widgets/README.md
+1
-1
animated_container.dart
packages/flutter/lib/src/widgets/animated_container.dart
+1
-1
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+3
-3
default_text_style.dart
packages/flutter/lib/src/widgets/default_text_style.dart
+1
-1
drawer_item.dart
packages/flutter/lib/src/widgets/drawer_item.dart
+1
-1
editable_text.dart
packages/flutter/lib/src/widgets/editable_text.dart
+1
-1
input.dart
packages/flutter/lib/src/widgets/input.dart
+1
-1
material.dart
packages/flutter/lib/src/widgets/material.dart
+1
-1
popup_menu.dart
packages/flutter/lib/src/widgets/popup_menu.dart
+1
-1
popup_menu_item.dart
packages/flutter/lib/src/widgets/popup_menu_item.dart
+1
-1
snack_bar.dart
packages/flutter/lib/src/widgets/snack_bar.dart
+1
-1
switch.dart
packages/flutter/lib/src/widgets/switch.dart
+1
-2
tabs.dart
packages/flutter/lib/src/widgets/tabs.dart
+1
-1
tool_bar.dart
packages/flutter/lib/src/widgets/tool_bar.dart
+4
-4
README.md
packages/flutter/lib/theme/README.md
+2
-1
shadows.dart
packages/flutter/lib/theme/shadows.dart
+1
-1
typography.dart
packages/flutter/lib/theme/typography.dart
+1
-1
skysprites.dart
packages/flutter_sprites/lib/skysprites.dart
+1
-1
No files found.
examples/demo_launcher/lib/main.dart
View file @
5108e15e
...
...
@@ -4,7 +4,7 @@
import
'package:sky/mojo/activity.dart'
;
import
'package:sky/mojo/asset_bundle.dart'
;
import
'package:sky/painting
/box_painter
.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/theme/colors.dart'
as
colors
;
import
'package:sky/theme/typography.dart'
as
typography
;
import
'package:sky/widgets.dart'
;
...
...
examples/fitness/lib/main.dart
View file @
5108e15e
...
...
@@ -6,7 +6,7 @@ library fitness;
import
'package:playfair/playfair.dart'
as
playfair
;
import
'package:sky/animation.dart'
;
import
'package:sky/painting
/text_style
.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/theme/colors.dart'
as
colors
;
import
'package:sky/widgets.dart'
;
import
'user_data.dart'
;
...
...
examples/game/lib/game_demo.dart
View file @
5108e15e
...
...
@@ -4,7 +4,7 @@ import 'dart:async';
import
'dart:math'
as
math
;
import
'dart:sky'
as
sky
;
import
'package:sky/painting
/text_style
.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/src/rendering/object.dart'
;
import
'package:sky/src/widgets/framework.dart'
;
import
'package:skysprites/skysprites.dart'
;
...
...
examples/game/lib/main.dart
View file @
5108e15e
...
...
@@ -5,7 +5,7 @@
import
'dart:async'
;
import
'package:sky/mojo/asset_bundle.dart'
;
import
'package:sky/painting
/text_style
.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/src/rendering/object.dart'
;
import
'package:sky/src/widgets/basic.dart'
;
import
'package:sky/src/widgets/button_base.dart'
;
...
...
examples/mine_digger/lib/main.dart
View file @
5108e15e
...
...
@@ -5,7 +5,7 @@ import 'dart:sky' as sky;
import
'dart:math'
;
import
'package:sky/mojo/activity.dart'
as
activity
;
import
'package:sky/painting
/text_style
.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/rendering.dart'
;
import
'package:sky/theme/colors.dart'
as
colors
;
import
'package:sky/widgets.dart'
;
...
...
packages/flutter/lib/README.md
View file @
5108e15e
...
...
@@ -18,14 +18,14 @@ Above this layer is the [animation](animation.dart) library,
which provides core animation primitives, and the
[
gestures/
](
gestures/
)
directory, which define a gesture recognition and disambiguation system.
The next layer consists of the
files in the
[
painting/
](
painting/
)
directo
ry,
which provide APIs related to drawing graphics. Some of the code here
uses the
[
animation
](
animation.dart
)
utilities
mentioned above.
The next layer consists of the
[
painting
](
painting.dart
)
libra
ry,
which provide
s
APIs related to drawing graphics. Some of the code here
uses the
[
animation
](
animation.dart
)
library
mentioned above.
Layout primitives are provided in the next layer, found in the
[
rendering
](
rendering.dart
)
library. They use
`dart:sky`
and the
APIs exposed in
[
painting/
](
painting/
)
to provide a retained-mode layout and
rendering model for applications or documents.
APIs exposed in
the
[
painting
](
painting.dart
)
library to provide a retained-mode
layout and
rendering model for applications or documents.
Widgets are provided by the files in the
[
widgets
](
widgets.dart
)
library, using a reactive framework. They use data given in the
...
...
@@ -46,7 +46,7 @@ Here is a diagram summarizing all this:
| ++---------------------++ |
| | rendering | | Dart
| |---------+------------+ |
| | | painting
/
| |
| | | painting
| |
+-+ +------------+ |
| gestures/ | animation | |
+-----------+---+--------+ |
...
...
packages/flutter/lib/painting.dart
0 → 100644
View file @
5108e15e
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// The Sky render tree.
///
/// This library includes and re-exports all Sky rendering classes.
library
painting
;
export
'src/painting/box_painter.dart'
;
export
'src/painting/radial_reaction.dart'
;
export
'src/painting/shadows.dart'
;
export
'src/painting/text_painter.dart'
;
export
'src/painting/text_style.dart'
;
packages/flutter/lib/painting/README.md
→
packages/flutter/lib/
src/
painting/README.md
View file @
5108e15e
File moved
packages/flutter/lib/painting/box_painter.dart
→
packages/flutter/lib/
src/
painting/box_painter.dart
View file @
5108e15e
...
...
@@ -7,7 +7,7 @@ import 'dart:sky' as sky;
import
'dart:sky'
show
Point
,
Offset
,
Size
,
Rect
,
Color
,
Paint
,
Path
;
import
'package:sky/base/image_resource.dart'
;
import
'package:sky/painting/shadows.dart'
;
import
'package:sky/
src/
painting/shadows.dart'
;
/// An immutable set of offsets in each of the four cardinal directions
///
...
...
packages/flutter/lib/painting/radial_reaction.dart
→
packages/flutter/lib/
src/
painting/radial_reaction.dart
View file @
5108e15e
File moved
packages/flutter/lib/painting/shadows.dart
→
packages/flutter/lib/
src/
painting/shadows.dart
View file @
5108e15e
File moved
packages/flutter/lib/painting/text_painter.dart
→
packages/flutter/lib/
src/
painting/text_painter.dart
View file @
5108e15e
...
...
@@ -4,9 +4,9 @@
import
'dart:sky'
as
sky
;
import
'package:sky/painting/text_style.dart'
;
import
'package:sky/
src/
painting/text_style.dart'
;
export
'package:sky/painting/text_style.dart'
;
export
'package:sky/
src/
painting/text_style.dart'
;
/// An immutable span of text
abstract
class
TextSpan
{
...
...
packages/flutter/lib/painting/text_style.dart
→
packages/flutter/lib/
src/
painting/text_style.dart
View file @
5108e15e
File moved
packages/flutter/lib/src/rendering/README.md
View file @
5108e15e
...
...
@@ -384,6 +384,7 @@ scheduler.addPersistentFrameCallback((_) {
Dependencies
------------
*
[
`package:sky/animation.dart`
](
../../animation.dart
)
*
[
`package:sky/base`
](
../../base
)
*
[
`package:sky/mojo`
](
../../mojo
)
*
[
`package:sky/
animation.dart`
](
../../animation
.dart
)
*
[
`package:sky/
painting.dart`
](
../../painting
.dart
)
packages/flutter/lib/src/rendering/box.dart
View file @
5108e15e
...
...
@@ -6,12 +6,11 @@ import 'dart:math' as math;
import
'dart:sky'
as
sky
;
import
'package:sky/base/debug.dart'
;
import
'package:sky/painting/box_painter.dart'
;
import
'package:sky/painting/text_style.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/src/rendering/object.dart'
;
import
'package:vector_math/vector_math.dart'
;
export
'package:sky/painting
/text_style
.dart'
show
TextBaseline
;
export
'package:sky/painting.dart'
show
TextBaseline
;
// GENERIC BOX RENDERING
// Anything that has a concept of x, y, width, height is going to derive from this
...
...
packages/flutter/lib/src/rendering/image.dart
View file @
5108e15e
...
...
@@ -4,7 +4,7 @@
import
'dart:sky'
as
sky
;
import
'package:sky/painting
/box_painter
.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/src/rendering/object.dart'
;
import
'package:sky/src/rendering/box.dart'
;
...
...
packages/flutter/lib/src/rendering/paragraph.dart
View file @
5108e15e
...
...
@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:sky/painting/text_painter.dart'
;
import
'package:sky/
src/
painting/text_painter.dart'
;
import
'package:sky/src/rendering/box.dart'
;
import
'package:sky/src/rendering/object.dart'
;
export
'package:sky/painting/text_painter.dart'
;
export
'package:sky/
src/
painting/text_painter.dart'
;
// Unfortunately, using full precision floating point here causes bad layouts
// because floating point math isn't associative. If we add and subtract
...
...
packages/flutter/lib/src/rendering/proxy_box.dart
View file @
5108e15e
...
...
@@ -4,13 +4,13 @@
import
'dart:sky'
as
sky
;
import
'package:sky/painting/box_painter.dart'
;
import
'package:sky/painting/text_style.dart'
;
import
'package:sky/
src/
painting/box_painter.dart'
;
import
'package:sky/
src/
painting/text_style.dart'
;
import
'package:sky/src/rendering/object.dart'
;
import
'package:sky/src/rendering/box.dart'
;
import
'package:vector_math/vector_math.dart'
;
export
'package:sky/painting/box_painter.dart'
;
export
'package:sky/
src/
painting/box_painter.dart'
;
class
RenderProxyBox
extends
RenderBox
with
RenderObjectWithChildMixin
<
RenderBox
>
{
...
...
packages/flutter/lib/src/rendering/shifted_box.dart
View file @
5108e15e
...
...
@@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:sky/painting/box_painter.dart'
;
import
'package:sky/painting/text_style.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/src/rendering/object.dart'
;
import
'package:sky/src/rendering/box.dart'
;
...
...
packages/flutter/lib/src/widgets/README.md
View file @
5108e15e
...
...
@@ -502,6 +502,6 @@ Dependencies
*
`package:vector_math`
*
[
`package:sky/animation.dart`
](
../../animation.dart
)
*
[
`package:sky/base`
](
../../base
)
*
[
`package:sky/painting
`
](
../../painting
)
*
[
`package:sky/painting
.dart`
](
../../painting.dart
)
*
[
`package:sky/rendering.dart`
](
../../rendering.dart
)
*
[
`package:sky/theme`
](
../../theme
)
packages/flutter/lib/src/widgets/animated_container.dart
View file @
5108e15e
...
...
@@ -6,7 +6,7 @@ import 'dart:sky' as sky;
import
'package:vector_math/vector_math.dart'
;
import
'package:sky/animation.dart'
;
import
'package:sky/painting
/box_painter
.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/src/widgets/animated_component.dart'
;
import
'package:sky/src/widgets/basic.dart'
;
import
'package:sky/src/widgets/framework.dart'
;
...
...
packages/flutter/lib/src/widgets/basic.dart
View file @
5108e15e
...
...
@@ -9,8 +9,8 @@ import 'package:vector_math/vector_math.dart';
import
'package:sky/base/image_resource.dart'
;
import
'package:sky/mojo/asset_bundle.dart'
;
import
'package:sky/mojo/net/image_cache.dart'
as
image_cache
;
import
'package:sky/painting/text_painter.dart'
;
import
'package:sky/painting/text_style.dart'
;
import
'package:sky/
src/
painting/text_painter.dart'
;
import
'package:sky/
src/
painting/text_style.dart'
;
import
'package:sky/src/rendering/block.dart'
;
import
'package:sky/src/rendering/box.dart'
;
import
'package:sky/src/rendering/flex.dart'
;
...
...
@@ -26,7 +26,7 @@ import 'package:sky/src/widgets/default_text_style.dart';
import
'package:sky/src/widgets/framework.dart'
;
export
'package:sky/base/hit_test.dart'
show
EventDisposition
,
combineEventDispositions
;
export
'package:sky/painting/text_style.dart'
;
export
'package:sky/
src/
painting/text_style.dart'
;
export
'package:sky/src/rendering/block.dart'
show
BlockDirection
;
export
'package:sky/src/rendering/box.dart'
show
BoxConstraints
;
export
'package:sky/src/rendering/flex.dart'
show
FlexJustifyContent
,
FlexAlignItems
,
FlexDirection
;
...
...
packages/flutter/lib/src/widgets/default_text_style.dart
View file @
5108e15e
...
...
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:sky/painting
/text_style
.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/src/widgets/basic.dart'
;
import
'package:sky/src/widgets/framework.dart'
;
...
...
packages/flutter/lib/src/widgets/drawer_item.dart
View file @
5108e15e
...
...
@@ -4,7 +4,7 @@
import
'dart:sky'
as
sky
;
import
'package:sky/painting
/text_style
.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/theme/colors.dart'
as
colors
;
import
'package:sky/src/widgets/basic.dart'
;
import
'package:sky/src/widgets/button_base.dart'
;
...
...
packages/flutter/lib/src/widgets/editable_text.dart
View file @
5108e15e
...
...
@@ -6,7 +6,7 @@ import 'dart:async';
import
'dart:sky'
as
sky
;
import
'package:mojo_services/keyboard/keyboard.mojom.dart'
;
import
'package:sky/painting
/text_style
.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/src/widgets/basic.dart'
;
import
'package:sky/src/widgets/framework.dart'
;
...
...
packages/flutter/lib/src/widgets/input.dart
View file @
5108e15e
...
...
@@ -3,7 +3,7 @@
// found in the LICENSE file.
import
'package:sky/mojo/keyboard.dart'
;
import
'package:sky/painting
/text_style
.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/src/widgets/basic.dart'
;
import
'package:sky/src/widgets/editable_text.dart'
;
import
'package:sky/src/widgets/focus.dart'
;
...
...
packages/flutter/lib/src/widgets/material.dart
View file @
5108e15e
...
...
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:sky/painting
/box_painter
.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/theme/shadows.dart'
;
import
'package:sky/src/widgets/animated_container.dart'
;
import
'package:sky/src/widgets/basic.dart'
;
...
...
packages/flutter/lib/src/widgets/popup_menu.dart
View file @
5108e15e
...
...
@@ -5,7 +5,7 @@
import
'dart:sky'
as
sky
;
import
'package:sky/animation.dart'
;
import
'package:sky/painting
/box_painter
.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/theme/colors.dart'
;
import
'package:sky/theme/shadows.dart'
;
import
'package:sky/src/widgets/basic.dart'
;
...
...
packages/flutter/lib/src/widgets/popup_menu_item.dart
View file @
5108e15e
...
...
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:sky/painting
/text_style
.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/src/widgets/basic.dart'
;
import
'package:sky/src/widgets/default_text_style.dart'
;
import
'package:sky/src/widgets/framework.dart'
;
...
...
packages/flutter/lib/src/widgets/snack_bar.dart
View file @
5108e15e
...
...
@@ -4,7 +4,7 @@
import
'package:sky/animation.dart'
;
import
'package:sky/painting
/text_style
.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/theme/typography.dart'
as
typography
;
import
'package:sky/src/widgets/basic.dart'
;
import
'package:sky/src/widgets/default_text_style.dart'
;
...
...
packages/flutter/lib/src/widgets/switch.dart
View file @
5108e15e
...
...
@@ -5,8 +5,7 @@
import
'dart:async'
;
import
'dart:sky'
as
sky
;
import
'package:sky/painting/radial_reaction.dart'
;
import
'package:sky/painting/shadows.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/src/rendering/box.dart'
;
import
'package:sky/src/rendering/object.dart'
;
import
'package:sky/theme/shadows.dart'
;
...
...
packages/flutter/lib/src/widgets/tabs.dart
View file @
5108e15e
...
...
@@ -7,7 +7,7 @@ import 'dart:sky' as sky;
import
'package:newton/newton.dart'
;
import
'package:sky/animation.dart'
;
import
'package:sky/painting
/text_style
.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/rendering.dart'
;
import
'package:sky/theme/colors.dart'
as
colors
;
import
'package:sky/theme/typography.dart'
as
typography
;
...
...
packages/flutter/lib/src/widgets/tool_bar.dart
View file @
5108e15e
...
...
@@ -4,15 +4,15 @@
import
'package:sky/src/widgets/theme.dart'
;
import
'package:sky/painting
/text_style
.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/src/rendering/flex.dart'
;
import
'package:sky/theme/shadows.dart'
;
import
'package:sky/theme/typography.dart'
as
typography
;
import
'package:sky/theme/view_configuration.dart'
;
import
'package:sky/src/widgets/basic.dart'
;
import
'package:sky/src/widgets/default_text_style.dart'
;
import
'package:sky/src/widgets/framework.dart'
;
import
'package:sky/src/widgets/icon.dart'
;
import
'package:sky/theme/shadows.dart'
;
import
'package:sky/theme/typography.dart'
as
typography
;
import
'package:sky/theme/view_configuration.dart'
;
class
ToolBar
extends
Component
{
...
...
packages/flutter/lib/theme/README.md
View file @
5108e15e
...
...
@@ -2,4 +2,5 @@ This directory provides constants for Material Design.
http://www.google.com/design/spec/material-design/
Files in this directory only depend on ../painting/
*
and sky:dart.
Files in this directory only depend on
[
painting.dart
](
../painting.dart
)
and
`sky:dart`
.
packages/flutter/lib/theme/shadows.dart
View file @
5108e15e
...
...
@@ -4,7 +4,7 @@
import
'dart:sky'
show
Color
,
Offset
;
import
'package:sky/painting
/box_painter
.dart'
;
import
'package:sky/painting.dart'
;
const
Map
<
int
,
List
<
BoxShadow
>>
shadows
=
const
{
1
:
const
[
...
...
packages/flutter/lib/theme/typography.dart
View file @
5108e15e
...
...
@@ -6,7 +6,7 @@
import
'dart:sky'
;
import
'package:sky/painting
/text_style
.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/theme/colors.dart'
as
colors
;
// TODO(eseidel): Font weights are supposed to be language relative!
...
...
packages/flutter_sprites/lib/skysprites.dart
View file @
5108e15e
...
...
@@ -14,7 +14,7 @@ import 'package:mojo/core.dart';
import
'package:sky/animation.dart'
;
import
'package:sky/mojo/asset_bundle.dart'
;
import
'package:sky/mojo/shell.dart'
as
shell
;
import
'package:sky/painting
/text_painter
.dart'
;
import
'package:sky/painting.dart'
;
import
'package:sky/src/rendering/box.dart'
;
import
'package:sky/src/rendering/object.dart'
;
import
'package:sky/src/widgets/framework.dart'
;
...
...
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