Re: Pango underline does not work with cairo scale.

2010-05-03 Thread Magicloud Magiclouds
Hi, could someone help me on this? Thanks. On Fri, Apr 30, 2010 at 2:53 PM, Magicloud Magiclouds wrote: > Hi, the code is following. In a scaled cairo context, the underline is > not scaled as the text. test.png shows that the underline is ever > larger than the "00". > T

Pango underline does not work with cairo scale.

2010-04-29 Thread Magicloud Magiclouds
Hi, the code is following. In a scaled cairo context, the underline is not scaled as the text. test.png shows that the underline is ever larger than the "00". The version of pango is 1.28.0-1. The version of cairo is 1.8.10-4. #include #include int main () { cairo_surface_t * s = cairo_image_

[Pango] Underline attribute does not work with scaled cairo context.

2010-04-20 Thread Magicloud Magiclouds
Hi, I set the attributes for the layout with Underline, Size, Letter Spacing, Font Description. All others worked fine except the Underline, worked as there was no scale at all. So when the string displayed in correct size, the underline on the other hand, displayed as huge black blocks. Following

Re: How to calculate the font size?

2010-04-16 Thread Magicloud Magiclouds
caled" unit? On Fri, Apr 16, 2010 at 12:15 AM, Behdad Esfahbod wrote: > On 04/14/2010 09:57 PM, Magicloud Magiclouds wrote: >> Hi, could someone help me? Pango's maillist seems inactive. Thank you. >> >> On Wed, Apr 14, 2010 at 3:31 PM, Magicloud Magiclouds >&g

Re: How to calculate the font size?

2010-04-14 Thread Magicloud Magiclouds
Hi, could someone help me? Pango's maillist seems inactive. Thank you. On Wed, Apr 14, 2010 at 3:31 PM, Magicloud Magiclouds wrote: > Hi, I am not quite familiar with the font thing. Now I have a simple > request, I do not know how to meet it: > Say I have a background (i.e. a

How to create a pango context from the cairo context and inherit cairo's matrix?

2009-09-19 Thread Magicloud Magiclouds
Hi, Given a cairo context with unknown matrix, when I just created a pango context from it, the text displayed wrong I tested, if the cairo is using default matrix, then everything is OK. So my question is, how to inherit the matrix from cairo to pango? Thanks. -- 竹密岂妨流水过 山高哪阻野云飞 _

Re: Weird problem with type hint Dock and configure-event.

2009-04-08 Thread Magicloud Magiclouds
DOW_TYPE_HINT_DOCK); g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (destroy), NULL); g_signal_connect (G_OBJECT (window), "configure-event", G_CALLBACK (configure), NULL); gtk_widget_show_all (window); gtk_main (); return 0; } On

Weird problem with type hint Dock and configure-event.

2009-04-07 Thread Magicloud Magiclouds
Hi, Recently, I found that, if I inherit Gtk::Window class, and set the type hint to dock in initialize, the configure-event could be triggered correctly. But, if I directly use Gtk::Window class, new it, set the type hint to dock, then the configure-event would not be triggered at all. Why it

About making dock window.

2009-03-12 Thread Magicloud Magiclouds
Hi, I am working on make some dock windows. After I set type_hint and _NET_WM_STRUT, it worked. But I do not know how to deal with another dock program. I.e., I am making one for left edge of screen, and there already exists one for top edge of screen. Is there a way for my window to know that

Re: How to make a window resize as I want?

2009-03-05 Thread Magicloud Magiclouds
Hello? On Thu, Mar 5, 2009 at 5:55 PM, Magicloud Magiclouds wrote: > Sorry, mis-operate on my client, the mail is not completed. > > Since the widget works fine, I got its actual size in configure-event. > Then resize the window to the size I got before. Well... this is the > hor

Re: How to make a window resize as I want?

2009-03-05 Thread Magicloud Magiclouds
What is the right way to do this? Thanks. On Thu, Mar 5, 2009 at 5:46 PM, Magicloud Magiclouds wrote: > Hi, >  I have a custom-widget in a window. The size of the widget is > specified by how many chars I want to display in it. So I made a > 'colnum' perproty for it, and

