|
FuncSketch
|
Declaration of functions for internal implementation of plotting. More...
#include <opencv2/core.hpp>#include "func_sketch/plotter/image.h"#include "func_sketch/plotter/plot_config.h"#include "func_sketch/plotter/plot_range.h"#include "func_sketch/plotter/point.h"#include "func_sketch/plotter/rgb_color.h"Go to the source code of this file.
Functions | |
| cv::Scalar | func_sketch::plotter::convert_color (const RGBColor &color) |
| Convert a color from RGBColor to cv::Scalar. | |
| cv::Point | func_sketch::plotter::convert_position (const Point &position, const PlotRange &range, const PlotConfig &config, int left_margin, const cv::MatSize &size) |
| Convert a position from plot coordinates to image coordinates. | |
| void | func_sketch::plotter::write_line (Image &image, const Point &start_point, const Point &end_point, const cv::Scalar &color, int line_width, const PlotRange &range, const PlotConfig &config, int left_margin) |
| Write a line on an image. | |
| bool | func_sketch::plotter::try_clamp_infinity (Point &point, const PlotRange &range) |
| Try to clamp a point with infinity to the range. | |
| Point | func_sketch::plotter::compute_intersection_with_range (const Point &point_in_range, const Point &point_out_of_range, const PlotRange &range) |
| Compute the intersection of a line segment with the boundary of the plot range. | |
Declaration of functions for internal implementation of plotting.
Definition in file plotting_util.h.
|
nodiscard |
Convert a color from RGBColor to cv::Scalar.
| [in] | color | Color to convert. |
Definition at line 32 of file plotting_util.cpp.
|
nodiscard |
Convert a position from plot coordinates to image coordinates.
| [in] | position | Position in plot coordinates. |
| [in] | range | Range of plots. |
| [in] | config | Configuration of plots. |
| [in] | left_margin | Left margin of plots in pixels. (This value is used over the value in config because tuning of the left margin is needed.) |
| [in] | size | Size of the image. |
Definition at line 37 of file plotting_util.cpp.
| void func_sketch::plotter::write_line | ( | Image & | image, |
| const Point & | start_point, | ||
| const Point & | end_point, | ||
| const cv::Scalar & | color, | ||
| int | line_width, | ||
| const PlotRange & | range, | ||
| const PlotConfig & | config, | ||
| int | left_margin ) |
Write a line on an image.
| [out] | image | Image to write on. |
| [in] | start_point | Starting point of the line. |
| [in] | end_point | Ending point of the line. |
| [in] | color | Color of the line. |
| [in] | line_width | Width of the line. |
| [in] | range | Range of plots. |
| [in] | config | Configuration of plots. |
| [in] | left_margin | Left margin of plots in pixels. (This value is used over the value in config because tuning of the left margin is needed.) |
Definition at line 101 of file plotting_util.cpp.
Try to clamp a point with infinity to the range.
| [in,out] | point | Point to clamp. |
| [in] | range | Range to clamp the point to. |
| true | The point was clamped or the point was finite. |
| false | The point could not be clamped because it was infinite in both coordinates. |
Definition at line 114 of file plotting_util.cpp.
|
nodiscard |
Compute the intersection of a line segment with the boundary of the plot range.
| [in] | point_in_range | Point inside the range. |
| [in] | point_out_of_range | Point outside the range. |
| [in] | range | Range of plots. |
Definition at line 161 of file plotting_util.cpp.