Skip to content

Commit

Permalink
made all font and marker sizes float (used to be int)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlivesu committed Jan 5, 2024
1 parent 13a69f9 commit b7849cc
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 25 deletions.
8 changes: 4 additions & 4 deletions include/cinolib/gl/glcanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ CINO_INLINE
void GLcanvas::push_marker(const vec2d & p,
const std::string & text,
const Color color,
const uint disk_radius,
const uint font_size)
const float disk_radius,
const float font_size)
{
Marker m;
m.pos_2d = p;
Expand All @@ -183,8 +183,8 @@ CINO_INLINE
void GLcanvas::push_marker(const vec3d & p,
const std::string & text,
const Color color,
const uint disk_radius,
const uint font_size)
const float disk_radius,
const float font_size)
{
Marker m;
m.pos_3d = p;
Expand Down
14 changes: 7 additions & 7 deletions include/cinolib/gl/glcanvas.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ struct Marker
vec3d pos_3d = vec3d(inf_double); // used to position a 3D marker IFF pos_2d is INF
std::string text = ""; // text to render. Set to the empty string to not render the text
Color color = Color::BLUE(); // color, for both the text and the disk
uint disk_radius = 1; // disk radius (in pixels). Set to zero to not render the disk
uint font_size = 12; // font size;
float disk_radius = 3.f; // disk radius. Set to zero to not render the disk
float font_size = 10.f; // font size;
};

//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Expand All @@ -83,7 +83,7 @@ class GLcanvas
bool show_side_bar = false;
float side_bar_width = 0.2f;
float side_bar_alpha = 1.f;
int font_size = 13;
float font_size = 13.f;
bool show_axis = false;
bool depth_cull_markers = true; // skip occluded 3D markers, testing their depth with the Z-buffer
double DPI_factor;
Expand Down Expand Up @@ -145,14 +145,14 @@ class GLcanvas
void push_marker(const vec2d & p,
const std::string & text = "",
const Color color = Color::BLUE(),
const uint disk_radius = 5,
const uint font_size = 10);
const float disk_radius = 3.f,
const float font_size = 10.f);

void push_marker(const vec3d & p,
const std::string & text = "",
const Color color = Color::BLUE(),
const uint disk_radius = 5,
const uint font_size = 10);
const float disk_radius = 3.f,
const float font_size = 10.f);

//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Expand Down
10 changes: 5 additions & 5 deletions include/cinolib/gl/surface_mesh_controls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,11 +516,11 @@ void SurfaceMeshControls<Mesh>::header_debug(const bool open)
gui->pop(&poly_normals);
}
}
if(ImGui::Checkbox("Show Vert IDs", &show_vert_ids) ||
ImGui::Checkbox("Show Poly IDs", &show_poly_ids) ||
ImGui::Checkbox("Depth Cull IDs", &gui->depth_cull_markers) ||
ImGui::SliderInt("Font", &marker_font_size, 1, 15) ||
ImGui::SliderInt("Disk", &marker_size, 0,10) ||
if(ImGui::Checkbox("Show Vert IDs", &show_vert_ids) ||
ImGui::Checkbox("Show Poly IDs", &show_poly_ids) ||
ImGui::Checkbox("Depth Cull IDs", &gui->depth_cull_markers) ||
ImGui::SliderFloat("Font", &marker_font_size, 0.f, 15.f) ||
ImGui::SliderFloat("Disk", &marker_size, 0.f,10.f) ||
ImGui::ColorEdit4("Vert Color", vert_debug_color.rgba, color_edit_flags) ||
ImGui::ColorEdit4("Poly Color", poly_debug_color.rgba, color_edit_flags))
{
Expand Down
4 changes: 2 additions & 2 deletions include/cinolib/gl/surface_mesh_controls.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ class SurfaceMeshControls : public SideBarItem
float iso_min = 0.f;
float iso_max = 1.f;
int crease_deg = 60;
int marker_font_size = 10;
int marker_size = 5;
float marker_font_size = 10.f;
float marker_size = 3.f;
bool show_vert_ids = false;
bool show_poly_ids = false;
Color vert_color = Color::WHITE();
Expand Down
10 changes: 5 additions & 5 deletions include/cinolib/gl/volume_mesh_controls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -747,11 +747,11 @@ void VolumeMeshControls<Mesh>::header_debug(const bool open)
gui->pop(&face_normals);
}
}
if(ImGui::Checkbox("Show Vert IDs", &show_vert_ids) ||
ImGui::Checkbox("Show Face IDs", &show_face_ids) ||
ImGui::Checkbox("Depth Cull IDs", &gui->depth_cull_markers) ||
ImGui::SliderInt("Font", &marker_font_size, 1, 15) ||
ImGui::SliderInt("Disk", &marker_size, 0,10) ||
if(ImGui::Checkbox("Show Vert IDs", &show_vert_ids) ||
ImGui::Checkbox("Show Face IDs", &show_face_ids) ||
ImGui::Checkbox("Depth Cull IDs", &gui->depth_cull_markers) ||
ImGui::SliderFloat("Font", &marker_font_size, 0.f, 15.f) ||
ImGui::SliderFloat("Disk", &marker_size, 0.f,10.f) ||
ImGui::ColorEdit4("Vert Color", vert_debug_color.rgba, color_edit_flags) ||
ImGui::ColorEdit4("Face Color", face_debug_color.rgba, color_edit_flags))
{
Expand Down
4 changes: 2 additions & 2 deletions include/cinolib/gl/volume_mesh_controls.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ class VolumeMeshControls : public SideBarItem
float iso_min = 0.f;
float iso_max = 1.f;
int crease_deg = 60;
int marker_font_size = 10;
int marker_size = 5;
float marker_font_size = 10.f;
float marker_size = 5.f;
int dig_choice = RESET;
bool show_vert_ids = false;
bool show_face_ids = false;
Expand Down

0 comments on commit b7849cc

Please sign in to comment.