Binary files pango_origin/.ChangeLog.swp and pango_modify/.ChangeLog.swp differ
diff -uNr pango_origin/pango/pango-layout.c pango_modify/pango/pango-layout.c
--- pango_origin/pango/pango-layout.c	2006-02-10 10:11:19.000000000 +0800
+++ pango_modify/pango/pango-layout.c	2006-02-10 13:44:07.000000000 +0800
@@ -325,6 +325,20 @@
   return layout->width;
 }
 
+int
+pango_layout_get_effective_width (PangoLayout *layout)
+{
+  int width;
+
+  g_return_val_if_fail (layout != NULL, 0);
+
+  width = pango_layout_get_width (layout);
+  if (width == -1)
+    pango_layout_get_size (layout, &width, NULL);
+
+  return width;
+}
+
 /**
  * pango_layout_set_wrap:
  * @layout: a #PangoLayout
@@ -363,6 +377,27 @@
   return layout->wrap;
 }
 
+gboolean 
+pango_layout_get_effective_wrap (PangoLayout *layout)
+{
+  int width;
+  PangoEllipsizeMode ellipsize;
+
+  g_return_if_fail (PANGO_IS_LAYOUT (layout));    
+
+  width = pango_layout_get_width (layout);
+  if (width == -1)
+      return FALSE;
+  else
+    {
+      ellipsize = pango_layout_get_ellipsize(layout);
+      if (ellipsize == PANGO_ELLIPSIZE_NONE)
+          return TRUE;
+      else
+          return FALSE;
+    }
+}
+
 /**
  * pango_layout_set_indent
  * @layout: a #PangoLayout.
@@ -804,6 +839,27 @@
   return layout->ellipsize;
 }
 
+gboolean 
+pango_layout_get_effective_ellipsize (PangoLayout *layout)
+{
+  int width;
+  PangoEllipsizeMode ellipsize;
+
+  g_return_if_fail (PANGO_IS_LAYOUT (layout));    
+
+  width = pango_layout_get_width (layout);
+  if (width == -1)
+      return FALSE;
+  else
+    {
+      ellipsize = pango_layout_get_ellipsize(layout);
+      if (ellipsize == PANGO_ELLIPSIZE_NONE)
+          return FALSE;
+      else
+          return TRUE;
+    }
+}
+
 /**
  * pango_layout_set_text:
  * @layout: a #PangoLayout
@@ -2263,9 +2319,9 @@
   pango_layout_get_extents (layout, NULL, &logical_rect);
 
   if (width)
-    *width = logical_rect.width;
+    *width = logical_rect.x + logical_rect.width;
   if (height)
-    *height = logical_rect.height;
+    *height = logical_rect.y + logical_rect.height;
 }
 
 /**
@@ -2289,9 +2345,9 @@
   pango_layout_get_extents (layout, NULL, &logical_rect);
 
   if (width)
-    *width = (logical_rect.width + PANGO_SCALE / 2) / PANGO_SCALE;
+    *width = (logical_rect.x + logical_rect.width + PANGO_SCALE / 2) / PANGO_SCALE;
   if (height)
-    *height = (logical_rect.height + PANGO_SCALE / 2) / PANGO_SCALE;
+    *height = (logical_rect.y + logical_rect.height + PANGO_SCALE / 2) / PANGO_SCALE;
 }
 
 static void
diff -uNr pango_origin/pango/pango-layout.h pango_modify/pango/pango-layout.h
--- pango_origin/pango/pango-layout.h	2005-11-05 07:55:37.000000000 +0800
+++ pango_modify/pango/pango-layout.h	2006-02-10 13:44:13.000000000 +0800
@@ -122,9 +122,11 @@
 void           pango_layout_set_width            (PangoLayout                *layout,
 						  int                         width);
 int            pango_layout_get_width            (PangoLayout                *layout);
+int            pango_layout_get_effective_width  (PangoLayout                *layout);
 void           pango_layout_set_wrap             (PangoLayout                *layout,
                                                   PangoWrapMode               wrap);
 PangoWrapMode  pango_layout_get_wrap             (PangoLayout                *layout);
+gboolean pango_layout_get_effective_wrap         (PangoLayout                *layout);
 void           pango_layout_set_indent           (PangoLayout                *layout,
 						  int                         indent);
 int            pango_layout_get_indent           (PangoLayout                *layout);
@@ -154,6 +156,8 @@
 					       PangoEllipsizeMode  ellipsize);
 PangoEllipsizeMode pango_layout_get_ellipsize (PangoLayout        *layout);
 
+gboolean pango_layout_get_effective_ellipsize (PangoLayout        *layout);
+
 void           pango_layout_context_changed (PangoLayout    *layout);
 
 void     pango_layout_get_log_attrs (PangoLayout    *layout,
