[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/edit_text_character.cpp
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/edit_text_character.cpp |
Date: |
Sun, 15 Apr 2007 15:27:03 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/04/15 15:27:03
Modified files:
. : ChangeLog
server : edit_text_character.cpp
Log message:
* server/edit_text_character.cpp (display): move text glyphs
so to be inside bounds defined for the textfield character.
Fixes bug #17954. This is likely not the cleanest way to
do this, see comments.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2877&r2=1.2878
http://cvs.savannah.gnu.org/viewcvs/gnash/server/edit_text_character.cpp?cvsroot=gnash&r1=1.53&r2=1.54
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2877
retrieving revision 1.2878
diff -u -b -r1.2877 -r1.2878
--- ChangeLog 15 Apr 2007 14:31:18 -0000 1.2877
+++ ChangeLog 15 Apr 2007 15:27:03 -0000 1.2878
@@ -1,5 +1,9 @@
2007-04-15 Sandro Santilli <address@hidden>
+ * server/edit_text_character.cpp (display): move text glyphs
+ so to be inside bounds defined for the textfield character.
+ Fixes bug #17954. This is likely not the cleanest way to
+ do this, see comments.
* server/matrix.{cpp,h}: provided setters for canonical
parameters.
* server/character.cpp: avoid direct access to matrix members.
Index: server/edit_text_character.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/edit_text_character.cpp,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -b -r1.53 -r1.54
--- server/edit_text_character.cpp 15 Apr 2007 10:52:09 -0000 1.53
+++ server/edit_text_character.cpp 15 Apr 2007 15:27:03 -0000 1.54
@@ -15,7 +15,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-/* $Id: edit_text_character.cpp,v 1.53 2007/04/15 10:52:09 bjacques Exp $ */
+/* $Id: edit_text_character.cpp,v 1.54 2007/04/15 15:27:03 strk Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -389,6 +389,8 @@
registerTextVariable();
+ rect def_bounds = m_def->get_bounds();
+
if (m_def->has_border())
{
matrix mat = get_world_matrix();
@@ -401,7 +403,6 @@
//mat.print();
point coords[4];
- const rect def_bounds = m_def->get_bounds();
coords[0] = def_bounds.get_corner(0);
coords[1] = def_bounds.get_corner(1);
@@ -443,7 +444,13 @@
}
// Draw our actual text.
- display_glyph_records(matrix::identity, this, m_text_glyph_records,
+ // Using a matrix to translate to def bounds seems an hack to me.
+ // A cleaner implementation is likely correctly setting the
+ // m_x_offset and m_y_offset memebers in glyph records.
+ // Anyway, see bug #17954 for a testcase.
+ matrix m;
+ m.set_translation(def_bounds.get_x_min(), def_bounds.get_y_min());
+ display_glyph_records(m, this, m_text_glyph_records,
m_def->get_root_def());
if (m_has_focus)