Re: scribble example question
- From: JParker coinstar com
- To: Marco Quezada <mquezada nlxcorp com>
- Cc: GTK List <gtk-app-devel-list gnome org>,	gtk-app-devel-list-admin gnome org
- Subject: Re: scribble example question
- Date: Thu, 7 Dec 2000 13:59:41 -0800
G'Day !
I did notice that you have tried to use "degrees" in you arguments.  This is not
correct, the aurgument is in 1/64's of a degree
for example :  end_angle = 360 degrees = 360 * 64;
I also had that problem when I was playing with expanding_circle cursors ... I
believe this is caused by your update_rectangle being too small for the refresh
area.
cheers,
Jim Parker
Sailboat racing is not a matter of life and death ....  It is far more important
than that !!!
                                                                                                              
                      
                    Marco Quezada                                                                             
                      
                    <mquezada nlxcorp com>          To:     GTK List <gtk-app-devel-list gnome org>           
                      
                    Sent by:                        cc:                                                       
                      
                    gtk-app-devel-list-admin        Subject:     scribble example question                    
                      
                    @gnome.org                                                                                
                      
                                                                                                              
                      
                                                                                                              
                      
                    12/07/00 01:35 PM                                                                         
                      
                                                                                                              
                      
                                                                                                              
                      
Hi all,
I am messing around with the scribble example program that comes in the
gtk tutorial to attempt to understand how the drawing area works. I
tried to replace the example's rectangular brush for a circular brush
but after doing so I get no image displayed. Can anyone give an idea on
what's wrong, I attached the code I replaced into the callback:
/* Draw a rectangle on the screen */
static void draw_brush( GtkWidget *widget,
                        gdouble    x,
                        gdouble    y)
{
  GdkRectangle update_rect;
  update_rect.x = x - 5;
  update_rect.y = y - 5;
  update_rect.width = 10;
  update_rect.height = 10;
  gdk_draw_arc (pixmap,
                widget->style->black_gc,
                TRUE, update_rect.x, update_rect.y,
                update_rect.width, update_rect.height,
                0,  360);
/*
  gdk_draw_rectangle (pixmap,
                      widget->style->black_gc,
                      TRUE,
                      update_rect.x, update_rect.y,
                      update_rect.width, update_rect.height);
*/
  gtk_widget_draw (widget, &update_rect);
}
--
Marco Quezada
Aerospaceo Engineero
NLX Corporation
22626 Sally Ride Dr.
Sterling, VA, 20164
mquezada nlxcorp com
703-234-2100 x1028
http://www.nlxcorp.com
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]