Adam Barth
12439e5ccf
Address Ian's comments on layout2.dart
...
R=ianh@google.com
Review URL: https://codereview.chromium.org/1152603002
2015-05-21 13:32:21 -07:00
Adam Barth
045620e027
Port touch-demo.sky to SkyView universe
...
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1151613005
2015-05-21 12:34:38 -07:00
Adam Barth
2c85651165
Port spinning_square to SkyView universe
...
This demo shows how to create a spinning square using the lowest-level APIs. We
should probably create more spinning square demos at the other layers of the
system.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1147393002
2015-05-21 12:14:10 -07:00
Adam Barth
b7c3f545f0
Make hit testing work in layout2.dart
...
This CL makes simple_render_tree.dart interactive by making the hit testing
system work. I've also added a mechanism for requesting an animation frame.
R=eseidel@chromium.org , ianh@google.com
Review URL: https://codereview.chromium.org/1153543002
2015-05-21 11:22:17 -07:00
Adam Barth
7870498e53
Actually perform a block layout
...
This CL teaches simple_render_tree how to do a block layout using layout2.dart.
R=eseidel@chromium.org , ianh@google.com
Review URL: https://codereview.chromium.org/1144423002
2015-05-21 11:15:50 -07:00
Adam Barth
0a09212fe5
Add a simple_render_tree example
...
This example shows how to draw a circle using subclasses of RenderNode.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1144193004
2015-05-20 13:49:29 -07:00
Adam Barth
67109ce3e1
Plumb input events into SkyView
...
Clients can now register a callback that gets called whenever we have an event
for the view. We'll need to update the Event class at some point, but this is a
start.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1129333005
2015-05-19 16:50:28 -07:00
Adam Barth
0906da7f0f
Plumb display metrics into SkyView
...
This CL teaches SkyView the width, height, and device pixel ratio of the
display. In the future, we'll want some sort of notification system for when
these values change.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1139823010
2015-05-19 14:54:08 -07:00
Adam Barth
9f8b9bb96d
Teach SkyView path to draw a circle
...
This CL adds a global view object that can receive a Picture and be signaled to
draw. When using SkyView, this Picture shows up on screen.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1134913003
2015-05-19 14:20:04 -07:00
John McCutchan
b8b22315ee
Fix domokit.github.io site deployment script
...
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1145843002
2015-05-19 14:03:13 -07:00
Adam Barth
1b45682ba9
Teach SkyView code path to print hello, world
...
This CL makes the SkyView codepath smart enough to print "hello, world" to the
console. The code path is off by default but can be enabled by changing one
line of code.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1131673011
2015-05-19 13:51:12 -07:00
Matt Perry
c69bcc245c
Sky: Add a CustomDart attribute to the IDL compiler, and use that with Canvas
...
to provide a better Dart API.
When the attribute is present on an IDL interface, the generate Dart code will be a private interface that can extended by custom dart code.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1135283005
2015-05-19 13:59:05 -04:00
Eric Seidel
cd069f2a21
Add Canvas.drawPicture
...
I wrote another copy of paint_element_into_displaylist
using this new technology.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1129353010
2015-05-18 15:13:15 -07:00
Eric Seidel
d0613374d0
Make it possible to Paint elements into a display list.
...
Currently said elements need to be in the DOM and have
already been laid out for this to work, but follow-up patches
will remove these restrictions.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1144673002
2015-05-18 14:49:59 -07:00
Matt Perry
6729917a2d
Flesh out the Painting API a bit.
...
This exposes most methods from Skia's C canvas API to Dart. For now, SkRect and
SkMatrix are represented simply as an array of floats, which requires a
conversion at the bindings layer. More complex types like SkPath are still TODO.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1144483002
2015-05-13 17:17:26 -04:00
Eric Seidel
1eb17996fb
Make it possible to custom-paint without an Element.
...
This adds a new abstract 'Canvas' which is similar to SkCanvas.
PaintContext implements Canvas while still having its
own commit() method to cause the paint actions to apply to
the Element for the next frame.
This adds a new PictureRecorder which also implements Canvas
and has an endRecording() method which returns a Picture
(another new interface) which can be held from Dart.
There is also now a rootPicture setter on Document which takes
a Picture and will then make the Document draw that Picture
until changed.
This piggybacks on the existing custom painting system
which adds the painting at background-and-borders paint
time so technically if you both set rootPicture as well as
construct a DOM you will draw the DOM on top of your picture. :)
R=mpcomplete@chromium.org
Review URL: https://codereview.chromium.org/1122423009
2015-05-13 13:16:47 -07:00
Eric Seidel
3afd5e5a77
Add pubspec.yaml files for each of the examples/ directories
...
so that pub get will create a packages/ directory for each
and users of packages/sky/sky_tool can run these examples
from sky_sdk as the instructions say to.
TBR=ianh@google.com
https://github.com/domokit/mojo/issues/128
Review URL: https://codereview.chromium.org/1110283002
2015-04-28 16:26:38 -07:00
Eric Seidel
9fa6ca170a
Teach window.location.href setter to handle relative urls.
...
Also fixed display of text in touch-demo.sky
R=ianh@google.com
Review URL: https://codereview.chromium.org/1059743004
2015-04-14 12:16:51 -07:00
Adam Barth
51e3fce449
Clean up examples directory
...
1) Merge input example into widgets example
2) Move single-file, non-fn examples into a "raw" directory
3) Rename stocks-fn and widgets-fn to stocks and widgets
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/1005393006
2015-03-26 14:32:40 -07:00