/************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-v10.html * * Contributors: Details at https://graphviz.org *************************************************************************/ #pragma once #include #ifdef __cplusplus extern "C" { #endif #include typedef struct { pointf sz; /* Size of label (input) */ pointf pos; /* Position of lower-left corner of label (output) */ void *lbl; /* Pointer to label in the graph */ unsigned char set; /* True if the position has been set (input/output) */ } xlabel_t; typedef struct { pointf pos; /* Position of lower-left corner of object */ pointf sz; /* Size of object; may be zero for a point */ xlabel_t *lbl; /* Label attached to object, or NULL */ } object_t; typedef struct { boxf bb; /* Bounding box of all objects */ unsigned char force; /* If true, all labels must be placed */ } label_params_t; int placeLabels(object_t *objs, size_t n_objs, xlabel_t *lbls, size_t n_lbls, label_params_t *params); #ifdef XLABEL_INT #include