Paul Coates wrote:
> 
>         I have discovered the gtk_draw_box function that will almost do what
>         I want except it draws a border around the box. If I use
> gtk_draw_flat_box
>         it does not draw the border but the pixmap is only 100x100 so I have to
> do
>         the following,
> 
>         int x, y, w, h;
>         GtkStyle *style;
> 
>         x = drawingarea1->allocation.width;
>         y = drawingarea1->allocation.height;
>         w = x/100;
>         h = y/100;
>         style = gtk_widget_get_style(machine);
>         for (x=0; x<=w; x++)
>                 for (y=0; y<=h; y++)
>                         gtk_draw_flat_box(style, drawingarea1->window,
>                         GTK_STATE_NORMAL, GTK_SHADOW_NONE, x*100, y*100, 100, 100);
> 
>         I don't know if this is the best way of doing this.
> 
>         The question is can I be sure that the pixmap will always be 100x100 in
> size
>         i.e. is it a condition of creating a theme, and if not how do I work
> out how
>         big it is to adjust the code above.
> 

        I meant to write 128x128 not 100x100

        Paul


Paul A Coates, Computing Service    Web: http://xander.ncl.ac.uk/~npac/
Newcastle University, Claremont Road,      Email: [EMAIL PROTECTED]
Newcastle Upon Tyne, NE1 7RU, England             Tel: +44-191-222-7986

-- 
To unsubscribe: mail -s unsubscribe [EMAIL PROTECTED] < /dev/null

Reply via email to