Hello,div or span and maybe some basic text ones.
I'd like to know if there's some kind of flexbox engine in pure tcl or as a C/C++ library.
What I'm looking for is a way to draw html elements in a tcl canvas, but I'm not really interested in parsing html because I don't care about html elements.
I'm only interested in an easy way to paint in a canvas, so I think the CSS flexbox model, also known as the box model, should be a great way to paint in a canvas, this will make a canvas just a CSS render engine. It should handle basic box types like
Defining a canvas screen as an html layout should be easy and I suppose it should be render engine available since html is in common use today. But a canvas able to read and paint SVG is also a great solution to the same problem.
I know actual canvas could generate a postscript representation of the canvas by using "postscript" command but I cannot find an import-postcript command or something like that.
I think something like:
canvas html read html-file-or-string ; to write canvas content from html canvas html write html-file-or-sring ; to write canvas content to html
should be great (same for svg just replacling html for svg)
you are talking about floating parts in from Postscriptlike div or span and maybe some basic text ones.
and making them appear on the canvas for editing etc...
a reverse of:
% canvas .can123
% .can123 postscript
interesting...interesting... I will make a start on it in 1 month... (after looking around for an equivalent...)
my friend... thanks
/c:202115102308:03
On Saturday, November 7, 2020 at 9:16:55 PM UTC, pd wrote:
Hello,
I'd like to know if there's some kind of flexbox engine in pure tcl or as a C/C++ library.
What I'm looking for is a way to draw html elements in a tcl canvas, but I'm not really interested in parsing html because I don't care about html elements.
I'm only interested in an easy way to paint in a canvas, so I think the CSS flexbox model, also known as the box model, should be a great way to paint in a canvas, this will make a canvas just a CSS render engine. It should handle basic box types
Defining a canvas screen as an html layout should be easy and I suppose it should be render engine available since html is in common use today. But a canvas able to read and paint SVG is also a great solution to the same problem.
I know actual canvas could generate a postscript representation of the canvas by using "postscript" command but I cannot find an import-postcript command or something like that.
I think something like:
canvas html read html-file-or-string ; to write canvas content from html canvas html write html-file-or-sring ; to write canvas content to html
should be great (same for svg just replacling html for svg)
having had the night to dream of it...
it's a big ask... in that what is required is a full postscript (special
full blown printing language like Fortran) parser...
-- i have managed to get a java equivalent though... and with jacl
i could get that going...
i will keep at it...
& top of the mornin' to you all..
Kind Regards
/c:20211510~10:20)2
######### ######## ######## ######## #########
# display postscript image in Tcl kinda...
# Creator -- conor.w...@gmail.com
######### ######## ######## ######## #########
set filename "1.png"
set img [image create photo img -file $filename]
canvas .con
.con create image 0 0 -anchor nw -image $img
pack .con
update
set fd [open "file2.ps" w]
puts $fd [.con postscript]
close $fd
exec ghostscript file2.ps
########
#EOF
#######
Am 15.10.21 um 12:18 schrieb Conor Williams:
having had the night to dream of it...ps to tk-canvas is needed if you want to manipulate
it's a big ask... in that what is required is a full postscript (special
full blown printing language like Fortran) parser...
-- i have managed to get a java equivalent though... and with jacl
i could get that going...
i will keep at it...
& top of the mornin' to you all..
Kind Regards
/c:20211510~10:20)2
the tk-canvas code afterwards, right?
embed a window that renders ps via gs ?
Uwe
######### ######## ######## ######## #########
# display postscript image in Tcl
# utilises external convertor (pstopnm) -- leaves dir))
# Creator -- conor.williams@gmail.com
http://netpbm.sourceforge.net/
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 285 |
Nodes: | 16 (2 / 14) |
Uptime: | 29:14:42 |
Calls: | 6,448 |
Files: | 12,050 |
Messages: | 5,254,561 |