View previous topic :: View next topic |
Author |
Message |
simon
Joined: 05 Jul 2006 Posts: 270
|
Posted: Thu Jun 30, 2022 12:46 am Post subject: draw_filled_rectangle$ and SVG files |
|
|
If I draw an image that was created using draw_filled_rectangle$ after calling open_svg1, the shading appears on the screen briefly, and is not written to the SVG file? Is that because SVG is a vector graphics format? Should I be disabling all my draw_filled_rectangle$ calls when writing to an SVG file? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8018 Location: Salford, UK
|
Posted: Thu Jun 30, 2022 7:19 am Post subject: |
|
|
It looks like draw_filled_rectangle$ has not been implemented for SVG.
You could use draw_filled_rectangleD$ or draw_polyline$.
draw_filled_rectangleD$ is like draw_filled_rectangle$ but the co-ordinates are double precision. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2393 Location: Yateley, Hants, UK
|
Posted: Thu Jun 30, 2022 10:59 am Post subject: |
|
|
Simon,
For decades I used HPGL as a medium of exchange for vector graphics, but on discovering SVG I thought that it had considerably more merit. My own experience with SVG has been disappointing, both with codes I wrote myself to generate SVG files and with the facilities in FTN95/CW+. In the first case it has been about both scaling and resolution, and in the second, because I have found that there are very few options to read SVG files (because their format is difficult to read - well, to me anyway - ruling them out as a medium of exchange by my programs). Other applications that can purportedly read SVG include my original target for reading them which is CorelDRAW!, which turns out to have limitations on the complexity of files it can read, and thus is useless.
In short, after a very great deal of time and effort, I came to the conclusion that for me, SVG was about as useful as a chocolate teapot. While accepting that my conclusion applies only to me and probably not to anyone else, I'd be delighted to know what others who do find it useful actually use it for.
Incidentally, chocolate teapots are OK for dispensing iced tea, if not for brewing it in the first place, which only goes to show that uselessness in one context does not necessarily mean in all!
Eddie |
|
Back to top |
|
|
simon
Joined: 05 Jul 2006 Posts: 270
|
Posted: Thu Jun 30, 2022 7:28 pm Post subject: |
|
|
Thanks, both, for the responses.
Paul - after some simple experimentation, it seems that draw_filled_rectangleD$ takes coordinates as pixels (i.e., simply a double precision representation of the draw_filled_rectangle$ arguments). But I still get the same problem - the shading is printed on the screen for a brief moment, but does not appear in the SVG file.
Eddie - I have very little experience with SVG files. I was implementing it because a few users want a vector graphics format, and it is currently the only option from ClearWin+. Personally, I tend to use postscript files, but only because I can edit them in Adobe Illustrator very easily. Chocolate in virtually any form is always useful, or at least welcome! |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8018 Location: Salford, UK
|
Posted: Fri Jul 01, 2022 6:48 am Post subject: |
|
|
Simon
Can you provide simple sample code so that I can step through the ClearWin+ library code. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2393 Location: Yateley, Hants, UK
|
Posted: Fri Jul 01, 2022 1:21 pm Post subject: |
|
|
Simon,
SVG files are easy to write yourself. If you PM me your e mail, I'll send you my SVG version of the graphics primitives - although apologies, they aren't terribly sophisticated!
Eddie |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8018 Location: Salford, UK
|
Posted: Sat Jul 02, 2022 6:35 am Post subject: |
|
|
Simon
We have identified a failure with draw_filled_rectangle@/$ so we probably don't need some sample code.
I have not tested with draw_polyline$ to see if that works. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8018 Location: Salford, UK
|
Posted: Fri Jul 08, 2022 8:41 am Post subject: |
|
|
The SVG failure with draw_filled_rectangle@/$ has now been fixed for the next release of the DLLs. |
|
Back to top |
|
|
|