Cairo Canvas
Mar 14, 2020 21:04:08 GMT 1
Post by alexfish on Mar 14, 2020 21:04:08 GMT 1
Hi All
Thread Close
For Cairo go basic-converter.proboards.com/thread/1257/hug-imager
as some may know
created from this operator cairo_t *cr = gdk_cairo_create(widget->window);
some basic code was posted at the bugs section
the one thing I wanted to out of the way was pixbuf animation
a tricky one to resolve, hence some demo code to play a giff
other bits will follow as regards using the basic canvas to Widgets first been a poor mans terminal
then to display bacon http requests, bits of the parser have all ready been posted but there are more
BR
Alex
Under Reconstruction
June 1 2020::
FINAL TESTS COMPLETE
with reference to the above
Poor-Mans Terminal Now at Pre VTE stage
Decided to provide text-buffer render pango-cairo ->result a utf editor
Please read on past this post as to historical , can see the editor bits , and bits of the poor-mans terminal
I am now converting as much as possible to Bacon + if bits do not work esp the VTE then, these will have to
be code.c includes , but not sure ?
a screen-shot of the VTE compiling Bacon test.bac
and the copied text
Back as ASP
OK :: Now completed the Bridge
Testing
exception :: IN OUT as in reply is missing : It does work
so here trying to get colums & rows and display how many columns & rows capture the esc sequences
the rows and colums = 0,0 , so need to look at the attributes, previous tests produce garbage:
so the IO is working and the read rows&cols , 0,0 looks like hit.
and if can read the escape then cursor placement will work; that is built in
the code and results + results from working terminal
MyVte
the arrows are the esc start sequences
terminal
ADDED : final test to do RESET & hope I don't drift into outer Space Or
above all terminal bound :: does it launch and act as a terminal Yes:
And Final Proof of Concept :: launch From desktop launcher : with input and out-put
Update:: 4byte utf8 now working:
Example of copy from last char smiley = 4bytes
Final testing showing the terminal in use // had to take two screen show two screen shots of StockFish
To Demo Graphics on the Pseudo Terminal , now in progress of separating the two buffers
hence the code for Button is not in the code :
the code used without the graphs
Stockfish Chess
Back soon
and updated picks
Picky
Added copy text works,
from the terminal
BR
Alex
Thread Close
For Cairo go basic-converter.proboards.com/thread/1257/hug-imager
as some may know
created from this operator cairo_t *cr = gdk_cairo_create(widget->window);
some basic code was posted at the bugs section
the one thing I wanted to out of the way was pixbuf animation
a tricky one to resolve, hence some demo code to play a giff
other bits will follow as regards using the basic canvas to Widgets first been a poor mans terminal
then to display bacon http requests, bits of the parser have all ready been posted but there are more
BR
Alex
Under Reconstruction
June 1 2020::
FINAL TESTS COMPLETE
with reference to the above
Poor-Mans Terminal Now at Pre VTE stage
Decided to provide text-buffer render pango-cairo ->result a utf editor
Please read on past this post as to historical , can see the editor bits , and bits of the poor-mans terminal
I am now converting as much as possible to Bacon + if bits do not work esp the VTE then, these will have to
be code.c includes , but not sure ?
a screen-shot of the VTE compiling Bacon test.bac
and the copied text
'test.bac'...
Converting 'test.bac'... done, 4 lines were processed in 0.004 seconds.
Compiling 'test.bac'... cc
Back as ASP
OK :: Now completed the Bridge
Testing
exception :: IN OUT as in reply is missing : It does work
so here trying to get colums & rows and display how many columns & rows capture the esc sequences
the rows and colums = 0,0 , so need to look at the attributes, previous tests produce garbage:
so the IO is working and the read rows&cols , 0,0 looks like hit.
and if can read the escape then cursor placement will work; that is built in
the code and results + results from working terminal
CLEAR
PRINT "X,Y: ", COLUMNS, ",", ROWS
PRINT "I am here"
CURSOR DOWN 2
PRINT "...now I am here"
FOR x = 5 TO 10
GOTOXY x, x
PRINT "Hello world"
NEXT
GOTOXY 1, 12
MyVte
the arrows are the esc start sequences
./test
[2J[0;0fX,Y: 0,0
I am here
[2B...now I am here
[5;5HHello world
[6;6HHello world
[7;7HHello world
[8;8HHello world
[9;9HHello world
[10;10HHello world
[12;1H
terminal
X,Y: 111,26
I am here
...nHello worlde
Hello world
Hello world
Hello world
Hello world
Hello world
ADDED : final test to do RESET & hope I don't drift into outer Space Or
above all terminal bound :: does it launch and act as a terminal Yes:
And Final Proof of Concept :: launch From desktop launcher : with input and out-put
Update:: 4byte utf8 now working:
Example of copy from last char smiley = 4bytes
Hej, π
Hejβ¬, π
Final testing showing the terminal in use // had to take two screen show two screen shots of StockFish
To Demo Graphics on the Pseudo Terminal , now in progress of separating the two buffers
hence the code for Button is not in the code :
the code used without the graphs
Stockfish Chess
PRINT EXEC$("stockfish", "position fen rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR \
w KQkq - 0 1" & NL$ & \
"position startpos moves e2e4" & NL$ & \
"go" & NL$ & "d" & NL$ & "quit" & NL$)
PRINT "Press Enter to exit"
INPUT A$
Back soon
and updated picks
Picky
Added copy text works,
from the terminal
Stockfish 030914 by Tord Romstad, Marco Costalba and Joona Kiiski
+---+---+---+---+---+---+---+---+
| r | n | b | q | k | b | n | r |
+---+---+---+---+---+---+---+---+
| p | p | p | p | p | p | p | p |
+---+---+---+---+---+---+---+---+
| | | | | | | | |
+---+---+---+---+---+---+---+---+
| | | | | | | | |
+---+---+---+---+---+---+---+---+
| | | | | P | | | |
+---+---+---+---+---+---+---+---+
| | | | | | | | |
+---+---+---+---+---+---+---+---+
| P | P | P | P | | P | P | P |
+---+---+---+---+---+---+---+---+
| R | N | B | Q | K | B | N | R |
+---+---+---+---+---+---+---+---+
Fen: rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 1
Key: C180CCF16EBFB88B
Checkers:
Legal moves: a6 b6 c6 d6 e6 f6 g6 h6 a5 b5 c5 d5 e5 f5 g5 h5 Na6 Nc6 Nf6 Nh6
info nodes 0 time 3
bestmove a7a6 ponder (none)
Press Enter to exit
BR
Alex