File: plplotcanvas-hacktext.h

package info (click to toggle)
plplot 5.10.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 26,280 kB
  • ctags: 13,512
  • sloc: ansic: 83,001; xml: 27,081; ada: 18,878; cpp: 15,966; tcl: 11,651; python: 7,075; f90: 7,058; ml: 6,974; java: 6,665; perl: 5,029; sh: 2,210; makefile: 199; lisp: 75; sed: 25; fortran: 7
file content (88 lines) | stat: -rw-r--r-- 3,476 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
//
//  plplotcanvas-hacktext.h: Hacktext CanvasItem, cloned from the
//                           gnome-print project
//
//  This program is free software; you can redistribute it and/or
//  modify it under the terms of the GNU Library General Public License
//  as published by the Free Software Foundation; either version 2 of
//  the License, or (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU Library General Public License for more details.
//
//  You should have received a copy of the GNU Library General Public
//  License along with this program; if not, write to the Free Software
//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
//  Authors:
//    Federico Mena <federico@nuclecu.unam.mx>
//    Raph Levien <raph@acm.org>
//    Lauris Kaplinski <lauris@helixcode.com>
//
//  Copyright (C) 1998-1999 The Free Software Foundation
//  Copyright (C) 2000-2002 Ximian Inc.
//
//

#ifndef __PLPLOT_CANVAS_HACKTEXT_H__
#define __PLPLOT_CANVAS_HACKTEXT_H__

#include <glib.h>

G_BEGIN_DECLS

// Hacktext item for the canvas.
//
// The following object arguments are available:
//
// name			type			read/write	description
//--------------------------------------------------------------------------
// text			char *			RW		The string of the text item.
// glyphlist            GnomeGlyphList *        W               Glyphlist
// fill_color		string			W		X color specification for fill color,
//							        or NULL pointer for no color (transparent).
// fill_color_gdk	GdkColor*		RW		Allocated GdkColor for fill.
//

#define PLPLOT_TYPE_CANVAS_HACKTEXT    ( plplot_canvas_hacktext_get_type() )
#define PLPLOT_CANVAS_HACKTEXT( o )             ( G_TYPE_CHECK_INSTANCE_CAST( ( o ), PLPLOT_TYPE_CANVAS_HACKTEXT, PlplotCanvasHacktext ) )
#define PLPLOT_CANVAS_HACKTEXT_CLASS( k )       ( G_TYPE_CHECK_CLASS_CAST( ( k ), PLPLOT_TYPE_CANVAS_HACKTEXT, PlplotCanvasHacktextClass ) )
#define PLPLOT_IS_CANVAS_HACKTEXT( o )          ( G_TYPE_CHECK_INSTANCE_TYPE( ( o ), PLPLOT_TYPE_CANVAS_HACKTEXT ) )
#define PLPLOT_IS_CANVAS_HACKTEXT_CLASS( k )    ( G_TYPE_CHECK_CLASS_TYPE( ( k ), PLPLOT_TYPE_CANVAS_HACKTEXT ) )

typedef struct _PlplotCanvasHacktext        PlplotCanvasHacktext;
typedef struct _PlplotCanvasHacktextPriv    PlplotCanvasHacktextPriv;
typedef struct _PlplotCanvasHacktextClass   PlplotCanvasHacktextClass;

#include <libgnomecanvas/libgnomecanvas.h>

struct _PlplotCanvasHacktext
{
    GnomeCanvasItem          item;

    char                     *text;        // String of the text item
    guint                    fill_color;   // Fill color, RGBA
    gulong                   fill_pixel;   // Color for fill
    guint                    fill_set : 1; // Is fill color set?

    double                   size;         // size in user units
    double                   x, y;         // x, y coords of text origin

    // Antialiased specific stuff follows
    guint32                  fill_rgba; // RGBA color for filling
    PlplotCanvasHacktextPriv *priv;     // Private data
};

struct _PlplotCanvasHacktextClass
{
    GnomeCanvasItemClass parent_class;
};

GType plplot_canvas_hacktext_get_type( void );

G_END_DECLS

#endif // __PLPLOT_CANVAS_HACKTEXT_H__