aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkPath.h
Commit message (Collapse)AuthorAge
* Fix SkPathStroker::lineTo() for line with length SK_ScalarNearlyZeroGravatar epoger@google.com2012-04-11
| | | | | | Review URL: https://codereview.appspot.com/5992077 git-svn-id: http://skia.googlecode.com/svn/trunk@3650 2bbb7eff-a529-9590-31e7-b0007b416f81
* Upstream changes from Android repository.Gravatar djsollen@google.com2012-03-21
| | | | | | Review URL: https://codereview.appspot.com/5752055 git-svn-id: http://skia.googlecode.com/svn/trunk@3449 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixing the behavior of SkPathMeasure to reflect changes in SkPath::Iter.Gravatar schenney@chromium.org2012-01-18
| | | | | | | | | | | This implementation modifies SkPath::Iter extensively to avoid copying the points when used to measure path length. BUG=446 TEST=tests/PathMeasureTest.cpp Review URL: https://codereview.appspot.com/5533074 git-svn-id: http://skia.googlecode.com/svn/trunk@3062 2bbb7eff-a529-9590-31e7-b0007b416f81
* automatically inject a moveTo if we see a close followed by a line/quad/cubicGravatar reed@google.com2012-01-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3027 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkPath::cheapComputeDirection() plus unittestsGravatar reed@google.com2012-01-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2996 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkPath::reverseAddPath()Gravatar reed@google.com2012-01-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2995 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add the ability to iterate through a path without modification. This change isGravatar schenney@chromium.org2012-01-04
| | | | | | | | | | required by WebKit SVG in order to correctly draw markers and endcaps. BUG=415 TEST=TestPath in the unit tests Review URL: http://codereview.appspot.com/5505097 git-svn-id: http://skia.googlecode.com/svn/trunk@2962 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix problems with SampleApp Fuzzer due to issues in iterating over ↵Gravatar schenney@chromium.org2011-12-29
| | | | | | | | | | | | | | degenerate paths. The fuzzer gets my vote as best test tool ever. There are several issues outstanding: crashes in FixedPoint and a crash in the path filling code that is most likely due to clipping problems (but maybe not). BUG=425 Review URL: http://codereview.appspot.com/5503080 git-svn-id: http://skia.googlecode.com/svn/trunk@2936 2bbb7eff-a529-9590-31e7-b0007b416f81
* Protecting changes to the SkPath iteration with an ifdef for Chromium.Gravatar schenney@chromium.org2011-12-21
| | | | | | | | Something is broken, and this will protect us while we sort it out. Unreviewed. git-svn-id: http://skia.googlecode.com/svn/trunk@2922 2bbb7eff-a529-9590-31e7-b0007b416f81
* Modifying SkPath to store all verbs provided by the user, and to giveGravatar schenney@chromium.org2011-12-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | correct results for all stroke and fill modes even on the various types of degenerate paths. The goals of this patch include: 1. Have Skia store all of the verbs implied by path construction methods, even if those define degenerate paths. The SVG implementation in WebKit, which is backed by Skia, needs to know about all elements of the path, even degenerate ones, for the correct drawing of markers and line caps. For example, in SVG you should be able to draw a scatter plot by specifying a marker for vertices and then giving a sequence of moveTo commands. Skia will not store the moveTos, requiring a different storage mechanism. 2. Assuming 1, maintain the current Skia behavior. That is, make Skia robust to degenerate paths. 3. Fix an existing bug in Skia where a degenerate moveTo-lineTo pair spits out warnings from rasterization and produces incorrect results in inverse-fill renderings. 4. Adds extensive testing for degenerate paths and path rendering in general. To meet these goals, the patch I am proposing will result in minor additional storage for degenerate paths (a few bytes per degenerate path, only if the user defines such paths). There is also some additional overhead in the iteration code, with the path now cleaned to remove degenerate segments as part of the iteration process. I suspect this will also fix issues with computing normal vectors to degenerate segments. Benchmarking suggests that this change may result in slightly (< 1%) slower path drawing due to the checks for degeneracy. This overhead could be removed (in fact, a significant speedup could occur) if the results of iterating to clean up the path were cached. This would cost memory, of course, and quite a bit of it. BUG=398 TEST=tests/PathTest.cpp gm/cubicpaths.cpp gm/degeneratesegments.cpp gm/movepaths.cpp gm/linepaths.cpp gm/quadpaths.cpp Review URL: http://codereview.appspot.com/5482051 git-svn-id: http://skia.googlecode.com/svn/trunk@2901 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update files to use SK_BUILD_FOR_ANDROID.Gravatar djsollen@google.com2011-11-08
| | | | | | | | This CL also removes any unecessary references to the ANDROID definition. Review URL: http://codereview.appspot.com/5354049 git-svn-id: http://skia.googlecode.com/svn/trunk@2629 2bbb7eff-a529-9590-31e7-b0007b416f81
* change getLastPt to return a boolGravatar reed@google.com2011-10-11
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2453 2bbb7eff-a529-9590-31e7-b0007b416f81
* add segment types query to SkPath (i.e. does it have any quads)Gravatar reed@google.com2011-09-21
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2292 2bbb7eff-a529-9590-31e7-b0007b416f81
* Automatic update of all copyright notices to reflect new license terms.Gravatar epoger@google.com2011-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have manually examined all of these diffs and restored a few files that seem to require manual adjustment. The following files still need to be modified manually, in a separate CL: android_sample/SampleApp/AndroidManifest.xml android_sample/SampleApp/res/layout/layout.xml android_sample/SampleApp/res/menu/sample.xml android_sample/SampleApp/res/values/strings.xml android_sample/SampleApp/src/com/skia/sampleapp/SampleApp.java android_sample/SampleApp/src/com/skia/sampleapp/SampleView.java experimental/CiCarbonSampleMain.c experimental/CocoaDebugger/main.m experimental/FileReaderApp/main.m experimental/SimpleCocoaApp/main.m experimental/iOSSampleApp/Shared/SkAlertPrompt.h experimental/iOSSampleApp/Shared/SkAlertPrompt.m experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig gpu/src/android/GrGLDefaultInterface_android.cpp gyp/common.gypi gyp_skia include/ports/SkHarfBuzzFont.h include/views/SkOSWindow_wxwidgets.h make.bat make.py src/opts/memset.arm.S src/opts/memset16_neon.S src/opts/memset32_neon.S src/opts/opts_check_arm.cpp src/ports/SkDebug_brew.cpp src/ports/SkMemory_brew.cpp src/ports/SkOSFile_brew.cpp src/ports/SkXMLParser_empty.cpp src/utils/ios/SkImageDecoder_iOS.mm src/utils/ios/SkOSFile_iOS.mm src/utils/ios/SkStream_NSData.mm tests/FillPathTest.cpp Review URL: http://codereview.appspot.com/4816058 git-svn-id: http://skia.googlecode.com/svn/trunk@1982 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix path iter returned pt on close, test path close pt in unit test.Gravatar bsalomon@google.com2011-07-13
| | | | | | | | Review URL: http://codereview.appspot.com/4715044/ git-svn-id: http://skia.googlecode.com/svn/trunk@1849 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove unused and untested SkPath::subdivide()Gravatar reed@google.com2011-06-28
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1732 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change getConvexity() to now compute it if the value is set to kUnkown.Gravatar reed@google.com2011-05-16
| | | | | | | | Change behavior for degenerate paths: now those return kConvex instead of kUnknown git-svn-id: http://skia.googlecode.com/svn/trunk@1330 2bbb7eff-a529-9590-31e7-b0007b416f81
* add Convexity enum to SkPathGravatar reed@google.com2011-05-15
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1324 2bbb7eff-a529-9590-31e7-b0007b416f81
* devolve flattening parameters to their base classesGravatar reed@google.com2011-04-25
| | | | | | | | e.g. FlattenableReadBufer -> Reader32 git-svn-id: http://skia.googlecode.com/svn/trunk@1174 2bbb7eff-a529-9590-31e7-b0007b416f81
* Upstream android changes.Gravatar djsollen@google.com2011-04-15
| | | | | | | reviewed by: reed git-svn-id: http://skia.googlecode.com/svn/trunk@1134 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add code needed to build skia as a windows dll within the chromium project.Gravatar ctguil@chromium.org2011-03-15
| | | | | | | | | - Export/import skia APIs if SKIA_DLL is defined. - This change has no effect on skia. Review URL: http://codereview.appspot.com/4282042 git-svn-id: http://skia.googlecode.com/svn/trunk@944 2bbb7eff-a529-9590-31e7-b0007b416f81
* add countPoints() and getPoint()Gravatar reed@android.com2010-02-09
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@494 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix winding bug in lineclipperGravatar reed@android.com2009-11-23
| | | | | | | | | expose path.dump() all the time UP arrow now toggles a grid of clip rects in sample app git-svn-id: http://skia.googlecode.com/svn/trunk@443 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix MSVC builds by avoiding a uint to bool warning.Gravatar deanm@chromium.org2009-06-18
| | | | | | | | | warning C4800: 'const uint8_t' : forcing value to bool 'true' or 'false' (performance warning) Review URL: http://codereview.appspot.com/79043 git-svn-id: http://skia.googlecode.com/svn/trunk@220 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkParsePath to go to/from SVG strings (e.g. "M0,0 L10,20")Gravatar reed@android.com2009-06-05
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@203 2bbb7eff-a529-9590-31e7-b0007b416f81
* add isConvex() hit to SkPath, to be used to speed up fills and openglGravatar reed@android.com2009-06-03
| | | | | | | | | | set linewidth in gldevice for hair rects remove some cruft from samples add more gl-unimpl messages git-svn-id: http://skia.googlecode.com/svn/trunk@199 2bbb7eff-a529-9590-31e7-b0007b416f81
* API change: SkPath computeBounds -> getBoundsGravatar reed@android.com2009-04-01
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@140 2bbb7eff-a529-9590-31e7-b0007b416f81
* add initial unittests for PathGravatar reed@android.com2009-03-02
| | | | | | | | | add operator== for paths still need to implement isRect! git-svn-id: http://skia.googlecode.com/svn/trunk@99 2bbb7eff-a529-9590-31e7-b0007b416f81
* grab from latest androidGravatar reed@android.com2008-12-17
git-svn-id: http://skia.googlecode.com/svn/trunk@27 2bbb7eff-a529-9590-31e7-b0007b416f81