{"id":526,"url":"https://patchwork.libcamera.org/api/patches/526/?format=json","web_url":"https://patchwork.libcamera.org/patch/526/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20190206060818.13907-12-laurent.pinchart@ideasonboard.com>","date":"2019-02-06T06:08:02","name":"[libcamera-devel,11/27] libcamera: Add geometry.h","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"91920fb89ab1e772a814a5d164568cbce6f3fbfa","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/526/mbox/","series":[{"id":170,"url":"https://patchwork.libcamera.org/api/series/170/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=170","date":"2019-02-06T06:07:51","name":"Capture frames throught requests","version":1,"mbox":"https://patchwork.libcamera.org/series/170/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/526/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/526/checks/","tags":{},"headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EFD926101F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Feb 2019 07:08:25 +0100 (CET)","from pendragon.ideasonboard.com (d51A4137F.access.telenet.be\n\t[81.164.19.127])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9C4F341\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Feb 2019 07:08:25 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1549433305;\n\tbh=Ecz3XcRZGXvyn6AFi52ZSkpjWh6Zs/6I0DMJ3zuS4lg=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=GCsql1FE2yay0tNY8aKXuOqqfj6YNkXWEESPwn4LnbOPzKQZASqA3AmhNebAwtxMR\n\tEhExYr/iSISvrNR0wV0Is/1kmbHAvsvdVzxz+0jKnq+RjVa6wrqap5ZS+DA53faYvN\n\t+UZ6bKygoBi4ug1rI/5WcspWPeuiSY3run2riyyY=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Wed,  6 Feb 2019 08:08:02 +0200","Message-Id":"<20190206060818.13907-12-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.19.2","In-Reply-To":"<20190206060818.13907-1-laurent.pinchart@ideasonboard.com>","References":"<20190206060818.13907-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 11/27] 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":"Wed, 06 Feb 2019 06:08:27 -0000"},"content":"From: Jacopo Mondi <jacopo@jmondi.org>\n\nAdd geometry-related definitions in the geometry.h internal header.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/geometry.cpp       | 49 ++++++++++++++++++++++++++++++++\n src/libcamera/include/geometry.h | 22 ++++++++++++++\n src/libcamera/meson.build        |  1 +\n 3 files changed, 72 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 000000000000..57f4fc7716d9\n--- /dev/null\n+++ b/src/libcamera/geometry.cpp\n@@ -0,0 +1,49 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2019, Google Inc.\n+ *\n+ * geometry.cpp - Geometry-related structures\n+ */\n+\n+#include \"geometry.h\"\n+\n+/**\n+ * \\file geometry.h\n+ * \\brief Data structures related to geometric objects\n+ */\n+\n+namespace libcamera {\n+\n+/**\n+ * \\struct Rectangle\n+ * \\brief Describe a rectangle's position and dimensions\n+ *\n+ * Rectangles are used to identify an area of an image. They are specified by\n+ * the coordinates of top-left corner and their horizontal and vertical size.\n+ *\n+ * The measure unit of the rectangle coordinates and size, as well as the\n+ * reference point from which the Rectangle::x and Rectangle::y displacements\n+ * refers to, are defined by the context were rectangle is used.\n+ */\n+\n+/**\n+ * \\var Rectangle::x\n+ * \\brief The horizontal coordinate of the rectangle's top-left corner\n+ */\n+\n+/**\n+ * \\var Rectangle::y\n+ * \\brief The vertical coordinate of the rectangle's top-left corner\n+ */\n+\n+/**\n+ * \\var Rectangle::w\n+ * \\brief The distance between the left and right sides\n+ */\n+\n+/**\n+ * \\var Rectangle::h\n+ * \\brief The distance between the top and bottom sides\n+ */\n+\n+} /* namespace libcamera */\ndiff --git a/src/libcamera/include/geometry.h b/src/libcamera/include/geometry.h\nnew file mode 100644\nindex 000000000000..cc146da7cb0d\n--- /dev/null\n+++ b/src/libcamera/include/geometry.h\n@@ -0,0 +1,22 @@\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+\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 a4e9cc8f936c..8b33c4b25c30 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -6,6 +6,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","11/27"]}