Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: Source/core/svg/SVGPathUtilities.cpp

Issue 18098007: Get rid of SVGPoint special case from the bindings generator (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGPathUtilities.h ('k') | Source/core/svg/SVGPoint.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) Research In Motion Limited 2010, 2012. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010, 2012. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 SVGPathTraversalStateBuilder* builder = globalSVGPathTraversalStateBuilder(t raversalState, 0); 305 SVGPathTraversalStateBuilder* builder = globalSVGPathTraversalStateBuilder(t raversalState, 0);
306 306
307 OwnPtr<SVGPathByteStreamSource> source = SVGPathByteStreamSource::create(str eam); 307 OwnPtr<SVGPathByteStreamSource> source = SVGPathByteStreamSource::create(str eam);
308 SVGPathParser* parser = globalSVGPathParser(source.get(), builder); 308 SVGPathParser* parser = globalSVGPathParser(source.get(), builder);
309 bool ok = parser->parsePathDataFromSource(NormalizedParsing); 309 bool ok = parser->parsePathDataFromSource(NormalizedParsing);
310 totalLength = builder->totalLength(); 310 totalLength = builder->totalLength();
311 parser->cleanup(); 311 parser->cleanup();
312 return ok; 312 return ok;
313 } 313 }
314 314
315 bool getPointAtLengthOfSVGPathByteStream(SVGPathByteStream* stream, float length , FloatPoint& point) 315 bool getPointAtLengthOfSVGPathByteStream(SVGPathByteStream* stream, float length , SVGPoint& point)
316 { 316 {
317 ASSERT(stream); 317 ASSERT(stream);
318 if (stream->isEmpty()) 318 if (stream->isEmpty())
319 return false; 319 return false;
320 320
321 PathTraversalState traversalState(PathTraversalState::TraversalPointAtLength ); 321 PathTraversalState traversalState(PathTraversalState::TraversalPointAtLength );
322 SVGPathTraversalStateBuilder* builder = globalSVGPathTraversalStateBuilder(t raversalState, length); 322 SVGPathTraversalStateBuilder* builder = globalSVGPathTraversalStateBuilder(t raversalState, length);
323 323
324 OwnPtr<SVGPathByteStreamSource> source = SVGPathByteStreamSource::create(str eam); 324 OwnPtr<SVGPathByteStreamSource> source = SVGPathByteStreamSource::create(str eam);
325 SVGPathParser* parser = globalSVGPathParser(source.get(), builder); 325 SVGPathParser* parser = globalSVGPathParser(source.get(), builder);
326 bool ok = parser->parsePathDataFromSource(NormalizedParsing); 326 bool ok = parser->parsePathDataFromSource(NormalizedParsing);
327 point = builder->currentPoint(); 327 point = builder->currentPoint();
328 parser->cleanup(); 328 parser->cleanup();
329 return ok; 329 return ok;
330 } 330 }
331 331
332 } 332 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGPathUtilities.h ('k') | Source/core/svg/SVGPoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698