diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2007-01-16 00:23:59 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2007-01-16 00:23:59 +0000 |
commit | 7a102793913cb7a1a0eefbbfc9d5c0d04c9eb868 (patch) | |
tree | d614b6941c83927af97a818fde59841499dd7917 /pango/pango-matrix.c | |
parent | fd7ecbb0203d89f31e9b9b7c10147fa2a3864513 (diff) | |
download | pango-7a102793913cb7a1a0eefbbfc9d5c0d04c9eb868.tar.gz |
Bug 323173 – Add layout of mixed direction text for vertical layout
2007-01-15 Behdad Esfahbod <behdad@gnome.org>
Bug 323173 – Add layout of mixed direction text for vertical layout
* pango/pango-gravity.h:
* pango/pango-gravity.c:
Moved gravity stuff here. New public API:
PangoGravityHint
pango_gravity_get_for_matrix()
pango_gravity_get_for_script()
* pango/pango-context.h:
* pango/pango-context.c (pango_context_init),
(update_resolved_gravity), (itemize_state_update_for_new_run):
Support gravity hint. New public API:
pango_context_set_gravity_hint()
pango_context_get_gravity_hint()
* pango/pango-utils.c:
* pango/pango-matrix.c:
* pango/pango-matrix.h:
* pango/pango-types.h:
Moved gravity and matrix stuff into its own header. pango-types.h
includes both pango-matrix.h and pango-gravity.h
* pango/pango.h:
Include new headers.
* pango/pango.def:
* pango/Makefile.am:
Update.
* docs/pango-docs.sgml:
* docs/pango-sections.txt:
* docs/tmpl/glyphs.sgml:
* docs/tmpl/main.sgml:
* docs/tmpl/vertical.sgml:
Add a section for Vertical Text.
* examples/renderdemo.c (do_output), (parse_gravity_hint),
(parse_options):
Support gravity hint.
* examples/test-mixed.txt:
New test, mixed Latin, Arabic, Chinese text.
svn path=/trunk/; revision=2144
Diffstat (limited to 'pango/pango-matrix.c')
-rw-r--r-- | pango/pango-matrix.c | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/pango/pango-matrix.c b/pango/pango-matrix.c index 857cc977..907cc7ea 100644 --- a/pango/pango-matrix.c +++ b/pango/pango-matrix.c @@ -1,7 +1,7 @@ /* Pango * pango-matrix.c: Matrix manipulation routines * - * Copyright (C) 2000 Red Hat Software + * Copyright (C) 2000, 2006 Red Hat Software * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -23,7 +23,7 @@ #include <stdlib.h> #include <math.h> -#include "pango-types.h" +#include "pango-matrix.h" #include "pango-impl-utils.h" GType @@ -251,39 +251,6 @@ pango_matrix_get_font_scale_factor (const PangoMatrix *matrix) } /** - * pango_matrix_to_gravity: - * @matrix: a #PangoMatrix - * - * Finds the gravity that best matches the rotation component - * in a #PangoMatrix. - * - * Return value: the gravity of @matrix, which will never be - * %PANGO_GRAVITY_AUTO, or PANGO_GRAVITY_SOUTH if @matrix is %NULL - * - * Since: 1.16 - */ -PangoGravity -pango_matrix_to_gravity (const PangoMatrix *matrix) -{ - PangoGravity gravity; - double x; - double y; - - if (!matrix) - return PANGO_GRAVITY_SOUTH; - - x = matrix->xy; - y = matrix->yy; - - if (abs (x) > abs (y)) - gravity = x > 0 ? PANGO_GRAVITY_WEST : PANGO_GRAVITY_EAST; - else - gravity = y < 0 ? PANGO_GRAVITY_NORTH : PANGO_GRAVITY_SOUTH; - - return gravity; -} - -/** * pango_matrix_transform_distance: * @matrix: a #PangoMatrix, or %NULL * @dx: in/out X component of a distance vector |