* PROBLEMS: Pango.Font problem fixed in Gtk-sharp-0.12
* sample/sample.cs: Use pango fonts, now the problem is gone. * sample/CanvasTextBox.cs: One step closer to make custom CanvasItem's. svn path=/trunk/diacanvas-sharp/; revision=20115
This commit is contained in:
Родитель
f5c49668c9
Коммит
ffad55f921
|
@ -6,6 +6,9 @@
|
|||
* doc/diacanvas-docs.tree: Ditto
|
||||
* glue/dia-canvas-item.c: Added set accessor for canvas field
|
||||
* dia/CanvasItem.custom: Ditto
|
||||
* PROBLEMS: Pango.Font problem fixed in Gtk-sharp-0.12
|
||||
* sample/sample.cs: Use pango fonts, now the problem is gone.
|
||||
* sample/CanvasTextBox.cs: One step closer to make custom CanvasItem's.
|
||||
|
||||
2003-11-15 Martin Willemoes Hansen <mwh@sysrq.dk>
|
||||
|
||||
|
|
17
PROBLEMS
17
PROBLEMS
|
@ -30,23 +30,6 @@ Property has unknown Type DiaCanvasItemHandles in Object Dia.CanvasItem
|
|||
|
||||
================================================================================
|
||||
|
||||
|
||||
Pango.FontDescription problem
|
||||
-----------------------------
|
||||
|
||||
CanvasText text = new CanvasText();
|
||||
text.Font = FontDescription.FromString ("sans 20");
|
||||
|
||||
Results in this:
|
||||
|
||||
(<unknown>:972): GLib-GObject-WARNING **: gvalue.c:93: cannot initialize GValue with type `GBoxed', this type has no GTypeValueTable implementation
|
||||
(<unknown>:972): GLib-GObject-CRITICAL **: file gboxed.c: line 487 (g_value_set_boxed): assertion `G_VALUE_HOLDS_BOXED (value)' failed
|
||||
|
||||
(<unknown>:972): GLib-GObject-CRITICAL **: file gobject.c: line 1019 (g_object_set_property): assertion `G_IS_VALUE (value)' failed
|
||||
|
||||
================================================================================
|
||||
|
||||
|
||||
CanvasView.FindViewItem casting problem
|
||||
---------------------------------------
|
||||
|
||||
|
|
|
@ -4,17 +4,23 @@ using System.Runtime.InteropServices;
|
|||
using Dia;
|
||||
using Pango;
|
||||
|
||||
public class CanvasTextBox : CanvasBox {
|
||||
public class CanvasTextBox : CanvasGroup {
|
||||
|
||||
static GLib.Type gtype;
|
||||
CanvasText text;
|
||||
|
||||
public CanvasTextBox() : base()
|
||||
static CanvasTextBox()
|
||||
{
|
||||
gtype = RegisterGType (typeof (CanvasTextBox));
|
||||
}
|
||||
|
||||
public CanvasTextBox() : base (gtype)
|
||||
{
|
||||
text = new CanvasText();
|
||||
//text.Font = FontDescription.FromString ("sans 20");
|
||||
text.Text = "Hi";
|
||||
text.Font = FontDescription.FromString ("sans 20");
|
||||
text.Text = "Hi, im editable";
|
||||
text.Width = 200;
|
||||
text.Height = 40;
|
||||
text.Move (10, 30);
|
||||
text.Height = 100;
|
||||
Add (text);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,13 +84,13 @@ public class Sample {
|
|||
Dia.CanvasText text = new Dia.CanvasText();
|
||||
text.Move (250, 150);
|
||||
text.Text = "Hello, World!";
|
||||
//text.Font = FontDescription.FromString ("sans 20");
|
||||
text.Font = FontDescription.FromString ("sans 20");
|
||||
text.Height = 50;
|
||||
text.Width = 100;
|
||||
text.Width = 200;
|
||||
canvas.Root.Add (text);
|
||||
|
||||
CanvasTextBox textbox = new CanvasTextBox();
|
||||
textbox.Move (50, 225);
|
||||
textbox.Move (50, 150);
|
||||
canvas.Root.Add (textbox);
|
||||
|
||||
CanvasImage image = new CanvasImage (new Pixbuf (null, "pixmaps/logo.png"));
|
||||
|
|
Загрузка…
Ссылка в новой задаче