[drape] Draw embankments. #2738

Merged
vng merged 3 commits from vng-dev into master 2022-06-15 16:12:44 +00:00
vng commented 2022-06-14 14:24:03 +00:00 (Migrated from github.com)
Screenshot 2022-06-14 at 17 22 00
<img width="954" alt="Screenshot 2022-06-14 at 17 22 00" src="https://user-images.githubusercontent.com/175612/173601413-f3dcd5ac-c131-4210-820e-78f769fc3c00.png">
pastk reviewed 2022-06-14 16:58:23 +00:00
@ -701,23 +701,25 @@ line|z18-[barrier=hedge],
line|z18-[barrier=retaining_wall],
line|z18-[barrier=wall],
line|z18-[historic=citywalls],

please add a comment explaining meaning of dashes: 6,4,4,2;
so that others can use the feature for other objects later

please add a comment explaining meaning of `dashes: 6,4,4,2;` so that others can use the feature for other objects later
pastk reviewed 2022-06-14 16:58:42 +00:00
@ -701,23 +701,25 @@ line|z18-[barrier=hedge],
line|z18-[barrier=retaining_wall],
line|z18-[barrier=wall],
line|z18-[historic=citywalls],

also would be great to make it dark-brown :)

also would be great to make it dark-brown :)
biodranik (Migrated from github.com) approved these changes 2022-06-15 06:13:58 +00:00
@ -701,23 +701,25 @@ line|z18-[barrier=hedge],
line|z18-[barrier=retaining_wall],
line|z18-[barrier=wall],
line|z18-[historic=citywalls],
biodranik (Migrated from github.com) commented 2022-06-14 20:49:26 +00:00

Как забор красить точно не нужно.

Как забор красить точно не нужно.
@ -15,3 +14,3 @@
uint32_t const kStippleHeight = 1;
uint32_t const kMaxStipplePenLength = 512; /// @todo Should be equal with kStippleTextureWidth?
StipplePenPacker::StipplePenPacker(m2::PointU const & canvasSize)
biodranik (Migrated from github.com) commented 2022-06-14 16:00:44 +00:00

Так сразу пропиши equal.

Так сразу пропиши equal.
@ -39,2 +41,4 @@
// Reserved for elements like RuleDrawer or other LineShapes.
uint32_t const kReservedPatterns = 0;
size_t const kReservedColors = 20;
biodranik (Migrated from github.com) commented 2022-06-14 20:54:19 +00:00

Если сомневаешься, сделай сразу равной kMaxStipplePenLength, и оставь туду.

Если сомневаешься, сделай сразу равной kMaxStipplePenLength, и оставь туду.
biodranik (Migrated from github.com) commented 2022-06-14 21:03:37 +00:00

Тут на && или ниже на empace бы не ускорили чуток инициализацию?

Тут на && или ниже на empace бы не ускорили чуток инициализацию?
biodranik (Migrated from github.com) commented 2022-06-15 06:13:10 +00:00

Нехорошо, может метод неконстантным сделать? А то неочевидно что у конст объекта что-то меняется.

Нехорошо, может метод неконстантным сделать? А то неочевидно что у конст объекта что-то меняется.
vng (Migrated from github.com) reviewed 2022-06-15 06:39:03 +00:00
@ -15,3 +14,3 @@
uint32_t const kStippleHeight = 1;
uint32_t const kMaxStipplePenLength = 512; /// @todo Should be equal with kStippleTextureWidth?
StipplePenPacker::StipplePenPacker(m2::PointU const & canvasSize)
vng (Migrated from github.com) commented 2022-06-15 06:39:03 +00:00

Они сейчас equal, я оставляю вопрос, т.к. кажется что константы одной природы, но не уверен.

Они сейчас equal, я оставляю вопрос, т.к. кажется что константы одной природы, но не уверен.
vng (Migrated from github.com) reviewed 2022-06-15 06:39:25 +00:00
@ -39,2 +41,4 @@
// Reserved for elements like RuleDrawer or other LineShapes.
uint32_t const kReservedPatterns = 0;
size_t const kReservedColors = 20;
vng (Migrated from github.com) commented 2022-06-15 06:39:25 +00:00

Они равны, тут вопрос

Они равны, тут вопрос
vng (Migrated from github.com) reviewed 2022-06-15 06:39:48 +00:00
vng (Migrated from github.com) commented 2022-06-15 06:39:48 +00:00

нет

