6 module function lbl_get_cmd(this) result(x)
8 class(plot_label),
intent(in) :: this
9 character(len = :),
allocatable :: x
12 type(string_builder) :: str
17 pt = this%get_position()
20 if (this%get_is_visible())
then
21 call str%append(
'set label "')
22 call str%append(this%get_text())
25 call str%append(
" at ")
26 call str%append(to_string(pt(1)))
28 call str%append(to_string(pt(2)))
30 call str%append(to_string(pt(3)))
32 call str%append(
" rotate by ")
33 call str%append(to_string(this%get_angle()))
35 x = char(str%to_string())
40 pure module function lbl_get_is_visible(this) result(x)
41 class(plot_label),
intent(in) :: this
47 module subroutine lbl_set_is_visible(this, x)
48 class(plot_label),
intent(inout) :: this
49 logical,
intent(in) :: x
54 pure module function lbl_get_position(this) result(x)
55 class(plot_label),
intent(in) :: this
56 real(real32),
dimension(3) :: x
61 module subroutine lbl_set_position(this, x)
62 class(plot_label),
intent(inout) :: this
63 real(real32),
intent(in),
dimension(3) :: x
68 pure module function lbl_get_angle(this) result(x)
69 class(plot_label),
intent(in) :: this
75 module subroutine lbl_set_angle(this, x)
76 class(plot_label),
intent(inout) :: this
77 real(real32),
intent(in) :: x
82 module function lbl_get_txt(this) result(x)
83 class(plot_label),
intent(in) :: this
84 character(len = :),
allocatable :: x
89 module subroutine lbl_set_txt(this, x)
90 class(plot_label),
intent(inout) :: this
91 character(len = *),
intent(in) :: x
93 n = min(len(x), plotdata_max_name_length)
95 this%m_text(1:n) = x(1:n)
101 pure module subroutine lbl_assign(x, y)
102 type(plot_label),
intent(out) :: x
103 class(plot_label),
intent(in) :: y
104 x%m_visible = y%m_visible
105 x%m_position = y%m_position
106 x%m_angle = y%m_angle