PLplot  5.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
plplotcanvas-hacktext.h
Go to the documentation of this file.
1 // -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
2 //
3 // plplotcanvas-hacktext.h: Hacktext CanvasItem, cloned from the
4 // gnome-print project
5 //
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Library General Public License
8 // as published by the Free Software Foundation; either version 2 of
9 // the License, or (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU Library General Public License for more details.
15 //
16 // You should have received a copy of the GNU Library General Public
17 // License along with this program; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 //
20 // Authors:
21 // Federico Mena <federico@nuclecu.unam.mx>
22 // Raph Levien <raph@acm.org>
23 // Lauris Kaplinski <lauris@helixcode.com>
24 //
25 // Copyright (C) 1998-1999 The Free Software Foundation
26 // Copyright (C) 2000-2002 Ximian Inc.
27 //
28 //
29 
30 #ifndef __PLPLOT_CANVAS_HACKTEXT_H__
31 #define __PLPLOT_CANVAS_HACKTEXT_H__
32 
33 #include <glib.h>
34 
35 G_BEGIN_DECLS
36 
37 // Hacktext item for the canvas.
38 //
39 // The following object arguments are available:
40 //
41 // name type read/write description
42 //--------------------------------------------------------------------------
43 // text char * RW The string of the text item.
44 // glyphlist GnomeGlyphList * W Glyphlist
45 // fill_color string W X color specification for fill color,
46 // or NULL pointer for no color (transparent).
47 // fill_color_gdk GdkColor* RW Allocated GdkColor for fill.
48 //
49 
50 #define PLPLOT_TYPE_CANVAS_HACKTEXT ( plplot_canvas_hacktext_get_type() )
51 #define PLPLOT_CANVAS_HACKTEXT( o ) ( G_TYPE_CHECK_INSTANCE_CAST( ( o ), PLPLOT_TYPE_CANVAS_HACKTEXT, PlplotCanvasHacktext ) )
52 #define PLPLOT_CANVAS_HACKTEXT_CLASS( k ) ( G_TYPE_CHECK_CLASS_CAST( ( k ), PLPLOT_TYPE_CANVAS_HACKTEXT, PlplotCanvasHacktextClass ) )
53 #define PLPLOT_IS_CANVAS_HACKTEXT( o ) ( G_TYPE_CHECK_INSTANCE_TYPE( ( o ), PLPLOT_TYPE_CANVAS_HACKTEXT ) )
54 #define PLPLOT_IS_CANVAS_HACKTEXT_CLASS( k ) ( G_TYPE_CHECK_CLASS_TYPE( ( k ), PLPLOT_TYPE_CANVAS_HACKTEXT ) )
55 
59 
60 #include <libgnomecanvas/libgnomecanvas.h>
61 
63 {
64  GnomeCanvasItem item;
65 
66  char *text; // String of the text item
67  guint fill_color; // Fill color, RGBA
68  gulong fill_pixel; // Color for fill
69  guint fill_set : 1; // Is fill color set?
70 
71  double size; // size in user units
72  double x, y; // x, y coords of text origin
73 
74  // Antialiased specific stuff follows
75  guint32 fill_rgba; // RGBA color for filling
76  PlplotCanvasHacktextPriv *priv; // Private data
77 };
78 
80 {
81  GnomeCanvasItemClass parent_class;
82 };
83 
85 
86 G_END_DECLS
87 
88 #endif // __PLPLOT_CANVAS_HACKTEXT_H__