Tutorial in using generatedInitialize()

Recently I had been told that prolog can create a graphical display, and told that by using the predicate generatedInitialize().

Can I ask for some tutorial for this?

For example, how to display a rectangle?

rectangle(2, 1, 2, 1).    %rectangle(length, width, length width).

I'm using Win-Prolog 4.920.


Consider checking Visual Prolog web-site

I'm using gfx to draw out the display.

display :-
    window_handler( display, display_handler ),
    show_dialog( display ).
create_display :-
    wdcreate( display,`Graphics Example`, 70, 50, 1200,510,[ws_sysmenu, ws_caption, ws_popup] ),
    wccreate( (display,2),grafix, ``, 10, 10, 1050, 457,[ws_child, ws_border, ws_visible, ws_tabstop] ),
    gfx_brush_create(red, 255, 0, 0, solid).
display_handler( _, msg_close, _, close ):-
display_handler( Win, msg_paint, grafix, _ ) :-
    gfx_paint( Win ),
    gfx( ( brush = red -> rectangle( 280, 212, 0, 12 ))),
    gfx_end( Win ).

Need Your Help

Indent before equal sign in .editorconfig

ini editorconfig

Is it allowed to use indent before equal sign in .editorconfig, like in php.ini?

Why isn't my file write method working?

java file io printwriter bufferedwriter

This method should write random chars, but it doesn't write anything at all. I'm probably doing something stupidly wrong here, but for the life of me I can't find it.