Graphviz 14.1.2~dev.20260123.1158
Loading...
Searching...
No Matches
viewportcamera.c
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (c) 2011 AT&T Intellectual Property
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * https://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors: Details at https://graphviz.org
9 *************************************************************************/
10
11#include "config.h"
12
13#include "viewportcamera.h"
14#include "gui/gui.h"
15#include <math.h>
16#include <glcomp/glcompbutton.h>
17#include <glcomp/glcomplabel.h>
18#include <glcomp/glcomppanel.h>
19#include <util/alloc.h>
20
22 return gv_alloc(sizeof(viewport_camera));
23}
24
27 vi->camera_count + 1,
28 sizeof(viewport_camera*));
29 vi->camera_count++;
31 vi->active_camera = vi->camera_count - 1;
32 return vi->cameras[vi->camera_count - 1];
33}
34
36{
38 /*add test cameras */
40 c->targetx = view->panx;
41 c->targety = view->pany;
42
43 c->r = view->zoom * -1;
44}
Memory allocation wrappers that exit on failure.
static void * gv_recalloc(void *ptr, size_t old_nmemb, size_t new_nmemb, size_t size)
Definition alloc.h:73
static void * gv_alloc(size_t size)
Definition alloc.h:47
ViewInfo * view
Definition viewport.c:40
double zoom
Definition smyrnadefs.h:250
size_t camera_count
Definition smyrnadefs.h:298
viewport_camera ** cameras
Definition smyrnadefs.h:297
double panx
Definition smyrnadefs.h:248
double pany
Definition smyrnadefs.h:249
size_t active_camera
<number of cameras
Definition smyrnadefs.h:299
static viewport_camera * add_camera_to_viewport(ViewInfo *vi)
static viewport_camera * new_viewport_camera(void)
void menu_click_add_camera(void)