-
-
Notifications
You must be signed in to change notification settings - Fork 859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
polyline with gradient #452
Conversation
f886cc6
to
0b72df1
Compare
..strokeWidth = polylineOpt.strokeWidth | ||
..strokeCap = StrokeCap.round | ||
..strokeJoin = StrokeJoin.round | ||
..blendMode = BlendMode.src; | ||
|
||
if (polylineOpt.gradientColors == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to also handle the isEmpty case
* master: (73 commits) 去掉不要的 Update CHANGELOG.md (fleaflet#511) Proj4dart update (fleaflet#541) Support custom CRS (fleaflet#529) docs(readme): add details about open street map provider (fleaflet#495) Wms support. (fleaflet#500) 0.8.2 release polyline with gradient (fleaflet#452) clean up from fleaflet#487 0.8.1 release Zoombutton plugin (fleaflet#487) dartfmt 0.8.0 release (Flutter 1.12) Use Wrap for marker_anchor sample Polygon culling (fleaflet#449) Tidyup (fleaflet#469) Update build files from fleaflet#478 upgrade flutter version, support Flutter 1.12 Update README.md (fleaflet#465) add opacity option to tile layers (fleaflet#453) ... # Conflicts: # example/android/app/build.gradle # example/android/app/src/debug/AndroidManifest.xml # example/android/app/src/main/AndroidManifest.xml # example/android/app/src/profile/AndroidManifest.xml # example/android/build.gradle # example/android/gradle.properties # example/ios/Runner.xcodeproj/project.pbxproj # example/lib/pages/home.dart # example/web/index.html # lib/flutter_map.dart # lib/src/geo/crs/crs.dart # lib/src/layer/overlay_image_layer.dart # lib/src/layer/tile_layer.dart # lib/src/layer/tile_provider/mbtiles_image_provider.dart # lib/src/map/flutter_map_state.dart # pubspec.yaml
@SebWojd Does this pr support using a gradient of only two colors over the whole line, instead of defining a color for every point? What does stop colors do? It is undocumented and not used in the example. |
@FilipeLarga This feature support as many colors as you wish. You have to play with gradientColors and colorsStop. I implemented here the standard way how Dart use linear gradient. Here you have a snippet:
and the result is: |
Add possibility to create polyline with gradient color.
closes #486