Skip to content
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

Polygon: possible display with drawLines #1458

Closed
monsieurtanuki opened this issue Dec 22, 2019 · 1 comment
Closed

Polygon: possible display with drawLines #1458

monsieurtanuki opened this issue Dec 22, 2019 · 1 comment
Assignees

Comments

@monsieurtanuki
Copy link
Collaborator

@monsieurtanuki monsieurtanuki commented Dec 22, 2019

Issue Type

  • Improvement
  • Performance

Description and/or steps/code to reproduce the problem

For Polylines display, we can say if we want to use Canvas.drawLines (which is faster) or Canvas.drawPath (which is slower, but has added features).
For instance, if you want to draw with an "alpha-ed" Paint, it will look perfect with drawPath, but not nice with drawLines where some vertices will have several times the same "alpha-ed" Paint, therefore will look darker.

For Polygons, we systematically use Canvas.drawPath.

We should be able to decide to use drawLines for Polygons, if we want a faster display and if we don't use Path specific features like fill paint or holes.

Should be done after #1409.

Environment

6.1.4

@monsieurtanuki monsieurtanuki self-assigned this Dec 22, 2019
monsieurtanuki added a commit that referenced this issue Jan 12, 2020
Impacted classes:
* `CustomPaintingSurface`: now using the new `PolyOverlayWithIW.usePath(boolean)` method for the "Polyline as Path" demo
* `Polygon`: moved methods `contains` and `onSingleTapConfirmed` to `PolyOverlayWithIW`; implements new method `PolyOverlayWithIW.click(MapView,GeoPoint)`
* `Polyline`: removed erroneous member `mDensity`; moved member `mDensityMultiplier` (with setter) and methods `isCloseTo`, `getCloseTo` and `onSingleTapConfirmed` to `PolyOverlayWithIW`; implements new method `PolyOverlayWithIW.click(MapView,GeoPoint)`
* `PolyOverlayWithIW`: new abstract method `PolyOverlayWithIW.click(MapView,GeoPoint)`; created method `usePath(boolean)` in order to set the path mode even after the addition of GeoPoints; moved methods from `Polygon` and `Polyline`
monsieurtanuki added a commit that referenced this issue Jan 13, 2020
feature/#1458 - new method `PolyOverlayWithIW.usePath`
@monsieurtanuki

This comment has been minimized.

Copy link
Collaborator Author

@monsieurtanuki monsieurtanuki commented Jan 13, 2020

Done in #1483.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.