GTK DRAWING

External libraries (GTK, GSL, SDL, Allegro, OpenGL, etc) questions.
vladimir777
Posts: 94
Joined: Aug 19, 2011 18:28

GTK DRAWING

Postby vladimir777 » Aug 19, 2011 18:32

What is equivalent in FB and GTK for this code written in VB6?

Code: Select all

Private Sub Command1_Click()
Picture1.Line (1, 1)-(100, 100), vbRed, B
End Sub




THX IN ADVANCE

VLAD
vladimir777
Posts: 94
Joined: Aug 19, 2011 18:28

or this

Postby vladimir777 » Aug 19, 2011 18:44

Code: Select all

Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.Circle (X, Y), 110, vbRed
End Sub

Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.Circle (X, Y), 100, vbGreen
End Sub

Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.Circle (X, Y), 140, vbBlue
End Sub
TJF
Posts: 3503
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Postby TJF » Aug 21, 2011 10:51

I don't know VB6 and I think there is no way for a direct translation of your code to GTK.

Find an example for GTK drawing here. It uses GTK >= 2.16 (due to the use of GtkBuilder) and some deprecated GDK drawing primitives.

Since GTK moved from GDK to cairo (hardware-accelerated) a lot has changed regarding this topic. If you consider to make heavy drawing in your app, I recomment to focus on cairo (and GTK3).
haegartheroot
Posts: 112
Joined: Jul 27, 2007 15:45
Location: Bremen, Germany
Contact:

Postby haegartheroot » Aug 22, 2011 7:33

Hello Vladimir,

you can use almost exactly the same (VB6) syntax in FB:

'' draw a rectangle
Line (1, 1)-(100,100),red,b

'' draw a filled circle
Circle (100, 400),100,blue,,,, f

However, you need to define the colors in RGB notation first.

Here's a complete example for you:

Code: Select all

'******************************************************************************
'* Program name: gtk_fbimage_example.bas
'*
'* Version:      1.0
'*
'* Author:       Klaus Siebke
'*
'* Description / Beschreibung:
'* --------------------------
'*
'* Small demonstration program to answer a question from vladimir777 in
'* the FreeBasic forum
'*
'* License
'* --------
'*
'* C. 2011 by Klaus Siebke, www.siebke.com
'*
'* Permission to use, copy, modify, distribute and sell this software
'* and its documentation for any purpose is hereby granted without fee,
'* provided that the above copyright notice appear in all copies and
'* that both that copyright notice and this permission notice appear
'* in supporting documentation.
'* It is provided "as is" without express or implied warranty.
'*
'******************************************************************************


#include once "gtk/gtk.bi"

#define NULL 0
#define IMAGE_WIDTH  1024
#define IMAGE_HEIGHT 768

'Define some color constants (for gdk red and blue are transposed)
Const white = RGB(255,255,255)
Const red = RGB(0,0,255)
Const maroon = RGB(0,0,128)
Const green = RGB(0,128,0)
Const lime = RGB(0,255,0)
Const olive = RGB(0,128,128)
Const blue = RGB(255,0,0)
Const teal = RGB(128,128,0)
Const navy = RGB(128,0,0)
Const aqua = RGB(255,255,0)
Const fuchsia = RGB(255,0,255)
Const purple = RGB(128,0,128)
Const yellow = RGB(0,255,255)
Const black = RGB(0,0,0)
Const grey = RGB(128,128,128)
Const silver = RGB(192,192,192)
const orange = rgb(0,128,255)

dim shared rgbbuf(IMAGE_WIDTH * IMAGE_HEIGHT * 3) as byte

dim as GtkWidget ptr win, drawarea
dim as integer x, y, i
     
