|
Post by alexfish on Dec 18, 2012 18:53:07 GMT 1
What Next Mile stone for Rad demo 0.5 Now got most of what is needed in terms of functionality , most of it's what I call rat code but now know what will work and what is required, so time to sit back and apply some of what bacon can do best , one of them been "ASSOC " in terms of the likes older types Basic finding the relationship at three levels require some ,hit and miss to get the required result , not the case in bacon this can be reduced to something like this. DECLARE tab$, notebook$ ,widget$ ASSOC STRING RELATE tab$ TO notebook$ RELATE widget$ TO tab$ tab$("tab1") = "notebook1" tab$("tab2") = "notebook1" widget$("button1")="tab1"
' Print the child to tab to parent get$ = widget$("button1") PRINT "attach button 1 to ",get$ PRINT "attach ",get$," to ",tab$(get$)
also will be a fix for the tab-notebook , notice if delete the main tab ,there is the page remnant left on the screen , Oops Regards Have fun Alex PS this could be a good thing to try , some say it be easy in prolog , en.wikipedia.org/wiki/Zebra_Puzzle
|
|
|
Post by alexfish on Jan 1, 2013 19:26:13 GMT 1
Getting Keyboard input
Whilst pondering on how to get more realisims with the rad tool widgets IE: say if have a List Widget it would be nice to update it as is, then only to find there was already a solution in the HUG lib mm! I thought
so will be implementing something like the below
INCLUDE hug.bac
FUNCTION get_key_press(NUMBER hug_widget, void *hug_data1, NUMBER hug_data2) : REM INCLUDE
REM should work for GTK 1.x and 2.x USEC typedef struct { int type; void *window; signed char send_event; unsigned int time; unsigned int state; unsigned int keyval; } GdkEventKey;
GdkEventKey *keypress; keypress = (GdkEventKey*)hug_data1;
hug_gui_properties.last_key_pressed = keypress->keyval;
END USEC IF hug_gui_properties.last_key_pressed < 255 THEN strings$=CONCAT$(strings$, CHR$(hug_gui_properties.last_key_pressed )) TEXT(ed, CHR$(hug_gui_properties.last_key_pressed )) END IF IF hug_gui_properties.last_key_pressed = 65293 THEN TEXT(ed, NL$) END IF RETURN FALSE
END FUNCTION
win=WINDOW("wee",300,300) ed=EDIT(300,235) ATTACH(win,ed,0,0) but= BUTTON("Edit",100,50) g_signal_connect_data(but, "key-press-event", get_key_press, 0, 0, 0) ATTACH(win,but,5,240) but1= BUTTON("STOP",100,50) ATTACH(win,but1,185,240) DISPLAY
The idea here is click on the "Edit button" not the "EDIT" , then type away , click on STOP to well you know.
ADDED :: have now implemented the ASSOC arrays in pre beta 0.5 As a bit of history as regards the rad tool and memory ;
Pre beta 0.5 arryay$[x][y] At start testing with string arrays 4m allocated : mem usage = 100MiB Reduced to .................................1m allocated : mem usage = 40 - 50 Mib
beta 0.5 Development in progress Init : use of ASSOC array + array[x][y] 1m allocated : mem usage : 20MiB
Tab Notebook edits improved :: Now Instant : > Complete. If have noticed how the tabs are done this =: Now Adding:
Multiple Windows.:: implemented Dialog Windows. inprogress Adding bindings to widgets on Tab Notebook. :: implemented "import_image_from_file". :: implemented , this will be part of the Event Image. IE: sprites Sprites :: implemented
Event Image : Delayed, this will be implement once the main image lib is complete, this is been done in the same format as a hug lib , so will be programmable with the radtool + scripting, OR , script only , in essence this is taking longer than expected. but once complete will have its own Command Structure. I hope it paves the way for some exiting programming. SEE NEXT POST
:: Update :: If Using Ubuntu > 11.04 Download latest 29 beta + Latest Hug > Update Ubuntu to latest "system " ,Kernel + c libs + gtk, then recompile latest radtool update. Best performance = fallback Gnome or use Unity2D
Regards
Alex
|
|
|
Post by alexfish on Jan 4, 2013 18:56:03 GMT 1
Radtool: , A peak at what is going into the libs. + what it can do
In the mean time , here is something to play with : Hypnotic ,
as the title says "Hypnotic" , if affected this way , you know what not to do, :: if so can just let it run and take the mouse away from the focus of the window
Click on window to start , leftside to start then move mouse slowly to the right Play around with mouse positions , Click any-time on the window to restart or can just leave to run until end of loop,
Try moding the Display loop + main file with colours etc , can also try fill colour = , at present all are none'
DEPENDS on librsvg.so
SAVE THIS AS hypnotic.sgv , on your Desktop
<svg width='500' height='500'> <desc>hypnotic by alexfish</desc> <rect x='0' y='0' width='' height='350' fill='white' />
<rect transform='translate(150 150) rotate(0)' x='0' y='0' width='100' height='100' rx='40' fill='none' stroke='purple' stroke-width='2' /> <rect transform='translate(150 150) rotate(20)' x='0' y='0' width='100' height='100' rx='40' fill='none' stroke='purple' stroke-width='2' /> <rect transform='translate(150 150) rotate(40)' x='0' y='0' width='100' height='100' rx='40' fill='none' stroke='purple' stroke-width='2' /> <rect transform='translate(150 150) rotate(60)' x='0' y='0' width='100' height='100' rx='40' fill='none' stroke='purple' stroke-width='2' /> <rect transform='translate(150 150) rotate(80)' x='0' y='0' width='100' height='100' rx='40' fill='none' stroke='purple' stroke-width='2' /> <rect transform='translate(150 150) rotate(100)' x='0' y='0' width='100' height='100' rx='40' fill='none' stroke='purple' stroke-width='2' /> <rect transform='translate(150 150) rotate(120)' x='0' y='0' width='100' height='100' rx='40' fill='none' stroke='purple' stroke-width='2' /> <rect transform='translate(150 150) rotate(140)' x='0' y='0' width='100' height='100' rx='40' fill='none' stroke='purple' stroke-width='2' /> <rect transform='translate(150 150) rotate(160)' x='0' y='0' width='100' height='100' rx='40' fill='none' stroke='purple' stroke-width='2' /> <rect transform='translate(150 150) rotate(180)' x='0' y='0' width='100' height='100' rx='40' fill='none' stroke='purple' stroke-width='2' /> <rect transform='translate(150 150) rotate(200)' x='0' y='0' width='100' height='100' rx='40' fill='none' stroke='purple' stroke-width='2' /> <rect transform='translate(150 150) rotate(220)' x='0' y='0' width='100' height='100' rx='40' fill='none' stroke='purple' stroke-width='2' /> <rect transform='translate(150 150) rotate(240)' x='0' y='0' width='100' height='100' rx='40' fill='none' stroke='purple' stroke-width='2' /> <rect transform='translate(150 150) rotate(260)' x='0' y='0' width='100' height='100' rx='40' fill='none' stroke='purple' stroke-width='2' /> <rect transform='translate(150 150) rotate(280)' x='0' y='0' width='100' height='100' rx='40' fill='none' stroke='purple' stroke-width='2' /> <rect transform='translate(150 150) rotate(300)' x='0' y='0' width='100' height='100' rx='40' fill='none' stroke='purple' stroke-width='2' /> <rect transform='translate(150 150) rotate(320)' x='0' y='0' width='100' height='100' rx='40' fill='none' stroke='purple' stroke-width='2' /> <rect transform='translate(150 150) rotate(340)' x='0' y='0' width='100' height='100' rx='40' fill='none' stroke='purple' stroke-width='2' /> <rect x='140' y='140' width='20' height='20' rx='20' fill='red' stroke='magenta' stroke-width='5' /> </svg>
then say this , compile with latest bacon(beta) + hug.bac 82
' ***************************************************************** ' Hypnotic ' Build bacon 29beta hug82 ' Alexfish BaCon Converter.org ' LICENSE: GPL version 3 or later ' This program comes with ABSOLUTELY NO WARRANTY '****************************************************** ' WARNING *****This Can have a Hypnitic effect******* '****************************************************** ' ***************************************************************** INCLUDE hug.bac gtk$ = HUGLIB$("gtk") gdk$ = HUGLIB$("gdk") CONST rsvg$ = "librsvg-2.so" IMPORT "gtk_image_set_from_pixbuf(long,long)" FROM gtk$ TYPE void IMPORT "rsvg_init()" FROM rsvg$ TYPE void IMPORT "rsvg_term()" FROM rsvg$ TYPE void IMPORT "rsvg_handle_new()" FROM rsvg$ TYPE long IMPORT "rsvg_handle_write(long,char*,long,int)" FROM rsvg$ TYPE int IMPORT "rsvg_handle_close(long,int)" FROM rsvg$ TYPE int IMPORT "rsvg_handle_get_pixbuf(long)" FROM rsvg$ TYPE long IMPORT "gtk_image_new_from_pixbuf(long)" FROM gtk$ TYPE long IMPORT "gdk_pixbuf_get_width(long)" FROM "libgdk_pixbuf-2.0.so.0" TYPE int IMPORT "gdk_pixbuf_get_height(long)" FROM "libgdk_pixbuf-2.0.so.0" TYPE int IMPORT "rsvg_handle_new_from_file(char*)" FROM rsvg$ TYPE long DECLARE image_pointer$ ASSOC STRING svg$=""
FUNCTION HUG_IMAGE_PIXBUF_MOVE(NUMBER hug_widget) LOCAL image,myimage,ebox rsvg_init() mysvg = rsvg_handle_new() svi = rsvg_handle_write(mysvg,svg$, LEN(svg$), 0) svi = rsvg_handle_close(mysvg, 0) mypix = rsvg_handle_get_pixbuf(mysvg) rsvg_term() image = hug_widget_font(STR$(hug_widget)) gtk_image_set_from_pixbuf(image, mypix) gtk_widget_queue_draw(image) g_object_unref(mysvg) g_object_unref(mypix) SYNC RETURN TRUE END FUNCTION
FUNCTION EVENT_IMAGE(STRING hug_file$, int hug_xsize, int hug_ysize)
LOCAL image, ebox
image = gtk_image_new_from_file(hug_file$) ebox = gtk_event_box_new() gtk_container_add(ebox, image) gtk_widget_queue_draw(image) gtk_widget_set_events(ebox, GDK_POINTER_MOTION_MASK | GDK_KEY_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_SCROLL_MASK ) g_signal_connect_data(ebox, "button-press-event", hug_mouse_event, 20, 0, 0) g_signal_connect_data(ebox, "button-release-event", hug_mouse_event, 40, 0, 0) g_signal_connect_data(ebox, "motion-notify-event", hug_mouse_event, 0, 0, 0) g_signal_connect_data(ebox, "leave-notify-event", hug_mouse_event, 30, 0, 0) g_signal_connect_data(ebox, "scroll-event", hug_mouse_event, 10, 0, G_CONNECT_AFTER) IF HUG_WIDGET_SHOW THEN gtk_widget_show_all(ebox)
hug_widget_xsize(STR$(ebox)) = hug_xsize hug_widget_ysize(STR$(ebox)) = hug_ysize hug_widget_signal(STR$(ebox)) = 4 hug_widget_s_widget(STR$(ebox)) = ebox
hug_widget_type$(STR$(ebox)) = "image" hug_widget_font(STR$(ebox)) = image hug_widget_focus(STR$(ebox)) = image
hug_widget_image$(STR$(ebox)) = hug_file$
RETURN ebox END FUNCTION
FUNCTION ROTATE() FOR s = 0 TO 100000 STEP MOUSE(0) svg$="" image_pointer$("5")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("7")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+20),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("9")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+40),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("11")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+60),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("13")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+80),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("15")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+100),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("17")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+120),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("19")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+140),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("21")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+160),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("23")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+180),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("25")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+200),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("27")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+220),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("29")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+240),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("31")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+260),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("33")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+280),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("35")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+300),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("37")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s + 320),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("39")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+340),")' x='0' y='0' width='100' height='100' rx='40'") FOR t = 0 TO wcount svg$= CONCAT$(svg$,image_pointer$(STR$(t))) NEXT HUG_IMAGE_PIXBUF_MOVE(svg_screen1) NEXT
FOR s = 0 TO 100000 STEP MOUSE(0) svg$="" image_pointer$("5")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("7")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(-s),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("9")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+20),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("11")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(20 -s),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("13")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+40),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("15")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(40 -s),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("17")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+60),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("19")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(60 -s),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("21")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+80),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("23")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(80 -s),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("25")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+100),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("27")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(100 -s),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("29")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+120),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("31")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(120 -s),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("33")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+140),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("35")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(140 -s),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("37")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s + 160),")' x='0' y='0' width='100' height='100' rx='40'") image_pointer$("39")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(160 -s),")' x='0' y='0' width='100' height='100' rx='40'") FOR t = 0 TO wcount svg$= CONCAT$(svg$,image_pointer$(STR$(t))) NEXT HUG_IMAGE_PIXBUF_MOVE(svg_screen1) NEXT RETURN TRUE END FUNCTION SUB test_click IF MOUSE(2) = 1 THEN ROTATE() END IF END SUB '@ ---------------------------------------------------------------- win = WINDOW("Hypnotic",500,500) wcount=0 svg$="" '@ path to the svg file change to where the file is saved ' OPEN "/home/<user>/Desktop/hypnotic.svg" FOR READING AS myfile ' EG :: OPEN "/home/alexfish/Desktop/rect.svg" FOR READING AS myfile WHILE NOT(ENDFILE(myfile)) DO READLN txt$ FROM myfile image_pointer$(STR$(wcount))=txt$ INCR wcount WEND CLOSE FILE myfile FOR t = 0 TO wcount svg$= CONCAT$(svg$,image_pointer$(STR$(t))) NEXT svg_screen1=EVENT_IMAGE("",500,500) ATTACH(win,svg_screen1,0,0) CALLBACK(svg_screen1,test_click) HUG_IMAGE_PIXBUF_MOVE(svg_screen1) DISPLAY
'@ END OF ALL THAT
PS : don't forget to uncomment the OPEN file ,near foot of code
can also try SCALE : EG 1st line at rotate
image_pointer$("5")=CONCAT$( "<rect transform='translate(150 150) scale(1.25) rotate(",STR$(s),")' x='0' y='0' width='100' height='100' rx='40'")
OR try these changes
FUNCTION ROTATE() FOR s = 0 TO 100000 STEP MOUSE(0) svg$="" image_pointer$("5")=CONCAT$( "<rect transform='translate(150 150 ) rotate(",STR$(s),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("6")=" fill='yellow' opacity='0.8' stroke='purple' stroke-width='2' />" image_pointer$("7")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+20),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("9")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+40),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("11")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+60),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("13")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+80),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("15")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+100),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("17")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+120),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("18")=" fill='orchid' opacity='0.8' stroke='purple' stroke-width='2' />" image_pointer$("19")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+140),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("21")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+160),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("23")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+180),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("24")=" fill='yellow' opacity='0.8' stroke='purple' stroke-width='2' />" image_pointer$("25")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+200),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("27")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+220),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("29")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+240),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("31")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+260),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("33")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+280),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("32")=" fill='orchid' opacity='0.8' stroke='purple' stroke-width='2' />" image_pointer$("35")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+300),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("37")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s + 320),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("39")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+340),")' x='0' y='0' width='100' height='100' rx='60'") FOR t = 0 TO wcount svg$= CONCAT$(svg$,image_pointer$(STR$(t))) NEXT HUG_IMAGE_PIXBUF_MOVE(svg_screen1) NEXT
FOR s = 0 TO 100000 STEP MOUSE(0) svg$="" image_pointer$("5")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("7")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(-s),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("9")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+20),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("11")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(20 -s),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("13")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+40),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("15")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(40 -s),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("17")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+60),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("19")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(60 -s),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("21")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+80),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("23")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(80 -s),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("25")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+100),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("27")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(100 -s),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("29")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+120),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("31")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(120 -s),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("33")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s+140),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("35")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(140 -s),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("37")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(s + 160),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("39")=CONCAT$( "<rect transform='translate(150 150) rotate(",STR$(160 -s),")' x='0' y='0' width='100' height='100' rx='60'") FOR t = 0 TO wcount svg$= CONCAT$(svg$,image_pointer$(STR$(t))) NEXT HUG_IMAGE_PIXBUF_MOVE(svg_screen1) NEXT RETURN TRUE END FUNCTION
Snakes
'Snakes FOR s = 0 TO 100000 STEP MOUSE(0) svg$="" image_pointer$("5")=CONCAT$( "<rect transform='translate(100 100) rotate(",STR$(s),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("7")=CONCAT$( "<rect transform='translate(330 150) rotate(",STR$(-s),")' x='0' y='0' width='80' height='40' rx='60'") image_pointer$("9")=CONCAT$( "<rect transform='translate(100 120) rotate(",STR$(s+20),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("11")=CONCAT$( "<rect transform='translate(320 170) rotate(",STR$(20 -s),")' x='0' y='0' width='80' height='40' rx='60'") image_pointer$("13")=CONCAT$( "<rect transform='translate(100 140) rotate(",STR$(s+40),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("15")=CONCAT$( "<rect transform='translate(320 190) rotate(",STR$(40 -s),")' x='0' y='0' width='80' height='40' rx='60'") image_pointer$("17")=CONCAT$( "<rect transform='translate(100 160) rotate(",STR$(s+60),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("19")=CONCAT$( "<rect transform='translate(320 210) rotate(",STR$(60 -s),")' x='0' y='0' width='80' height='40' rx='60'") image_pointer$("21")=CONCAT$( "<rect transform='translate(100 180) rotate(",STR$(s+80),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("23")=CONCAT$( "<rect transform='translate(320 230) rotate(",STR$(80 -s),")' x='0' y='0' width='80' height='40' rx='60'") image_pointer$("25")=CONCAT$( "<rect transform='translate(100 200) rotate(",STR$(s+100),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("27")=CONCAT$( "<rect transform='translate(320 250) rotate(",STR$(100 -s),")' x='0' y='0' width='80' height='40' rx='60'") image_pointer$("29")=CONCAT$( "<rect transform='translate(100 220) rotate(",STR$(s+120),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("31")=CONCAT$( "<rect transform='translate(320 270) rotate(",STR$(120 -s),")' x='0' y='0' width='80' height='40' rx='60'") image_pointer$("33")=CONCAT$( "<rect transform='translate(100 240) rotate(",STR$(s+140),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("35")=CONCAT$( "<rect transform='translate(320 290) rotate(",STR$(140 -s),")' x='0' y='0' width='80' height='40' rx='60'") image_pointer$("37")=CONCAT$( "<rect transform='translate(100 260) rotate(",STR$(s + 160),")' x='0' y='0' width='100' height='100' rx='60'") image_pointer$("39")=CONCAT$( "<rect transform='translate(320 310) rotate(",STR$(160 -s),")' x='0' y='0' width='80' height='40' rx='60'") FOR t = 0 TO wcount svg$= CONCAT$(svg$,image_pointer$(STR$(t))) NEXT HUG_IMAGE_PIXBUF_MOVE(svg_screen1) NEXT
Have fun and regards
Alex
|
|
|
Post by alexfish on Jan 7, 2013 14:56:00 GMT 1
Lunatic
A long time ago nutty scientist designed a rocket with the notion of flighing it to the moon, unfortunatly the the guidance system did not know left from right. or anything else for that matter!
The object of the game is to fligh the rocket to the top left of the screen then land it back in the bottom right of the screen. Can't see the moon Pretend it is cloudy,,, or make one...
keeping the rocket in view at all times
finding a specific cordinate X will help with take off , return and landing.
The Rocket , What it's a big one, it was the only he built .
<svg width='500' height='500' id='svg2'>
<image xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABcCAIAAACp/9+eAAAAA3NCSVQICAjb4U/gAAAgAElEQVR4 nNW8d7hdV3Uv+htjzrnW7qdXHXVZvbkIywXbMrYxtoEQTAsGgomBhNDyyL1ALhfd5CUhlyS8UEIw xtx8pEBsurGxscFFLki2ZXXJktXLaTptn733WmuW8f7YkhAQEvsFm+/N73x7n7K/s9ZvjjHHGL9R FonIOA7mpewyKUWtsBopACBAtIgALMJCIAAEIhAsPMPHSFgsB4EKCAYckJWgIwRyXhrTFEXQBmxA Cr+5RSLSwFjDNlp1u6QgpynSPvjJ6tSzzz27ZffWbbu2jY2NtbW0Llu8dOXiVfNmzGtra4sLUSKB jQokGXkCImgGcQghs5FiVux95jMXFcsA/YYRToaJPOV9kuV1FIRGRo7f9eAPb//6Pz721BPIAxoI RAJxggZmd8++6NxL3vTmN65Zc0GxFDmftRVaCRTSoOMSBAKIQhJ8LUkqhaIB+DeIr4kwAShIDPis Njxy5Navf3X9Zz7NRVb9GvNBs43Ox9zI/LEs7IUf9L7uJeC85Ss/8gcffMXaKzoqXZw478DFEmkN proXGPIAC/KE36SONhG6gMZ0KBbk6LFnb/2nL/35Z/9OzVVdr+nuWTcr64YrBCW+FKiQCk/6E8+N ndg2nmzN7G4rQ/LGV9zwRze/f9Gq81vbW6tjQ7n2Cufy06kzJoYgOBRzv1EdbSJEikYK0bXbv/EP 7//oR/RSNeP63jmvm304f7JaSVNjSVzeSSFDlEBzwWSlxt705KMT0w9MpzuT2ZW+t7/+prff9I7Z CxfoiJ1zSsfOI1iJc6ds028a4RhCUbbu2/aqm64asWP9b+uef+PAkcLgeGsyFdWccgQoH4wLkSgh Zevo5R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+by9dcGH46ISoQ9yAIBEhACxCNikMtXAhlxUi0UprTa857fbym2MqsQ53jjE0+/7a3v3br94FTd ZsF7SQTJ2SbnbMX6j5dav369EIIPIlCsxk+O3n3Xj1gVr71unskPMtX4Z/rOACGIUvnWjrmpq+7a Wt33nJ+uT0H31nzv4Yl445GJbz1+dDKmG95QedOberWZIu1BgRDolFUgAEKelDiBorgRrEJI0slz 5izbtnXquefSLBMd9Q8fdw/85MnV562cNbMNVGPKmBgwaBoDgJ4f11Lr16+33mmtgxetTZY2fnTf D5yVtZd2dPVNEVXp5xF65xgciPv6+xqNdGrCbtuVHj+Op3ZO7TyR3LfnUM9ife66GW//vZmzZkRK iSUIcfNmqLntHIL4AJU4IlJEkllXjHJacrPnzbrjm0dtpirF1WnSOzbqNz31yLJz58yYWWBKmQxJ BKjmyaLnZWig1q9fX61PxVHMpEgoMvHuHTt37941a45efm6kdK259QSCBCJiTY6yRmhUyvkVK7rn z1N22kdFG7VW8zNV35LiVW/qefeHrmhtzRsu1KYloBh8zJQnikQYDHCAQiY+0jogGIq1KMO5LHUd 3QNHj03+9NFalvS0t6yt1fXYyeObtzy6avWcru4WowxBEwzOlMSeB0ISkYatax3DK289if3OHXe8 5903v+JVlb/54uy+3pPenSTYWJH4jFlDIYVrBBDlc1QxoRDGJB3zJ0YmKn2z0dHNudbpKXdi3+TY ITU1UeNc0taRLFpa7OzRbKqixogmlPKCQGAFrXxEohECkK+H7u27ul657v7JqWVdrW+aqumMDga3 edEK/+m//cgrXn6R4bzhVu8MBEo/r+qyWr9+PSux3hvWIUAbrk7Vfnz/g4kdX31ey+w5FY8pTZbJ kyImgYCENchQIEqJpk1UjYq1jgFTlyRqnX34QPKTb+7/9pee/O5tB35859FH7x3ctXl0fDAj1dHR 1eWUS2mKVWCIgighFgUhUAAh85LL9z61afC5fVma9bW0LLa2AMqNjhzbt3/3wkUD/TO6FGnvFQIr 9bwRupBCODg2hlmRUmpkaOTRxzdU2vSal/UW81aQSPDMIAE5xSHW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ik9XpdqWbMQE2EZ9ACRGQI EWCIDLP+Vc/fOLu69quK4j/X9qhIX/eqawcGyl4Oh3Aiy8aNKvgsUtKm0IYQee9PDB0hJmMUnQmV CERknc1sZoxSWv3SJQggZn71q1994YUX3nnnnYODg2eH17/ixvh0NPYrK/ovdFqVQuDVq1cvWNgT RRM2HNO62mjUIlTYVZS0Imgf/PHjB4hwakKECKdONdI0bZK9ppf7d1dLS8snP/nJ4eHhDRs25HI5 Imoq6v/n9YLncYlVuVK64hXnd3RmHgfj3IQLU4VIwzMHDU/Bu4nJQUEm8EHOBBwgokajkSRJLpdr UqF/526YR0dHL7744jvvvPPSSy/Nsuy/PjT8whESgXDdq6/omxULjjQa+2JOnE0ggQVKCAgSnIg9 XW9uUlAQUZIkaZrmcjljzK/656VSKYqiq666qqenxznXZIMvKUIEEDBnRs81161taatbtyNnTvhw QiPR0hylkVNTaM1nEpzlhLIsy7IsjuP/QEubSymVy+Wa7F49n76gX71eIMJmbVvgkb3tbTcOzC6C D3vsjKNDio5rnjDKMqFcaKHTk9Kno1oB0KSq/8EzFZqBy5nPa61/lT6/aAgBZjjvFMWzBma+6/fe 0j8Q1bKHVH5TrrI9YLt3g6VyS0/3gLMKIIE0YxGcDsFCCP+BDJsuoWlCm7vQzDv9VxC+wLFNAoAs y3RMOV163Wuu373j2Ne+esf41HhEh8qFUr1xIofGK6++zmglyII4EaVU1JyHWbNmzfr163t7e+M4 /s8v9Wsa8zplBl7AEnjvRTWYKEhux459X7n9S//yz9+ZGG4RMoLJObP7nnj8/lIZgol8IXZWAbpJ 289Qof/i0XqBN/wCV5Zlzlkv6djESCPJnA9HTmy7/R//pqtjdqxnXfSyG75150PeinfeumqQqnNp kiTee2ttrVZL0/RMhvelWS9YhgIRCRAhUqeKcDQkknnfOTpUV5ra29uqUyi3gFTDSWaoSGQAeO+b YmwesJfsCTwvXEv//7Z+s0+LeynW/wu0TtbvU1jjGwAAAABJRU5ErkJggg== ' x='337.5' y='486.36218' width='63.57143' height='83.428574' transform='rotate(30)' id='image3047' /> </svg>
The Guidance system
' ***************************************************************** ' Lunatic ' Build bacon 29beta hug82 ' Alexfish BaCon Converter.org ' LICENSE: GPL version 3 or later ' This program comes with ABSOLUTELY NO WARRANTY '****************************************************** ' WARNING *****This Can have a no effect exept drive you mad ******* '****************************************************** ' *****************************************************************
INCLUDE hug.bac
gtk$ = HUGLIB$("gtk") gdk$ = HUGLIB$("gdk") CONST rsvg$ = "librsvg-2.so" IMPORT "gtk_image_set_from_pixbuf(long,long)" FROM gtk$ TYPE void IMPORT "rsvg_init()" FROM rsvg$ TYPE void IMPORT "rsvg_term()" FROM rsvg$ TYPE void IMPORT "rsvg_handle_new()" FROM rsvg$ TYPE long IMPORT "rsvg_handle_write(long,char*,long,int)" FROM rsvg$ TYPE int IMPORT "rsvg_handle_close(long,int)" FROM rsvg$ TYPE int IMPORT "rsvg_handle_get_pixbuf(long)" FROM rsvg$ TYPE long IMPORT "gtk_image_new_from_pixbuf(long)" FROM gtk$ TYPE long IMPORT "gdk_pixbuf_get_width(long)" FROM "libgdk_pixbuf-2.0.so.0" TYPE int IMPORT "gdk_pixbuf_get_height(long)" FROM "libgdk_pixbuf-2.0.so.0" TYPE int IMPORT "rsvg_handle_new_from_file(char*)" FROM rsvg$ TYPE long DECLARE image_pointer$ ASSOC STRING svg$=""
FUNCTION HUG_IMAGE_PIXBUF_MOVE(NUMBER hug_widget) LOCAL image,myimage,ebox rsvg_init() mysvg = rsvg_handle_new() svi = rsvg_handle_write(mysvg,svg$, LEN(svg$), 0) svi = rsvg_handle_close(mysvg, 0) mypix = rsvg_handle_get_pixbuf(mysvg) rsvg_term() image = hug_widget_font(STR$(hug_widget)) gtk_image_set_from_pixbuf(image, mypix) gtk_widget_queue_draw(image) g_object_unref(mysvg) g_object_unref(mypix) SYNC RETURN TRUE END FUNCTION
FUNCTION EVENT_IMAGE(STRING hug_file$, int hug_xsize, int hug_ysize)
LOCAL image, ebox
image = gtk_image_new_from_file(hug_file$) ebox = gtk_event_box_new() gtk_container_add(ebox, image) gtk_widget_queue_draw(image) gtk_widget_set_events(ebox, GDK_POINTER_MOTION_MASK | GDK_KEY_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_SCROLL_MASK ) g_signal_connect_data(ebox, "button-press-event", hug_mouse_event, 20, 0, 0) g_signal_connect_data(ebox, "button-release-event", hug_mouse_event, 40, 0, 0) g_signal_connect_data(ebox, "motion-notify-event", hug_mouse_event, 0, 0, 0) g_signal_connect_data(ebox, "leave-notify-event", hug_mouse_event, 30, 0, 0) g_signal_connect_data(ebox, "scroll-event", hug_mouse_event, 10, 0, G_CONNECT_AFTER) IF HUG_WIDGET_SHOW THEN gtk_widget_show_all(ebox)
hug_widget_xsize(STR$(ebox)) = hug_xsize hug_widget_ysize(STR$(ebox)) = hug_ysize hug_widget_signal(STR$(ebox)) = 4 hug_widget_s_widget(STR$(ebox)) = ebox
hug_widget_type$(STR$(ebox)) = "image" hug_widget_font(STR$(ebox)) = image hug_widget_focus(STR$(ebox)) = image
hug_widget_image$(STR$(ebox)) = hug_file$
RETURN ebox END FUNCTION
FUNCTION MOVE_SPRITE()
FOR x = 300 TO -300 STEP -1 svg$="" image_pointer$("202") = CONCAT$(" x='",STR$(x),"' ") image_pointer$("203") = CONCAT$(" y='",STR$(x),"' ") image_pointer$("204") = CONCAT$(" width='",STR$(x),"' ") image_pointer$("205") = CONCAT$(" height='",STR$(x),"' ")
image_pointer$("206") = CONCAT$(" transform='rotate(",STR$(MOUSE(0)),")' ")
FOR t = 0 TO wcount svg$= CONCAT$(svg$,image_pointer$(STR$(t))) NEXT HUG_IMAGE_PIXBUF_MOVE(svg_screen1) NEXT RETURN TRUE END FUNCTION SUB test_click IF MOUSE(2) = 1 THEN MOVE_SPRITE() END IF END SUB '@ ---------------------------------------------------------------- win = WINDOW("LUNATIC",500,500) wcount=0 svg$="" '@ path to the svg file change to where the file is saved ' OPEN "/home/<user>/Desktop/rocket.svg" FOR READING AS myfile 'OPEN "/home/alexfish/Desktop/rocket.svg" FOR READING AS myfile WHILE NOT(ENDFILE(myfile)) DO READLN txt$ FROM myfile image_pointer$(STR$(wcount))=txt$ INCR wcount WEND CLOSE FILE myfile FOR t = 0 TO wcount svg$= CONCAT$(svg$,image_pointer$(STR$(t))) NEXT PRINT image_pointer$("71") PRINT image_pointer$("72") PRINT image_pointer$("73") PRINT image_pointer$("74") PRINT image_pointer$("75") svg_screen1=EVENT_IMAGE("",500,500) ATTACH(win,svg_screen1,0,0) CALLBACK(svg_screen1,test_click) HUG_IMAGE_PIXBUF_MOVE(svg_screen1) DISPLAY
'@ END OF ALL THAT
Have fun and regards
Alex
|
|
|
Post by alexfish on Feb 16, 2013 23:36:22 GMT 1
Rad demo update::
The rad tool as in Alexrad now named Axl-Rada
The Front end is almost Complete.
the editor has two modes for sizing and place the widgets , 1 as the orignal , 2 updated drag and drop type feature , this will alleviate time lag with slow processors an graphics cards , have been testing this on a bog standard Intel Atom and proved to be fast.
Now just one window "No panes" and Integrates well with Unity See screen shot
the gray Layout editor is to the right,
most of the widgets will be axl-rada's own , or in principle can use any graphic(svg) but can embed other images , can achieved using inkscape can implement most svg functions' these can be written into the event callback event , since each has its own buffer.
can also implement several of gtk's widgets.
each widget has it own scritable callback function and is live once it is registered , the script can be of any language , IE write it in bacon it will use bacon , write it in python then it will use python , script it in scriba the it will use scriba and so on
the white editor to left of layout editor is a sample of the callback code in bacon + the resut of the execution , there is no compilation time once the callback is registered ,
the backdrop has emeded images , done this to show off
I am hope to get this out as a testing version in approx 4 to 6 weeks, the estimated time needed to implement save and load routines.
will still be implementing the Write back functions for using hug as in the original demo
BR
Alex
|
|
|
Post by alexfish on Mar 5, 2013 17:56:38 GMT 1
Have sorted the substitution using glyph font the screen shot shows the edit2 with code and the result is shown in edit 1 where edit 1 is all SVG on the image. example code: glyph substitution for svg SPLIT my_txt$ BY NL$ TO new$ SIZE new newtext$="" '<> np$=REPLACE$(new$[0],"<","<") np$=REPLACE$(np$,">",">") newtext$=CONCAT$(newtext$,"<tspan x='2'>",NL$,np$,NL$,"</tspan>",NL$) FOR t = 1 TO new -1 np$=REPLACE$(new$[t],"<","<") np$=REPLACE$(np$,">",">") newtext$=CONCAT$(newtext$,"<tspan x='2' dy='18'>",np$,NL$,"</tspan>",NL$) NEXT
BR Alex Attachments:
|
|
|
Post by alexfish on Mar 15, 2013 15:06:23 GMT 1
Yep, Another update:
Possibly Notice a few posts in the Bacon forum Relating how to customise the widgets.
Some of them relate to how Axl-Rada will work , had a tough time getting a workable solution for the EDITABLE Tree view or some including my self call it Grid view.
So from a BaCon Aspect can Customise your apps Textually right now , Also have a look at Vovchik's Recent posts , very Impressive work.
So in essence I am , way way behind.
but have also introduced a possible solution "visual" for Tab Note Book "classed as a container" see screen shot, still have to add the tree view for editing.
Athough not complete , functions well , each can separate , and each can be minimised , ideal for small foot prints.
The Hlink works well but done away with the Traditional in screen editing "hay ways to slow for this kind of work" and opted for the drag and drop , the see screen shot , some of the widgets are axl-rada and some are linked external files ,one of them has been posted in forum, but each area of the can have a defined call-back , as some would say Event box.
Getting There , but Late as Usual.
BR
Alex
|
|