-
Notifications
You must be signed in to change notification settings - Fork 147
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
region color #153
region color #153
Conversation
src/conv/k-g/region_list.cpp
Outdated
for (size_t i = 0; i < names.size(); i++) { | ||
mk_addmember(names[i].c_str(), &(geometry_head.l), NULL, WMOP_UNION); | ||
mk_addmember(names[i].c_str(), &(all_head.l), NULL, WMOP_UNION); | ||
} | ||
mk_lfcomb(wdbp, geometry.getBaseName(), &geometry_head, 0); | ||
|
||
mk_comb(wdbp, geometry.getBaseName(), &geometry_head.l, 1, (char*)NULL, (char*)NULL, rgb, ID_COMBINATION, 0, 0, 0, 0, 0, 0); |
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.
- Is this
(char*)
cast really necessary? - The id or region_id is usually a unique number of a region, and not related to ID_COMBINATION. The "default" would be an increasing integer.
- Why not
mk_lcomb()
?
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.
checking and will update.
src/conv/k-g/region_list.cpp
Outdated
mk_lfcomb(wdbp, geometry.getBaseName(), &geometry_head, 0); | ||
|
||
mk_lcomb(wdbp, geometry.getBaseName(), &geometry_head, 1, NULL, NULL, rgb, region_id); | ||
++region_id; |
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.
One more (new) thing 😈: Please, start the region IDs with 1. You can do this by writing ++region_id inside the mk_lcomb: mk_lcomb(wdbp, geometry.getBaseName(), &geometry_head, 1, NULL, NULL, rgb, ++region_id);
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.
sure, will update.
implementation of random coloring for the regions