Adam Barth
ed38815dbd
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
c63c396da8
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
400d6df700
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
3a6cab2c40
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
83805e2a9e
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
17040ff355
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
0b18d56d5a
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
5fd9d77387
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
a21939bdaf
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
9dfbc4eea4
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
293563078d
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
20459183e4
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
769cef59ba
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
a0609d1f4e
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
d12f84c818
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
72902ef85b
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
854f083f1b
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