Re: Some gdk/gdk_pixbuf questions



Hi

1. how do i do what the deprecated gdk_color_white () does?

Not really the same: gdk_gc_set_rgb_fg_color

Or gtk_widget_get_style( wgt )->white

If you just need the color:

GdkColor color = { 0, 65535, 65535, 65535 };
gdk_colormap_alloc_color( gdk_drawable_get_colormap( .. ), &color, ... );

2. Is there any easy/straight method to clear (set to background
color) a GdkDrawable?

gtk_style_apply_default_background
        ( GTK_WIDGET( skw )->style, skw->double_buffer_pixmap,
          TRUE, GTK_STATE_NORMAL, NULL, 0, 0, wx, wy );

gdk_window_clear( ... )

gdk_draw_rectangle( ... )

HTH

Jan-Marek



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