예제 #1
0
        int StringHeight(Gtk.Widget w, string text)
        {
            int wi, he;

            Pango.Layout lo = w.CreatePangoLayout(text);
            lo.GetPixelSize(out wi, out he);
            lo.Dispose();
            return(he);
        }
예제 #2
0
        int StringWidth(Gtk.Widget w, string text)
        {
            int wi, he;

            Pango.Layout lo = w.CreatePangoLayout(text);
            lo.FontDescription = w.Style.FontDesc;
            lo.GetPixelSize(out wi, out he);
            lo.Dispose();

            return(wi);
        }