declare function on_darea_expose cdecl( byval widget as GtkWidget ptr, _
                                         byval event as GdkEventExpose ptr, _
                                         byval userdata as gpointer ) as gboolean

     '' main

     '' initialize Gtk
     gtk_init( NULL, NULL )

     '' create a window
     win = gtk_window_new( GTK_WINDOW_TOPLEVEL )
     gtk_window_set_title( GTK_WINDOW(win), "GTK Drawing Test for vladimir777" )
     gtk_signal_connect( GTK_OBJECT(win), "delete_event", GTK_SIGNAL_FUNC(@gtk_main_quit), NULL )

     '' create a drawable area on it
     drawarea = gtk_drawing_area_new( )
     gtk_widget_set_size_request( drawarea, IMAGE_WIDTH, IMAGE_HEIGHT )
     gtk_container_add( GTK_CONTAINER(win), drawarea )

     '' set the callback for when the window is redrawn
     gtk_signal_connect( GTK_OBJECT(drawarea), "expose-event", GTK_SIGNAL_FUNC(@on_darea_expose), NULL )
     gtk_widget_show_all( win )

     '' create an 24-bit RGB image
     screenres IMAGE_WIDTH, IMAGE_HEIGHT, 32,,-1
     
     '' initialize the whole area to white     
     Line (0, 0)-(IMAGE_WIDTH, IMAGE_HEIGHT), white,bf


     '' draw a rectangle
     Line (1, 1)-(100,100),red,b

     '' draw a filled circle
     Circle (100, 400),100,blue,,,, f

     '' start the loop
     gtk_main()

     end

function on_darea_expose cdecl( byval widget as GtkWidget ptr, _
                                 byval event as GdkEventExpose ptr, _
                                 byval userdata as gpointer) as gboolean

     '' draw the 24-bit RGB image
     gdk_draw_rgb_32_image( widget->window, _
                         widget->style->fg_gc(GTK_STATE_NORMAL), _
                         0, 0, IMAGE_WIDTH, IMAGE_HEIGHT, _
                         GDK_RGB_DITHER_MAX, screenptr, IMAGE_WIDTH * 4 )

     '' return OK
     return TRUE

end function


This example runs with the FBC standard compiler. As TJF mentioned, in the future it would be better to use cairo instead of GDK. But the current version of FBC as of 08/2011 does not support the latest GTK release.

Have fun,
haegar
vladimir777
Posts: 94
Joined: Aug 19, 2011 18:28

THX

Postby vladimir777 » Aug 22, 2011 15:34

Yhank you
vladimir777
Posts: 94
Joined: Aug 19, 2011 18:28

Postby vladimir777 » Sep 05, 2011 16:00

How do I insert circle drawnig here:

Code: Select all

#INCLUDE ONCE "gtk/gtk.bi"

#define NULL 0
#define IMAGE_WIDTH  800
#define IMAGE_HEIGHT 600

'Define some color constants (for gdk red and blue are transposed)
Const white = RGB(255,255,255)
Const red = RGB(0,0,255)
Const maroon = RGB(0,0,128)
Const green = RGB(0,128,0)
Const lime = RGB(0,255,0)
Const olive = RGB(0,128,128)
Const blue = RGB(255,0,0)
Const teal = RGB(128,128,0)
Const navy = RGB(128,0,0)
Const aqua = RGB(255,255,0)
Const fuchsia = RGB(255,0,255)
Const purple = RGB(128,0,128)
Const yellow = RGB(0,255,255)
Const black = RGB(0,0,0)
Const grey = RGB(128,128,128)
Const silver = RGB(192,192,192)
const orange = rgb(0,128,255)

dim shared rgbbuf(IMAGE_WIDTH * IMAGE_HEIGHT * 3) as byte

dim as integer x, y, i

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function on_darea_expose cdecl( byval widget as GtkWidget ptr, byval event as GdkEventExpose ptr, byval userdata as gpointer) as gboolean
   gdk_draw_rgb_32_image( widget->window, widget->style->fg_gc(GTK_STATE_NORMAL), 0, 0, IMAGE_WIDTH, IMAGE_HEIGHT, GDK_RGB_DITHER_MAX, screenptr, IMAGE_WIDTH * 4 )
   return TRUE
end function
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub AAA Cdecl (Byval widget As GtkWidget Ptr, Byval win As gpointer)
   gtk_window_set_title(win, "CIRCLE")
   'screenres IMAGE_WIDTH, IMAGE_HEIGHT, 32,,-1
   Line (0, 0)-(IMAGE_WIDTH, IMAGE_HEIGHT), white,bf
   Circle (3, 3),50,blue,,,, f
