280e31bdf7f5ffd28f8b14565c1d93de4070bd0cJucaBlues * Copyright (C) 2011-2013 Intel Corporation
280e31bdf7f5ffd28f8b14565c1d93de4070bd0cJucaBlues * Permission is hereby granted, free of charge, to any person obtaining a
280e31bdf7f5ffd28f8b14565c1d93de4070bd0cJucaBlues * copy of this software and associated documentation files (the "Software"),
280e31bdf7f5ffd28f8b14565c1d93de4070bd0cJucaBlues * to deal in the Software without restriction, including without limitation
280e31bdf7f5ffd28f8b14565c1d93de4070bd0cJucaBlues * the rights to use, copy, modify, merge, publish, distribute, sublicense,
99c0082d40f9a2adf5108336c0d3dd087d1c7b66Johan B. C. Engelen * and/or sell copies of the Software, and to permit persons to whom the
280e31bdf7f5ffd28f8b14565c1d93de4070bd0cJucaBlues * Software is furnished to do so, subject to the following conditions:
b9e7ae4e6bc84d770daddde98d486686bdb123c7Johan B. C. Engelen * The above copyright notice and this permission notice (including the next
b9e7ae4e6bc84d770daddde98d486686bdb123c7Johan B. C. Engelen * paragraph) shall be included in all copies or substantial portions of the
b9e7ae4e6bc84d770daddde98d486686bdb123c7Johan B. C. Engelen * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
280e31bdf7f5ffd28f8b14565c1d93de4070bd0cJucaBlues * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
280e31bdf7f5ffd28f8b14565c1d93de4070bd0cJucaBlues * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
280e31bdf7f5ffd28f8b14565c1d93de4070bd0cJucaBlues * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
d6e289e892dd8c5f7c69425fe2722eb3fae4f48cKris * DOC: rect utils
d6e289e892dd8c5f7c69425fe2722eb3fae4f48cKris * Utility functions to help manage rectangular areas for
d6e289e892dd8c5f7c69425fe2722eb3fae4f48cKris * clipping, scaling, etc. calculations.
d6e289e892dd8c5f7c69425fe2722eb3fae4f48cKris * struct drm_rect - two dimensional rectangle
280e31bdf7f5ffd28f8b14565c1d93de4070bd0cJucaBlues * @x1: horizontal starting coordinate (inclusive)
280e31bdf7f5ffd28f8b14565c1d93de4070bd0cJucaBlues * @x2: horizontal ending coordinate (exclusive)
280e31bdf7f5ffd28f8b14565c1d93de4070bd0cJucaBlues * @y1: vertical starting coordinate (inclusive)
280e31bdf7f5ffd28f8b14565c1d93de4070bd0cJucaBlues * @y2: vertical ending coordinate (exclusive)
280e31bdf7f5ffd28f8b14565c1d93de4070bd0cJucaBlues * drm_rect_adjust_size - adjust the size of the rectangle
280e31bdf7f5ffd28f8b14565c1d93de4070bd0cJucaBlues * @r: rectangle to be adjusted
280e31bdf7f5ffd28f8b14565c1d93de4070bd0cJucaBlues * @dw: horizontal adjustment
280e31bdf7f5ffd28f8b14565c1d93de4070bd0cJucaBlues * @dh: vertical adjustment
280e31bdf7f5ffd28f8b14565c1d93de4070bd0cJucaBlues * Change the size of rectangle @r by @dw in the horizontal direction,
280e31bdf7f5ffd28f8b14565c1d93de4070bd0cJucaBlues * and by @dh in the vertical direction, while keeping the center
280e31bdf7f5ffd28f8b14565c1d93de4070bd0cJucaBlues * of @r stationary.
280e31bdf7f5ffd28f8b14565c1d93de4070bd0cJucaBlues * Positive @dw and @dh increase the size, negative values decrease it.
280e31bdf7f5ffd28f8b14565c1d93de4070bd0cJucaBluesstatic inline void drm_rect_adjust_size(struct drm_rect *r, int dw, int dh)