How to make a window resize as I want?

2009-03-05 Thread Magicloud Magiclouds
Hi, I have a custom-widget in a window. The size of the widget is specified by how many chars I want to display in it. So I made a 'colnum' perproty for it, and set the 'width_request' property when outside set the 'colnum' property. The widget seems fine. -- 竹密岂妨流水过 山高哪阻野云飞 __

Question about vte and directfb.

2008-08-28 Thread Magicloud Magiclouds
Hi, I wanted to make a simple terminal using framebuffer. I compiled all things that needed, and used gtk-demo to test. It seems that the screen was "lazy update", I chose one thing after another , the old highlight only disappeared when I moved the mouse on it again. Then I used vte.

Re: Could I control the window menu?

2008-04-10 Thread Magicloud Magiclouds
Hello, I meant the menu appears when I right click on the titlebar or taskbar. I know it is provided by the WM. Just wonder if there is some common way to control it. I want to make a program that only show a icon on taskbar, and I choosed to use a iconify window. But the window menu sol

Could I control the window menu?

2008-04-10 Thread Magicloud Magiclouds
Hello, I mean add some entry or make it disappear. Thanks. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

How to add an alpha channel to Gdk::Drawable?

2008-04-09 Thread Magicloud Magiclouds
Hello, I want to draw something (not with cairo, just gdk) then make a shape combine mask from it. But As I tried, there seems no alpha channel by default. Could someone help me? Thanks. ___ gtk-app-devel-list mailing list gtk-app-devel

Problem on gdk_window_shape_combine_mask and gtk_timeout

2008-03-03 Thread Magicloud Magiclouds
Hello, I use gdk_window_shape_combine_mask in gtk_timeout timer, to change my window's shape every second. While I first use gdk_window_shape_combine_mask without timer, it works. Then put it in the timer, the application crashed, with message: The program 'crazyclock.rb' receive

How to make a "following mouse" window?

2008-02-25 Thread Magicloud Magiclouds
Hello, I want to use gdk_display_set_pointer_hooks to get pointer position every time it moves. But I do not know if it is OK for this, I mean does it cost much resource? Or I have other ways to do this. Thanks. ___ gtk-app-devel-list mailing l

Why key snooper response twice on one key press?

2007-11-01 Thread Magicloud Magiclouds
Dear, I am using gtk_key_snooper_install. In the call back function, I just print out the keyval and state, then return TRUE. While the application running, I hit 'a', and I got '0x61 0x0' twice. Why it is like this? Thanks. ___ gtk-app-devel-l

How to know what bindings does one class have?

2007-10-29 Thread Magicloud Magiclouds
Dear all, We can add bindings to a class by configure file and programming. So, as a "class user", how could I know the bindings that could apply to one certain class? Thanks. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://

How to get all the key press event in a textview?

2007-09-28 Thread Magicloud Magiclouds
Dear all, As in Emacs, something like Ctrl+Alt+a work, even in a gnome-terminal. But in my simple gtk program, I just get ctrl+65507(keyval) in key release event. How to make it work? Thanks. ___ gtk-app-devel-list mailing list gtk-app-devel-li

How to combine two GdkDrawable as two layers?

2007-08-17 Thread Magicloud Magiclouds
Dear all, I have "GdkDrawable* main" as main layer, and "GdkDrawable* layer1". Now I draw a jpeg on main (by GdkPixbuf), and clear layer1 with alpha channel value 0, draw a line with alpha channel value 1 (by Cairo), then gdk_draw_drawable layer1 to main. The result I wanted was a jpeg w

Question about gdk_window_foreign_new.

2007-08-09 Thread Magicloud Magiclouds
Dear all, I am using Xfce4, and I want to draw something on xfdesktop4. So I got its gdk_window, and create a cairo context on it. GdkDrawable *window; cairo_t *cc; window = gdk_window_foreign_new (netk_window_get_xid (g_list_first (netk_screen_get_windows_stacked (netk_screen_get_de