'gdk_draw_rgb_32_image(drawarea->window, drawarea->style->fg_gc(GTK_STATE_NORMAL), 0, 0, IMAGE_WIDTH, IMAGE_HEIGHT, GDK_RGB_DITHER_MAX, screenptr, IMAGE_WIDTH * 4 )

End Sub

Sub BBB Cdecl (Byval widget As GtkWidget Ptr, Byval win As gpointer)
   gtk_window_set_title(win, "SQUARE")
End Sub

Sub CCC Cdecl (Byval widget As GtkWidget Ptr, Byval win As gpointer)
   gtk_window_set_title(win, "CLEAR")
End Sub

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''


gtk_init ( 0 , 0 )

DIM AS GtkWidget PTR win = gtk_window_new ( GTK_WINDOW_TOPLEVEL )
gtk_window_set_title ( GTK_WINDOW ( win ) , "Test" )

gtk_widget_set_size_request(win, 830, 650)
gtk_window_set_position(GTK_WINDOW(win), GTK_WIN_POS_CENTER)
   
DIM AS GtkWidget PTR button1 = gtk_button_new_with_label ( "Circle" )
DIM AS GtkWidget PTR button2 = gtk_button_new_with_label ( "Square" )
DIM AS GtkWidget PTR button3 = gtk_button_new_with_label ( "Clear" )
DIM As GtkWidget PTR drawarea = gtk_drawing_area_new( )


DIM AS GtkWidget PTR box = gtk_fixed_new ( )
gtk_fixed_put ( GTK_FIXED(box) , button1 , 10 , 5 )
gtk_fixed_put ( GTK_FIXED(box) , button2 , 100 , 5 )
gtk_fixed_put ( GTK_FIXED(box) , button3 , 200 , 5 )
gtk_widget_set_size_request( drawarea, IMAGE_WIDTH, IMAGE_HEIGHT )
gtk_fixed_put ( GTK_FIXED(box) , drawarea , 10 , 40 )
'gtk_container_add( GTK_CONTAINER(win), drawarea )

gtk_signal_connect( GTK_OBJECT(win), "delete_event", GTK_SIGNAL_FUNC(@gtk_main_quit), NULL )
gtk_signal_connect( GTK_OBJECT(drawarea), "expose-event", GTK_SIGNAL_FUNC(@on_darea_expose), NULL )

g_signal_connect(G_OBJECT(button1), "clicked", G_CALLBACK (@AAA), cast(gpointer, win))
g_signal_connect(G_OBJECT(button2), "clicked", G_CALLBACK (@BBB), cast(gpointer, win))
g_signal_connect(G_OBJECT(button3), "clicked", G_CALLBACK (@CCC), cast(gpointer, win))

drawing_area), "button_press_event", (GtkSignalFunc) button_press_event, NULL);
gtk_container_add ( GTK_CONTAINER ( win ) , box )
gtk_widget_show_all ( win )

screenres IMAGE_WIDTH, IMAGE_HEIGHT, 32,,-1
Line (0, 0)-(IMAGE_WIDTH, IMAGE_HEIGHT), white,bf
'Line (1, 1)-(100,100),red,b
'Circle (200, 200),50,blue,,,, f
Line (10, 10)-(IMAGE_WIDTH-10, IMAGE_HEIGHT-10),red,b
gtk_main ( )
end
TJF
Posts: 3503
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Postby TJF » Sep 05, 2011 22:13

When you like to use FB drawing commands you have to copy the FB SCREEN to the GtkDrawingArea after each change (here I use the ExposeEventHandler for that):

Code: Select all

#INCLUDE ONCE "gtk/gtk.bi"

#DEFINE NULL 0
#DEFINE IMAGE_WIDTH  800
#DEFINE IMAGE_HEIGHT 600

