Skip to content

Commit e54921d

Browse files
committed
Type cairo_text_extents_t in src/cairo-types.f90
1 parent d4eafbe commit e54921d

File tree

2 files changed

+31
-12
lines changed

2 files changed

+31
-12
lines changed

CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Changelog
22
All notable changes to the gtk-fortran project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
33

4+
## [cairo-fortran dev]
5+
6+
### Added
7+
- Type `cairo_text_extents_t` in `src/cairo-types.f90`.
8+
9+
410
## [cairo-fortran 1.1.0] 2023-06-02
511

612
### Added
@@ -15,4 +21,4 @@ All notable changes to the gtk-fortran project are documented in this file. The
1521

1622
## [cairo-fortran 1.0.0]
1723

18-
This repository was cloned in 2022 from a backup of the now unavailable @brocolis' repository, using the latest 5th September 2021 version.
24+
This repository was cloned in 2022 from a backup of the now unavailable @brocolis' repository, using the latest 5th September 2021 version.

src/cairo-types.f90

+24-11
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
1+
! Last modification: vmagnin, 2024-03-30
2+
3+
! The Cairo types are added by hand:
14
module cairo_types
2-
use iso_c_binding, only: c_double
3-
implicit none
4-
5-
type, bind(c) :: cairo_matrix_t
6-
real(c_double) :: xx
7-
real(c_double) :: yx
8-
real(c_double) :: xy
9-
real(c_double) :: yy
10-
real(c_double) :: x0
11-
real(c_double) :: y0
12-
end type
5+
use iso_c_binding, only: c_double
6+
implicit none
7+
8+
type, bind(c) :: cairo_matrix_t
9+
real(c_double) :: xx
10+
real(c_double) :: yx
11+
real(c_double) :: xy
12+
real(c_double) :: yy
13+
real(c_double) :: x0
14+
real(c_double) :: y0
15+
end type
16+
17+
! https://www.cairographics.org/manual/cairo-cairo-scaled-font-t.html#cairo-text-extents-t
18+
type, bind(c) :: cairo_text_extents_t
19+
real(c_double) :: x_bearing;
20+
real(c_double) :: y_bearing;
21+
real(c_double) :: width;
22+
real(c_double) :: height;
23+
real(c_double) :: x_advance;
24+
real(c_double) :: y_advance;
25+
end type
1326

1427
end module

0 commit comments

Comments
 (0)