diff --git a/doc/source/doxygen-docs/changelog.md b/doc/source/doxygen-docs/changelog.md index ad5c39f747..a913a1e766 100644 --- a/doc/source/doxygen-docs/changelog.md +++ b/doc/source/doxygen-docs/changelog.md @@ -1,7 +1,8 @@ \page changelog Change Log # Version 2.1.1: (Under development) -- (No changes yet) +- BUG FIXES: + - Fix wrong coloring of graph edges in mrpt::opengl::graph_visualize() (Closes [#1111](https://github.com/MRPT/mrpt/issues/1111)). ------ # Version 2.1.1: Released Oct 19th, 2020 diff --git a/libs/opengl/include/mrpt/opengl/graph_tools.h b/libs/opengl/include/mrpt/opengl/graph_tools.h index 5487a52c0a..266366c168 100644 --- a/libs/opengl/include/mrpt/opengl/graph_tools.h +++ b/libs/opengl/include/mrpt/opengl/graph_tools.h @@ -45,7 +45,7 @@ namespace graph_tools * | nodes_point_size | double | If set to !=0, draw a point of the given size (glPointSize) at each node. | 0.0 | * | nodes_corner_scale | double | If show_node_corners==true, the size (length) of the corner lines. | 0.7 | * | nodes_edges_corner_scale | double | If show_edge_rel_poses==true, the size of the corners at the end of each drawn edge | 0.4 | - * | nodes_point_color | int | If nodes_point_size>0, set this value to a hexadecimal int value 0xRRGGBB with the desired RGB+Alpha color of points. | 0xA0A0A0FF | + * | nodes_point_color | int | If nodes_point_size>0, set this value to a hexadecimal int value 0xRRGGBBAA with the desired RGB+Alpha color of points. | 0xA0A0A0FF | * | edge_color | int | If show_edges==true, the color of those edges as a hexadecimal int value 0xRRGGBBAA with RGB+Alpha color. | 0x0000FF40 | * | edge_rel_poses_color | int | If show_edge_rel_poses==true, the color of those edges as a hexadecimal int value 0xRRGGBBAA with RGB+Alpha color. | 0xFF800040 | * | edge_width | double | If show_edges==true, the width of edge lines. | 1 | diff --git a/libs/opengl/include/mrpt/opengl/graph_tools_impl.h b/libs/opengl/include/mrpt/opengl/graph_tools_impl.h index b4d86675e3..1d0794e04e 100644 --- a/libs/opengl/include/mrpt/opengl/graph_tools_impl.h +++ b/libs/opengl/include/mrpt/opengl/graph_tools_impl.h @@ -183,7 +183,7 @@ CSetOfObjects::Ptr graph_visualize( { CSetOfLines::Ptr gl_edges = std::make_shared(); const mrpt::img::TColor col8bit( - edge_color & 0xffffff, edge_color >> 24); + edge_color >> 8, edge_color & 0x000000ff); gl_edges->setColor_u8(col8bit); gl_edges->setLineWidth(edge_width);