Show a patch.

GET /api/patches/513/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 513,
    "url": "https://patchwork.libcamera.org/api/patches/513/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/513/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20190205171010.1356-3-jacopo@jmondi.org>",
    "date": "2019-02-05T17:10:09",
    "name": "[libcamera-devel,2/3] libcamera: Add geometry.h",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "0110e93753aaad46bd954535e2d6add5ad86f3d4",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/513/mbox/",
    "series": [
        {
            "id": 169,
            "url": "https://patchwork.libcamera.org/api/series/169/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=169",
            "date": "2019-02-05T17:10:07",
            "name": "Add v4l2 subdevice",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/169/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/513/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/513/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net\n\t[217.70.183.193])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0CA0A60DBF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  5 Feb 2019 18:10:00 +0100 (CET)",
            "from uno.localdomain (d51A4137F.access.telenet.be [81.164.19.127])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay1-d.mail.gandi.net (Postfix) with ESMTPSA id B127A240010;\n\tTue,  5 Feb 2019 17:09:59 +0000 (UTC)"
        ],
        "X-Originating-IP": "81.164.19.127",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue,  5 Feb 2019 18:10:09 +0100",
        "Message-Id": "<20190205171010.1356-3-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20190205171010.1356-1-jacopo@jmondi.org>",
        "References": "<20190205171010.1356-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 2/3] libcamera: Add geometry.h",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.23",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "X-List-Received-Date": "Tue, 05 Feb 2019 17:10:00 -0000"
    },
    "content": "Add geometry related definitions in the geometry.h internal header\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/geometry.cpp       | 52 ++++++++++++++++++++++++++++++++\n src/libcamera/include/geometry.h | 23 ++++++++++++++\n src/libcamera/meson.build        |  1 +\n 3 files changed, 76 insertions(+)\n create mode 100644 src/libcamera/geometry.cpp\n create mode 100644 src/libcamera/include/geometry.h",
    "diff": "diff --git a/src/libcamera/geometry.cpp b/src/libcamera/geometry.cpp\nnew file mode 100644\nindex 0000000..2cc67e8\n--- /dev/null\n+++ b/src/libcamera/geometry.cpp\n@@ -0,0 +1,52 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2019, Google Inc.\n+ *\n+ * geometry.h - Geometry-related structures\n+ */\n+\n+#include \"geometry.h\"\n+\n+/**\n+ * \\file geometry.h\n+ * \\brief Structures and data related to geometric objects\n+ */\n+\n+namespace libcamera {\n+\n+/**\n+ * \\struct Rectangle\n+ * \\brief Defines a rectangle sizes and position\n+ *\n+ * Rectangles are used to identify an area of an image, or of a memory area\n+ * than contains one. Their location is identified by the coordinates of their\n+ * leftmost and topmost corner, and their horizontal and vertical length.\n+ *\n+ * The measure unit of the rectangle sizes is defined by the context where the\n+ * rectangle is used.\n+ *\n+ * The reference point from which the Rectangle::x and Rectangle::y\n+ * displacements refers to is defined by the context were rectangle is used.\n+ */\n+\n+/**\n+ * \\var Rectangle::x\n+ * \\brief The horizontal displacement of the rectangle's leftmost corner\n+ */\n+\n+/**\n+ * \\var Rectangle::y\n+ * \\brief The vertical displacement of the rectangle's topmost corner\n+ */\n+\n+/**\n+ * \\var Rectangle::w\n+ * \\brief The distance between the leftmost and rightmost corners\n+ */\n+\n+/**\n+ * \\var Rectangle::h\n+ * \\brief The distance between the topmost and bottommost corners\n+ */\n+\n+} /* namespace libcamera */\ndiff --git a/src/libcamera/include/geometry.h b/src/libcamera/include/geometry.h\nnew file mode 100644\nindex 0000000..b147c9a\n--- /dev/null\n+++ b/src/libcamera/include/geometry.h\n@@ -0,0 +1,23 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2019, Google Inc.\n+ *\n+ * geometry.h - Geometry-related structure\n+ */\n+\n+#ifndef __LIBCAMERA_GEOMETRY_H__\n+#define __LIBCAMERA_GEOMETRY_H__\n+\n+namespace libcamera {\n+\n+struct Rectangle\n+{\n+\tint x;\n+\tint y;\n+\tunsigned int w;\n+\tunsigned int h;\n+};\n+\n+} /* namespace libcamera */\n+\n+#endif /* __LIBCAMERA_GEOMETRY_H__ */\ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex 9f6ff99..3d6df2d 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -5,6 +5,7 @@ libcamera_sources = files([\n     'event_dispatcher.cpp',\n     'event_dispatcher_poll.cpp',\n     'event_notifier.cpp',\n+    'geometry.cpp',\n     'log.cpp',\n     'media_device.cpp',\n     'media_object.cpp',\n",
    "prefixes": [
        "libcamera-devel",
        "2/3"
    ]
}