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

Function plot_get_clip

src/plot/plotgen.cc:132–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132Rectangle plot_get_clip(const PlotConfig* plot, const Layer* layer) {
133 if (plot->layout_stack.empty()) {
134 auto margins = plot->margins;
135 for (auto& m : margins) {
136 convert_unit_typographic(layer->dpi, layer_get_rem(layer), &m);
137 }
138
139 return layout_margin_box(
140 Rectangle(0, 0, layer->width, layer->height),
141 margins[0],
142 margins[1],
143 margins[2],
144 margins[3]);
145 } else {
146 return plot->layout_stack.back();
147 }
148}
149
150ReturnCode plot_set_background(
151 Context* ctx,

Callers 15

rectangles_drawFunction · 0.85
lines_drawFunction · 0.85
areas_draw_horizontalFunction · 0.85
areas_draw_verticalFunction · 0.85
bars_draw_horizontalFunction · 0.85
bars_draw_verticalFunction · 0.85
polygons_drawFunction · 0.85
plot_set_backgroundFunction · 0.85
plot_gridFunction · 0.85
plot_axisFunction · 0.85
plot_axesFunction · 0.85
errorbars_drawFunction · 0.85

Calls 5

convert_unit_typographicFunction · 0.85
layer_get_remFunction · 0.85
layout_margin_boxFunction · 0.85
emptyMethod · 0.80
RectangleClass · 0.50

Tested by

no test coverage detected