'Define some color constants (for gdk red and blue are transposed)
CONST white = RGB(255,255,255)
CONST red = RGB(0,0,255)
CONST maroon = RGB(0,0,128)
CONST green = RGB(0,128,0)
CONST lime = RGB(0,255,0)
CONST olive = RGB(0,128,128)
CONST blue = RGB(255,0,0)
CONST teal = RGB(128,128,0)
CONST navy = RGB(128,0,0)
CONST aqua = RGB(255,255,0)
CONST fuchsia = RGB(255,0,255)
CONST purple = RGB(128,0,128)
CONST yellow = RGB(0,255,255)
CONST black = RGB(0,0,0)
CONST grey = RGB(128,128,128)
CONST silver = RGB(192,192,192)
CONST orange = RGB(0,128,255)

DIM SHARED rgbbuf(IMAGE_WIDTH * IMAGE_HEIGHT * 3) AS BYTE

DIM AS INTEGER x, y, i

TYPE MyDataUdt
  AS GtkWidget PTR win, darea
END TYPE

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
FUNCTION on_darea_expose CDECL( BYVAL widget AS GtkWidget PTR, BYVAL event AS GdkEventExpose PTR, BYVAL userdata AS gpointer) AS gboolean
        gdk_draw_rgb_32_image( widget->WINDOW, widget->style->fg_gc(GTK_STATE_NORMAL), 0, 0, IMAGE_WIDTH, IMAGE_HEIGHT, GDK_RGB_DITHER_MAX, SCREENPTR, IMAGE_WIDTH * 4 )
        RETURN TRUE
END FUNCTION
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
SUB AAA CDECL (BYVAL widget AS GtkWidget PTR, BYVAL ud AS gpointer)
  WITH *CAST(MyDataUdt PTR, ud)
    gtk_window_set_title(GTK_WINDOW(.win), "CIRCLE")
    LINE (0, 0)-(IMAGE_WIDTH, IMAGE_HEIGHT), white,bf
    CIRCLE (80, 80),50,blue,,,, f
    on_darea_expose(.darea, 0, 0)
  END WITH
END SUB

SUB BBB CDECL (BYVAL widget AS GtkWidget PTR, BYVAL ud AS gpointer)
  WITH *CAST(MyDataUdt PTR, ud)
    gtk_window_set_title(GTK_WINDOW(.win), "SQUARE")
    LINE (0, 0)-(IMAGE_WIDTH, IMAGE_HEIGHT), white,bf
    LINE (80, 80)-(100, 100), red, bf
    on_darea_expose(.darea, 0, 0)
  END WITH
END SUB

SUB CCC CDECL (BYVAL widget AS GtkWidget PTR, BYVAL ud AS gpointer)
  WITH *CAST(MyDataUdt PTR, ud)
    gtk_window_set_title(GTK_WINDOW(.win), "CLEAR")
    LINE (0, 0)-(IMAGE_WIDTH, IMAGE_HEIGHT), white,bf
    on_darea_expose(.darea, 0, 0)
  END WITH
END SUB

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''


gtk_init ( 0 , 0 )

DIM AS GtkWidget PTR win = gtk_window_new ( GTK_WINDOW_TOPLEVEL )
gtk_window_set_title ( GTK_WINDOW ( win ) , "Test" )

gtk_widget_set_size_request(win, 830, 650)
gtk_window_set_position(GTK_WINDOW(win), GTK_WIN_POS_CENTER)

DIM AS GtkWidget PTR button1 = gtk_button_new_with_label ( "Circle" )
DIM AS GtkWidget PTR button2 = gtk_button_new_with_label ( "Square" )
DIM AS GtkWidget PTR button3 = gtk_button_new_with_label ( "Clear" )
DIM AS GtkWidget PTR drawarea = gtk_drawing_area_new( )


DIM AS GtkWidget PTR box = gtk_fixed_new ( )
gtk_fixed_put ( GTK_FIXED(box) , button1 , 10 , 5 )
gtk_fixed_put ( GTK_FIXED(box) , button2 , 100 , 5 )
gtk_fixed_put ( GTK_FIXED(box) , button3 , 200 , 5 )
gtk_widget_set_size_request( drawarea, IMAGE_WIDTH, IMAGE_HEIGHT )
gtk_fixed_put ( GTK_FIXED(box) , drawarea , 10 , 40 )
'gtk_container_add( GTK_CONTAINER(win), drawarea )