нет
vng (Migrated from github.com) reviewed 2022-06-15 06:40:02 +00:00
vng (Migrated from github.com) commented 2022-06-15 06:40:02 +00:00

я наверное уберу этот хак

я наверное уберу этот хак
vng commented 2022-06-15 06:41:14 +00:00 (Migrated from github.com)

Как красить embankment? Вот я смотрел в вики ОСМ, везде серый цвет.
https://wiki.openstreetmap.org/wiki/File:Natural_cliff-125.png
https://wiki.openstreetmap.org/wiki/File:Man_made_embankment.png

Как красить embankment? Вот я смотрел в вики ОСМ, везде серый цвет. https://wiki.openstreetmap.org/wiki/File:Natural_cliff-125.png https://wiki.openstreetmap.org/wiki/File:Man_made_embankment.png
vng commented 2022-06-15 08:20:24 +00:00 (Migrated from github.com)

Second screen with embankment like path color:
Screenshot 2022-06-15 at 11 19 37

Second screen with embankment like path color: <img width="1416" alt="Screenshot 2022-06-15 at 11 19 37" src="https://user-images.githubusercontent.com/175612/173779008-2068733e-d874-4e99-87b5-52362aa83bc4.png">
vng commented 2022-06-15 14:00:57 +00:00 (Migrated from github.com)

Latest version:
Screenshot 2022-06-15 at 17 00 06

Latest version: <img width="1152" alt="Screenshot 2022-06-15 at 17 00 06" src="https://user-images.githubusercontent.com/175612/173846206-6b936f1d-b16e-4d0f-aa42-9411eb65f3c0.png">
pastk reviewed 2022-06-15 14:18:53 +00:00

Its not clear how "base height" is different from the thickness of the line (dash)...

Does the renderer really make breaks between the "dashes" to fit triangles into instead of just overlaying them?

I imagined it looks more like

================= - a line
    \/     \/     - triangles
Its not clear how "base height" is different from the thickness of the line (dash)... Does the renderer really make breaks between the "dashes" to fit triangles into instead of just overlaying them? I imagined it looks more like ``` ================= - a line \/ \/ - triangles ```
vng (Migrated from github.com) reviewed 2022-06-15 14:22:12 +00:00
vng (Migrated from github.com) commented 2022-06-15 14:22:11 +00:00

base height is the thickness of the dash line

base height is the thickness of the dash line
pastk reviewed 2022-06-15 14:56:23 +00:00

whys is it different from width: 7.0; then? (base height is just 2)

whys is it different from `width: 7.0;` then? (base height is just 2)
vng (Migrated from github.com) reviewed 2022-06-15 15:14:21 +00:00
vng (Migrated from github.com) commented 2022-06-15 15:14:20 +00:00

"width" is a total pattern height = 5 + 2

"width" is a total pattern height = 5 + 2
pastk reviewed 2022-06-15 16:24:56 +00:00

Ok, thanks, I understand now - could you please add it to the comment?

Also what (bad) will happen if width and base height + triangle height are inconsistent? Maybe its possible not to have an extra parameter if it could be derived from other params?

Is it technically hard to make it (imho) more logical like
width - line width w/o triangles
dashes: dash-length, pattern-base-width, pattern-height
?

(also I don't really like overloading the dashes: with something that doesn't look like a dashed line, but maybe its too much to ask)

Ok, thanks, I understand now - could you please add it to the comment? Also what (bad) will happen if `width` and `base height + triangle height` are inconsistent? Maybe its possible not to have an extra parameter if it could be derived from other params? Is it technically hard to make it (imho) more logical like `width` - line width w/o triangles `dashes: dash-length, pattern-base-width, pattern-height` ? (also I don't really like overloading the `dashes:` with something that doesn't look like a dashed line, but maybe its too much to ask)
vng (Migrated from github.com) reviewed 2022-06-15 16:37:36 +00:00
vng (Migrated from github.com) commented 2022-06-15 16:37:36 +00:00

Yes, this is not about "dashes" pattern, but it was the optimal way to implement at this moment.
Will reconsider style definitions, when "pattern" line drawing will be more varied and complicated.

Yes, this is not about "dashes" pattern, but it was the optimal way to implement at this moment. Will reconsider style definitions, when "pattern" line drawing will be more varied and complicated.
This repo is archived. You cannot comment on pull requests.
No reviewers
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
2 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: organicmaps/organicmaps-tmp#2738
No description provided.