MCPcopy Create free account
hub / github.com/asmuth/clip / plot_axes

Function plot_axes

src/plot/axis.cc:828–1325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

826}
827
828ReturnCode plot_axes(Context* ctx, PlotConfig* plot, const Expr* expr) {
829 std::array<Measure, 4> margins = {from_em(1), from_em(1), from_em(1), from_em(1)};
830 std::array<AxisDefinition, 4> axes;
831
832 axes[0].scale = plot->scale_x;
833 axes[0].align = AxisAlign::TOP;
834 axes[0].label_attach = AxisLabelAttach::BOTTOM;
835 axes[0].title_offset = 1;
836 axes[0].tick_offset = -1;
837 axes[0].label_offset = 1;
838 axes[0].label_font = layer_get_font(ctx);
839 axes[0].label_font_size = layer_get_font_size(ctx);
840 axes[0].label_color = layer_get(ctx)->text_color;
841 axes[0].title_font = layer_get_font(ctx);
842 axes[0].title_font_size = layer_get_font_size(ctx);
843 axes[0].title_color = layer_get(ctx)->text_color;
844 axes[0].border_style.line_width = from_pt(1);
845 axes[0].border_style.color = layer_get(ctx)->foreground_color;
846
847 axes[1].scale = plot->scale_y;
848 axes[1].align = AxisAlign::RIGHT;
849 axes[1].label_attach = AxisLabelAttach::LEFT;
850 axes[1].title_offset = 1;
851 axes[1].title_rotate = -90;
852 axes[1].tick_offset = -1;
853 axes[1].label_offset = 1;
854 axes[1].label_font = layer_get_font(ctx);
855 axes[1].label_font_size = layer_get_font_size(ctx);
856 axes[1].label_color = layer_get(ctx)->text_color;
857 axes[1].title_font = layer_get_font(ctx);
858 axes[1].title_font_size = layer_get_font_size(ctx);
859 axes[1].title_color = layer_get(ctx)->text_color;
860 axes[1].border_style.line_width = from_pt(1);
861 axes[1].border_style.color = layer_get(ctx)->foreground_color;
862
863 axes[2].scale = plot->scale_x;
864 axes[2].align = AxisAlign::BOTTOM;
865 axes[2].label_attach = AxisLabelAttach::TOP;
866 axes[2].title_offset = -1;
867 axes[2].tick_offset = 1;
868 axes[2].label_offset = -1;
869 axes[2].label_font = layer_get_font(ctx);
870 axes[2].label_font_size = layer_get_font_size(ctx);
871 axes[2].label_color = layer_get(ctx)->text_color;
872 axes[2].title_font = layer_get_font(ctx);
873 axes[2].title_font_size = layer_get_font_size(ctx);
874 axes[2].title_color = layer_get(ctx)->text_color;
875 axes[2].border_style.line_width = from_pt(1);
876 axes[2].border_style.color = layer_get(ctx)->foreground_color;
877
878 axes[3].scale = plot->scale_y;
879 axes[3].align = AxisAlign::LEFT;
880 axes[3].label_attach = AxisLabelAttach::RIGHT;
881 axes[3].title_offset = -1;
882 axes[3].title_rotate = -90;
883 axes[3].tick_offset = 1;
884 axes[3].label_offset = -1;
885 axes[3].label_font = layer_get_font(ctx);

Callers

nothing calls this directly

Calls 15

from_emFunction · 0.85
layer_get_font_sizeFunction · 0.85
layer_getFunction · 0.85
from_ptFunction · 0.85
expr_walk_map_wrappedFunction · 0.85
expr_calln_fnFunction · 0.85
expr_call_string_fnFunction · 0.85
convert_unit_typographicFunction · 0.85
layer_get_dpiFunction · 0.85
layer_get_remFunction · 0.85
axis_prepareFunction · 0.85
axis_layoutFunction · 0.85

Tested by

no test coverage detected