VAR MyDat = NEW MyDataUdt(win, drawarea)

gtk_signal_connect( GTK_OBJECT(win), "delete_event", GTK_SIGNAL_FUNC(@gtk_main_quit), NULL )
gtk_signal_connect( GTK_OBJECT(drawarea), "expose-event", GTK_SIGNAL_FUNC(@on_darea_expose), NULL )

g_signal_connect(G_OBJECT(button1), "clicked", G_CALLBACK (@AAA), CAST(gpointer, MyDat))
g_signal_connect(G_OBJECT(button2), "clicked", G_CALLBACK (@BBB), CAST(gpointer, MyDat))
g_signal_connect(G_OBJECT(button3), "clicked", G_CALLBACK (@CCC), CAST(gpointer, MyDat))

'g_signal_connect(G_OBJECT(drawarea), "button_press_event", (GtkSignalFunc) button_press_event, NULL);
gtk_container_add ( GTK_CONTAINER ( win ) , box )
gtk_widget_show_all ( win )

SCREENRES IMAGE_WIDTH, IMAGE_HEIGHT, 32,,-1
LINE (0, 0)-(IMAGE_WIDTH, IMAGE_HEIGHT), white,bf
'Line (1, 1)-(100,100),red,b
'Circle (200, 200),50,blue,,,, f
LINE (10, 10)-(IMAGE_WIDTH-10, IMAGE_HEIGHT-10),red,b
gtk_main ( )

DELETE MyDat
END

Since you want to change the window title in the button-handlers two PTRs are needed here (main window and drawing area). That's why I introduced an UDT called MyDataUdt.

To get rid of the double buffer and the copy operations you may consider using gdk drawing primitives (or cairo) instead of FB drawing.
vladimir777
Posts: 94
Joined: Aug 19, 2011 18:28

Postby vladimir777 » Sep 05, 2011 23:56

I didnot know this

TYPE MyDataUdt
AS GtkWidget PTR win, darea
END TYPE

and

WITH *CAST(MyDataUdt PTR, ud)

Thank you
Sisophon2001
Posts: 1704
Joined: May 27, 2005 6:34
Location: Cambodia, Thailand, Lao, Ireland etc.
Contact:

Postby Sisophon2001 » Sep 06, 2011 11:00

I would write this sub

Code: Select all

SUB CCC CDECL (BYVAL widget AS GtkWidget PTR, BYVAL ud AS gpointer)
  WITH *CAST(MyDataUdt PTR, ud)
    gtk_window_set_title(GTK_WINDOW(.win), "CLEAR")
    LINE (0, 0)-(IMAGE_WIDTH, IMAGE_HEIGHT), white,bf
    on_darea_expose(.darea, 0, 0)
  END WITH
END SUB


Like this

Code: Select all

SUB CCC CDECL (BYVAL widget AS GtkWidget PTR, BYVAL ud AS MyDataUdt PTR)
    gtk_window_set_title(GTK_WINDOW(ud->win), "CLEAR")
    LINE (0, 0)-(IMAGE_WIDTH, IMAGE_HEIGHT), white,bf
    on_darea_expose(ud->darea, 0, 0)
END SUB


No CAST and no WITH.

But I don't know if my version is easier for you to understand. Is it the pointers, the CAST or the WITH statement that is confusing, or just when they are all combined on one line.

Garvan
TJF
Posts: 3503
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Postby TJF » Sep 07, 2011 7:20

Sisophon2001 wrote:No CAST and no WITH.

Yes, your solutions works and it's easier to understand - in this simple case.

When using GTK in big projects you'll have dozens of callbacks with different parameter lists (variable types, number of parameters, return value types). Bugs are often in the signal handler (callbacks) and their parameter lists (fbc cannot check it as this are callbacks).

So for easy checking I prefer to use the original parameter list as described in the documentation and use the WITH statement in the callback.
vladimir777
Posts: 94
Joined: Aug 19, 2011 18:28

