Esempio n. 1
0
        public static Pango.Layout CreateLayout(this Gtk.Widget widget, Context cairo_context)
        {
            Pango.Layout layout = cairo_context.CreateLayout();
            layout.FontDescription = widget.PangoContext.FontDescription.Copy();

            double resolution = -1;//widget.Screen.Resolution;

            if (resolution != -1)
            {
                Pango.Context context = layout.GetContext();
                context.SetResolution(resolution);
                context.Dispose();
            }

            return(layout);
        }
        public static Pango.Layout CreateLayout(Gtk.Widget widget, Cairo.Context cairo_context)
        {
            Pango.Layout layout = PangoCairoHelper.CreateLayout(cairo_context);
            layout.FontDescription = widget.PangoContext.FontDescription.Copy();

            double resolution = widget.Screen.Resolution;

            if (resolution != -1)
            {
                Pango.Context context = PangoCairoHelper.LayoutGetContext(layout);
                PangoCairoHelper.ContextSetResolution(context, resolution);
                context.Dispose();
            }

            return(layout);
        }
Esempio n. 3
0
        public static Pango.Layout CreateLayout(Gtk.Widget widget, Cairo.Context cairo_context)
        {
            Pango.Layout layout = Pango.CairoHelper.CreateLayout(cairo_context);
            layout.FontDescription = widget.PangoContext.FontDescription;

            double resolution = widget.Screen.Resolution;

            if (resolution != -1)
            {
                Pango.Context context = layout.Context;
                Pango.CairoHelper.ContextSetResolution(context, resolution);
                context.Dispose();
            }

            Log.Debug("Creating Pango.Layout, configuring Cairo.Context");

            return(layout);
        }