libelec
A general purpose library of utility functions designed to make it easier to develop addons for the X-Plane flight simulator.
libelec_vis.h
Go to the documentation of this file.
1 /*
2  * This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this
4  * file, You can obtain one at https://mozilla.org/MPL/2.0/.
5  */
6 /*
7  * Copyright 2023 Saso Kiselkov. All rights reserved.
8  */
33 #ifndef __LIBELEC_VIS_H__
34 #define __LIBELEC_VIS_H__
35 
36 #include <stdbool.h>
37 
38 #include <acfutils/mt_cairo_render.h>
39 
40 #include "libelec.h"
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 typedef struct libelec_vis_s libelec_vis_t;
47 
48 libelec_vis_t *libelec_vis_new(const elec_sys_t *sys, double pos_scale,
49  double font_sz);
50 void libelec_vis_destroy(libelec_vis_t *vis);
51 
52 bool libelec_vis_is_open(libelec_vis_t *vis);
53 void libelec_vis_open(libelec_vis_t *vis);
54 void libelec_vis_close(libelec_vis_t *vis);
55 
56 void libelec_vis_set_offset(libelec_vis_t *vis, vect2_t offset);
57 vect2_t libelec_vis_get_offset(const libelec_vis_t *vis);
58 
59 #ifdef __cplusplus
60 }
61 #endif
62 
63 #endif /* __LIBELEC_VIS_H__ */
void libelec_vis_destroy(libelec_vis_t *vis)
Definition: libelec_vis.c:412
void libelec_vis_set_offset(libelec_vis_t *vis, vect2_t offset)
Definition: libelec_vis.c:434
libelec_vis_t * libelec_vis_new(const elec_sys_t *sys, double pos_scale, double font_sz)
Definition: libelec_vis.c:365
bool libelec_vis_is_open(libelec_vis_t *vis)
Definition: libelec_vis.c:454
void libelec_vis_open(libelec_vis_t *vis)
Definition: libelec_vis.c:467
void libelec_vis_close(libelec_vis_t *vis)
Definition: libelec_vis.c:492
vect2_t libelec_vis_get_offset(const libelec_vis_t *vis)
Definition: libelec_vis.c:444