Goocanvasmm



Hi all,

I'm using Goocanvasmm for an application. I observed that not all 
Items are displayed on canvas. Rectangles and Ellipses are displayed 
only using TextModel and EllipseModel classes, for example, but with 
this hack no bounds properties are available (it is difficult centering 
a text item into an ellipse item, for example). Goocanvas::Text 
instances work, instead. Is it a known issue? Does a workaround exist?

In the meanwhile the following patch to goocanvas/src/textmodel.ccg 
should be useful to get Goocanvas::TextModel constructor to work 
better.

svn diff textmodel.ccg
Index: textmodel.ccg
===================================================================
--- textmodel.ccg	(revisione 1356)
+++ textmodel.ccg	(copia locale)
@@ -25,7 +25,7 @@
 
 TextModel::TextModel(const Glib::ustring& string, double x, double y, 
double width, Gtk::AnchorType anchor)
 : 
-  _CONSTRUCT("string", string.c_str(), "x", x, "y", y, "width", 
width, "anchor", (GtkAnchorType)anchor)
+  _CONSTRUCT("text", string.c_str(), "x", x, "y", y, "width", width, 
"anchor", (GtkAnchorType)anchor)
 {
 }
 

Gennaro Bellizio



________________________________________________________________
Tiscali Voce 8 Mega: Telefono+Adsl SENZA LIMITI a  4,95 Euro al mese!
http://abbonati.tiscali.it/promo/mail_ol200208/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]