Commit graph

78 commits

Author SHA1 Message Date
Bastien Orivel
97674082d3 Pass BlendMode::Clear to the fill method of DrawTarget in clear_rect
This makes some tests regarding clearing rects pass. Otherwise the rect
wouldn't get cleared properly and it'd keep its original color but get
an alpha of 0
2019-08-21 19:10:56 +02:00
Bastien Orivel
777ef4f3e8 Implement snapshot_data_owned 2019-08-21 19:10:56 +02:00
Bastien Orivel
97364dc6af Implement get_size 2019-08-21 19:10:56 +02:00
Bastien Orivel
fda815bcbb Properly pass draw_options in fill_rect 2019-08-21 19:10:56 +02:00
Bastien Orivel
e90d1a1d8d Implement stroke_line and set_stroke_style 2019-08-21 19:10:56 +02:00
Bastien Orivel
9229dc4d85 Implement clear_rect 2019-08-21 19:10:56 +02:00
Bastien Orivel
24313a82a1 Make tidy happy 2019-08-21 19:10:56 +02:00
Bastien Orivel
14ee093a5b Implement size_from_pattern
I tried to mimic the azure implementation but raqote doesn't have a
concept of horizontal or vertical repeat so this might be
wrong/incomplete but this is the last function needed to finally have
some tests pass
2019-08-21 19:08:18 +02:00
Bastien Orivel
ed0dbafc72 Implement need_to_draw_shadow 2019-08-21 19:08:18 +02:00
Bastien Orivel
559b28ce7b Implement snapshot_data 2019-08-21 19:08:18 +02:00
Bastien Orivel
c39af71aeb Add an implementation for fill_rect
Again, this is probably incomplete but it'll do for now
2019-08-21 19:08:18 +02:00
Bastien Orivel
0a878da500 Implement Pattern::is_zero_size_gradient
There are probably other times where this would be true but I'll worry
about that later
2019-08-21 19:08:18 +02:00
Bastien Orivel
93f1053b0e Implement set_fill_style 2019-08-21 19:08:18 +02:00
Bastien Orivel
cbe385c7d7 Add a way to convert a FillOrStrokeStyle to a raqote Source
For now most of it unimplemented but it'll allow for some more testing
2019-08-21 19:08:18 +02:00
pylbrecht
7005c24e40 Implement some of GenericDrawTarget's methods for raqote 2019-08-21 19:08:17 +02:00
pylbrecht
398929ffef Implement fill() for raqote::DrawTarget 2019-08-21 19:08:17 +02:00
Josh Matthews
4e51caeb7e Deal with fallout from mutable trait method change. 2019-08-21 19:08:17 +02:00
pylbrecht
b43c5c30e3 WIP: Make GenericPathBuilder's methods take &mut self 2019-08-21 19:08:17 +02:00
pylbrecht
9f9013946a Implement provided raqote::PathBuilder's methods for GenericPathBuilder 2019-08-21 19:08:17 +02:00
pylbrecht
f9e398d9f6 Make GenericPathBuilder take &mut self 2019-08-21 19:08:17 +02:00
pylbrecht
4179f91f93 Implement StrokeOptions 2019-08-21 19:08:17 +02:00
pylbrecht
4aad4ff858 Implement DrawOptions.set_alpha() 2019-08-21 19:08:16 +02:00
Emilio Cobos Álvarez
3d57c22e9c Update euclid.
There are a few canvas2d-related dependencies that haven't updated, but they
only use euclid internally so that's not blocking landing the rest of the
changes.

Given the size of this patch, I think it's useful to get this landed as-is.
2019-07-23 23:09:55 +02:00
Simon Sapin
1d38bc0419 Fix some new warnings 2019-06-22 14:59:09 +02:00
Josh Matthews
ce18636aef Make Azure backend build again. 2019-06-03 00:12:01 -04:00
Josh Matthews
3539c029f1 Most basic raqote draw target stubs. 2019-06-03 00:12:01 -04:00
Josh Matthews
db362184fd Fix formatting. 2019-06-03 00:12:01 -04:00
Josh Matthews
3243f1753b Add cargo feature to control canvas backend. 2019-06-03 00:12:01 -04:00