RefPtr<gfx::Path> SVGContentUtils::GetPath(const nsAString& aPathString) { SVGPathData pathData; nsSVGPathDataParser parser(aPathString, &pathData); if (!parser.Parse()) { return NULL; } return pathData.BuildPath(mozilla::gfx::FillRule::FILL_WINDING, NS_STYLE_STROKE_LINECAP_BUTT, 1); }
TemporaryRef<gfx::Path> SVGContentUtils::GetPath(const nsAString& aPathString) { SVGPathData pathData; nsSVGPathDataParser parser(aPathString, &pathData); if (!parser.Parse()) { return NULL; } RefPtr<DrawTarget> drawTarget = gfxPlatform::GetPlatform()->ScreenReferenceDrawTarget(); RefPtr<PathBuilder> builder = drawTarget->CreatePathBuilder(FillRule::FILL_WINDING); return pathData.BuildPath(builder, NS_STYLE_STROKE_LINECAP_BUTT, 1); }