| 130 | } |
| 131 | |
| 132 | Rectangle 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 | |
| 150 | ReturnCode plot_set_background( |
| 151 | Context* ctx, |
no test coverage detected