Commit Graph

7 Commits

Author SHA1 Message Date
fmalita
cecd617a42 [SVGDom] Linear gradient 'spreadMethod' support
R=stephana@google.com,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2337203002

Review-Url: https://codereview.chromium.org/2337203002
2016-09-13 12:56:11 -07:00
fmalita
28d5b72d86 [SVGDom] Initial linear gradient support
Kind of a big change, to connect several new bits into something useful:

  * ID tracking & lookup
  * new asPaint() node virtual to support shader (and in the future filter) based paint servers
  * <defs>, <linearGradient> and <stop> element support
  * 'href', 'offset', 'stop-color', 'stop-opacity' attribute support
  * IRI/FuncIRI and rgb(...) parsing

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2327233003

Review-Url: https://codereview.chromium.org/2327233003
2016-09-12 17:06:47 -07:00
fmalita
5b31f321fc [SVGDom] <polygon> & <polyline> support
R=robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2235273003

Review-Url: https://codereview.chromium.org/2235273003
2016-08-12 12:15:33 -07:00
fmalita
2d961e086b [SVGDom] Add more presentation attributes.
Implement proper presentation attribute inheritance, and add
support for

* fill-opacity
* stroke-linecap
* stroke-linejoin
* stroke-opacity
* stroke-width

R=robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2234153002

Review-Url: https://codereview.chromium.org/2234153002
2016-08-11 09:16:29 -07:00
fmalita
c97796b47b [SVGDom] Improved transform parsing
Update 'transform' attribute parsing to a more robust, SkSVGAttributeParser-based implementation.

R=robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2220933003

Review-Url: https://codereview.chromium.org/2220933003
2016-08-08 12:58:57 -07:00
fmalita
397a517d1a [SVGDom] Add viewBox support
The main feature is <svg> viewBox and proper viewport support, but the CL
touches a few other things:

* refactor SkSVGRenderContext to auto-restore canvas state, and split the
  presentation bits into a separate CoW SkSVGPresentationContext

* introduce SkSVGNode::onPrepareToRender(), as a way for nodes to push their
  custom state before the actual onRender() call (instead of relying on
  non-virtual SkSVGNode to know about all possible state bits)

* add a "Type" suffix to SVG types, to disambiguate (e.g. SkSVGRectType vs.
  SkSVGRect)

R=robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222793002

Review-Url: https://codereview.chromium.org/2222793002
2016-08-08 11:38:55 -07:00
fmalita
bffc256687 [SVGDom] Initial SVGLength support
Mostly plumb new length types, but also introduce a stateful parser,
rect shape and named color support.

R=reed@google.com,robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2202053002

Review-Url: https://codereview.chromium.org/2202053002
2016-08-03 10:21:11 -07:00