Both are ok

Postby vladimir777 » Sep 08, 2011 20:55

Both are ok

But this forum category LIBRARIES should be broken into subcategories:

SDL, GTK, WX-C, OPENGL etc

becuse it is hard to find this way!

Also, there is not enough examples for using it.
For wx-c there is just 3 examples, for cairo just one

When you want to try something it is easy to start and see, and after that if you want to go further ... nightmare ...
Searching internet, and finding nothing

For drawing area there is SCRIBBLE exeample everywhere: in c, in python, in ruby blabla

V1c and co. put a lot effort making FB (and it is VERY good), then some other ppl put effort writing wrappers for different libraries and BI files also

And then you find 3 examples for using LIB with 600 functions ...
Sad..

FOR ALL THOSE LIBS, we should make code depository for samples ...
and then we will see which one is good little program that explains somethnig so it can be included in next FB version
vladimir777
Posts: 94
Joined: Aug 19, 2011 18:28

Postby vladimir777 » Sep 08, 2011 21:03

1. Writing FB - most difficult task to do, just a couple ppl can do work
2. Writing wrappers for LIBS - second in line mey be just 100 ppl from this
forum can do this
3. Writing samples - easiest task, everybody with 5 day experience using FB and LIB can do some example maybe 7000 ppl can make a sample
=====

And we fail on most easiest task?

For popularity of FB step 3 is very important
========================

Let's do something!

FB Workers of the world, unite :)
TJF
Posts: 3503
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Postby TJF » Sep 09, 2011 0:16

vladimir777 wrote:For drawing area there is SCRIBBLE exeample everywhere: in c, in python, in ruby blabla

What's wrong with the FB-Scribble example I mentioned in my first post?
TJF wrote:Find an example for GTK drawing here...



vladimir777 wrote:Also, there is not enough examples for using it.

Yes, I second that. I think examples shouldn't be published at the forum. There should be a separate area broken in subcategories (like it's on the german webside).
vladimir777
Posts: 94
Joined: Aug 19, 2011 18:28

Postby vladimir777 » Sep 09, 2011 3:49

I have no problems with FB or pointers. It was easy to learn all other components in GTK except drawingarea.

If I had a couple simple examples it would be easier. I am OK now,
but I did not get what I expected ..

What is wrong with scribble? 166 lines of code. I can do it in C++ and QT then!

I hope that one day FB will have better GUI 'cause FB is such a nice tools!

Something like VB6!


Look at VB6 scribble example here:
JUST 3 LINE OF CODE

Code: Select all

Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.Circle (X, Y), 200, vbRed
End Sub

Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.Circle (X, Y), 50, vbBlue
End Sub

Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.Circle (X, Y), 300, vbGreen
End Sub

TJF
Posts: 3503
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Postby TJF » Sep 09, 2011 8:57

vladimir777 wrote:I have no problems with FB or pointers. It was easy to learn all other components in GTK except drawingarea.
So you're free to write an example for DragAndDrop now!

vladimir777 wrote:What is wrong with scribble? 166 lines of code. I can do it in C++ and QT then!
It's about 20 lines of code. The rest is auto-generated by the grafical GUI designer Glade3 and Gtk+Tobac (meanwhile named GladeToBac). This may be an overkill for such a small example. For real projects these are very helpful tools!

vladimir777 wrote:I hope that one day FB will have better GUI 'cause FB is such a nice tools!
You compare apples and pears:
  • Can you change the window size in your VB example?
  • Is it cross-platform code?
IMO FB has allready better GUI than VB.

vladimir777 wrote:but I did not get what I expected ..
...
Something like VB6!
Using VB did you try to draw Bezier curves? And did you try to fill them (with individual patterns)? And did you try to scale the result for different output devices (ie for non square pixels on inkjet printers)?

GTK now is designed to use cairo as drawing engine (it was different at the time when the gtk.bi header came up you have in use). Unless you start to use actual headers and cairo you'll never learn about the advantages of using FB and GTK.

Hopefully FB will never get like VB!

Return to “Libraries”

Who is online

Users browsing this forum: No registered users and 3 guests