Debian Codegraph @

pencil/include/geometry/geometry_h_align.h

raw
1 /* File: geometry_h_align.h; Copyright and License: see below */
2
3 #ifndef GEOMETRY_H_ALIGN_H
4 #define GEOMETRY_H_ALIGN_H
5
6 /* public file for the doxygen documentation: */
7 /*!
8 * \file
9 * \brief Defines the horizontal alignment of geometry objects
10 */
11
12 /*!
13 * \brief alignment constants of vertical alignment
14 *
15 */
16 enum geometry_h_align_enum {
17 GEOMETRY_H_ALIGN_LEFT, /*!< align the rectangle left with the left of the reference rect */
18 GEOMETRY_H_ALIGN_CENTER,
19 GEOMETRY_H_ALIGN_RIGHT, /*!< align the rectangle tight with the right of the reference rect */
20 };
21
22 typedef enum geometry_h_align_enum geometry_h_align_t;
23
24 /*!
25 * \brief gets the left coordinate of an aligned object
26 *
27 * \param this_ pointer to own object attributes
28 * \param width width of object to be aligned
29 * \param reference_left left coordinate of object to which to align to
30 * \param reference_width width of object to which to align to
31 * \return left coordinate of aligned object
32 */
33 static inline double geometry_h_align_get_left ( const geometry_h_align_t *this_,
34 double width,
35 double reference_left,
36 double reference_width
37 );
38
39 #include "geometry/geometry_h_align.inl"
40
41 #endif /* GEOMETRY_H_ALIGN_H */
42
43
44 /*
45 Copyright 2017-2026 Andreas Warnke
46
47 Licensed under the Apache License, Version 2.0 (the "License");
48 you may not use this file except in compliance with the License.
49 You may obtain a copy of the License at
50
51 http://www.apache.org/licenses/LICENSE-2.0
52
53 Unless required by applicable law or agreed to in writing, software
54 distributed under the License is distributed on an "AS IS" BASIS,
55 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
56 See the License for the specific language governing permissions and
57 limitations under the License.
58 */