Tulip 5.7.1
Large graphs analysis and drawing
Loading...
Searching...
No Matches
GlyphRenderer.h
1/*
2 *
3 * This file is part of Tulip (https://tulip.labri.fr)
4 *
5 * Authors: David Auber and the Tulip development Team
6 * from LaBRI, University of Bordeaux
7 *
8 * Tulip is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation, either version 3
11 * of the License, or (at your option) any later version.
12 *
13 * Tulip is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 * See the GNU General Public License for more details.
17 *
18 */
19///@cond DOXYGEN_HIDDEN
20
21#ifndef GLYPHRENDERER_H
22#define GLYPHRENDERER_H
23
24#include <QPixmap>
25#include <QString>
26
27#include <tulip/tulipconf.h>
28
29#define GLYPH_PREVIEW_DIM 16
30
31namespace tlp {
32
33/**
34 * @brief Generate Qt previews for Glyphs plug-ins.
35 **/
36class TLP_QT_SCOPE GlyphRenderer {
37public:
38 /**
39 * @brief Get the preview for the glyph with the given Id.
40 */
41 static QPixmap render(int glyphId, int dim = GLYPH_PREVIEW_DIM);
42 static QPixmap render(QString glyphName, int dim = GLYPH_PREVIEW_DIM);
43};
44
45/**
46 * @brief Generate Qt previews for edge extremities glyphs plug-ins.
47 **/
48class TLP_QT_SCOPE EdgeExtremityGlyphRenderer {
49public:
50 /**
51 * @brief Get the preview for the edge extremity glyph with the given Id.
52 */
53 static QPixmap render(int glyphId, int dim = GLYPH_PREVIEW_DIM);
54 static QPixmap render(QString glyphName, int dim = GLYPH_PREVIEW_DIM);
55};
56} // namespace tlp
57#endif // GLYPHRENDERER_H
58///@endcond