1 /* $Id: renderer.hg,v 1.4 2006/06/10 15:26:24 murrayc Exp $ */
5 * Copyright(C) 2004 The gtkmm Development Team
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or(at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the Free
19 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 #include <glibmm/object.h>
24 #include <pangomm/context.h>
25 #include <pangomm/glyphstring.h>
26 #include <pangomm/layout.h>
27 #include <pangomm/layoutline.h>
30 _PINCLUDE(glibmm/private/object_p.h)
35 _CC_INCLUDE(pango/pango-enum-types.h)
37 _WRAP_ENUM(RenderPart, PangoRenderPart)
39 /** Pango::Renderer is a base class that contains the necessary logic for rendering a Pango::Layout or Pango::LayoutLine.
40 * By subclassing Pango::Renderer and overriding operations such as draw_glyphs and draw_rectangle,
41 * renderers for particular font backends and destinations can be created.
43 class Renderer : public Glib::Object
45 _CLASS_GOBJECT(Renderer, PangoRenderer, PANGO_RENDERER, Glib::Object, GObject)
51 _WRAP_METHOD(void draw_layout(const Glib::RefPtr<Layout>& layout, int x, int y), pango_renderer_draw_layout)
52 _WRAP_METHOD(void draw_layout_line(const Glib::RefPtr<LayoutLine>& line, int x, int y), pango_renderer_draw_layout_line)
53 _WRAP_METHOD(void draw_glyphs(const Glib::RefPtr<Font>& font, const GlyphString& glyphs, int x, int y), pango_renderer_draw_glyphs)
54 _WRAP_METHOD(void draw_rectangle(RenderPart part, int x, int y, int width, int height), pango_renderer_draw_rectangle)
55 _WRAP_METHOD(void draw_error_underline(int x, int y, int width, int height), pango_renderer_draw_error_underline)
56 _WRAP_METHOD(void draw_trapezoid(RenderPart part, double y1, double x11, double x21, double y2, double x12, double x22), pango_renderer_draw_trapezoid)
57 _WRAP_METHOD(void draw_glyph(const Glib::RefPtr<Font>& font, Glyph glyph, double x, double y), pango_renderer_draw_glyph)
59 _WRAP_METHOD(void activate(), pango_renderer_activate)
60 _WRAP_METHOD(void deactivate(), pango_renderer_deactivate)
62 _WRAP_METHOD(void part_changed(RenderPart part), pango_renderer_part_changed)
64 _WRAP_METHOD(void set_color(RenderPart part, const Color& color), pango_renderer_set_color)
66 #m4 _CONVERSION(`PangoColor*',`Color',`Color($3)')
67 _WRAP_METHOD(Color get_color(RenderPart part) const, pango_renderer_get_color)
69 _WRAP_METHOD(void set_matrix(const Matrix& matrix), pango_renderer_set_matrix)
70 Matrix get_matrix() const;
71 _IGNORE(pango_renderer_get_matrix)
74 } /* namespace Pango */