sp-glyph.h revision aded4b44e9194df7c9905c5787d1c7a9553d12cd
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh#ifdef HAVE_CONFIG_H
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh# include <config.h>
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh#endif
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh#ifndef __SP_GLYPH_H__
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh#define __SP_GLYPH_H__
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz
9dc68827cbd515262ecb8d5ae8547d9e82c72e00Jon A. Cruz/*
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh * SVG <glyph> element implementation
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh *
4b1c2be41ce8c1a88502c1b1885ad1468646fbfftheadib * Authors:
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh * Felipe C. da S. Sanches <juca@members.fsf.org>
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh *
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh * Copyright (C) 2008 Felipe C. da S. Sanches
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh *
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh * Released under GNU GPL, read the file 'COPYING' for more information
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh */
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh#include "sp-object.h"
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh#define SP_GLYPH(obj) (dynamic_cast<SPGlyph*>((SPObject*)obj))
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh#define SP_IS_GLYPH(obj) (dynamic_cast<const SPGlyph*>((SPObject*)obj) != NULL)
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6mikloshenum glyphArabicForm {
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh GLYPH_ARABIC_FORM_INITIAL,
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh GLYPH_ARABIC_FORM_MEDIAL,
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh GLYPH_ARABIC_FORM_TERMINAL,
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh GLYPH_ARABIC_FORM_ISOLATED,
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh};
e4b626a9206e4fabf4fc7601dfa14b133c2a27f0Krzysztof Kosiński
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6mikloshenum glyphOrientation {
16a8c7d5e433b176636a4a1260c42ea43932110bKrzysztof Kosiński GLYPH_ORIENTATION_HORIZONTAL,
54e660c4de9d37185e3953165d053526632ef4f0johanengelen GLYPH_ORIENTATION_VERTICAL,
54e660c4de9d37185e3953165d053526632ef4f0johanengelen GLYPH_ORIENTATION_BOTH
5c45c5153b0415f7573f69f4ee3e946b5872a8d1theadib};
c0537dcfe264414d52ad86579d57cb0cb2183dcbAlex Valavanis
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6mikloshclass SPGlyph : public SPObject {
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6mikloshpublic:
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh SPGlyph();
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh virtual ~SPGlyph();
e141c94157efa47e3af32fecda00153812986ac2Krzysztof Kosiński
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh Glib::ustring unicode;
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh Glib::ustring glyph_name;
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh char* d;
7928f64712fea954c584ebbe2708f4a3a45b8af2Liam P. White glyphOrientation orientation;
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh glyphArabicForm arabic_form;
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh char* lang;
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh double horiz_adv_x;
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh double vert_origin_x;
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh double vert_origin_y;
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh double vert_adv_y;
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh
b54fcbf691761f7356ee5239114b8a0adf292cc3Tomasz Boczkowskiprotected:
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh virtual void release();
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh virtual void set(unsigned int key, const gchar* value);
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh virtual void update(SPCtx* ctx, unsigned int flags);
c751b68e56ace7b9d649ee20b7f25ed1f65922e3Matthew Petroff
5c45c5153b0415f7573f69f4ee3e946b5872a8d1theadib virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
5c45c5153b0415f7573f69f4ee3e946b5872a8d1theadib};
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh#endif //#ifndef __SP_GLYPH_H__
b7f07692f95074fdcf74c7350fbf5f3099ffc1b6miklosh