Lazarus
Programming => Packages and Libraries => FPvectorial => Topic started by: huberte on May 01, 2012, 09:34:47 pm
-
Either the programm returns an unsupported graphic format for pdf or eps with visualize
or
http://tof.canardpc.com/view/3494fad6-9d89-4e31-991c-8d07c1290886.jpg
-
Hello, I haven't seen before this post as it is in the general section, I normally follow mostly more specific sections like "Android" or "FPSpreadsheet". Please attach your EPS file here or in a bug report.
Also, the best for testing is using "fpvviewer", which is located in the Lazarus-CCR/applications/fpvviewer as written here: http://wiki.lazarus.freepascal.org/fpvectorial#fpvviewer
Although indeed fpvectorialconvertor should be ok too for testing.
-
Pretty much kike the error mentioned in the first post (did u see the logscreen ?)
Here another one for fpviewer : http://tof.canardpc.com/view/e3806820-7d9e-41f4-a8e8-2e19525469c5.jpg
and a blank inkscape test file in attachment
-
Hello, please try with lazarus rev 37184 or superior. I implemented the missing operations but I still had an error in the useless final part of the file, so there I added a work around to give up parsing the useless end of the file from Inkscape.
-
OK, works with a blanck file. Dont work with a libre office draw eps wich I send you through pm.
Screenshot :
http://tof.canardpc.com/view/7b27c67d-3a7e-4b2b-8fde-aa7336bb76d8.jpg
Thks
-
I took a look at the file now, and I added support for many things which it uses and were missing: CurrentTransformationMatrix, matrix operations, more arithmetic operations, arrays, etc
But it still gets and error in line 57 in "tm", somehow it failled to mark "tm" to the dictionary. In line 55 there is:
/tm matrix currentmatrix def
But AFAIK this is wrong, it should be:
/tm {matrix currentmatrix} def
It would be nice if someone who knows PostScript very well could explain how "def" can work like that. It looks a really nasty syntax, as it lacks the {} for grouping the commands.
If I make this correction it still crashes in the very end in a loop in a very similar fashion to how it was crashing in the blank file. Well, I guess that this final looping will require some real attention. Just ignoring the problem won't be possible since this file here has the final loops before the comment %%Trailer
-
The problems in the end of the file also seam to be related to the syntax issue of:
/tm matrix currentmatrix def
-
Aha! I think I figured it out!
With this syntax:
/tm matrix currentmatrix def
It should execute matrix and currentmatrix and then run def against whatever is the result of those operations. With:
/tm {matrix currentmatrix} def
The procedure is stored ... I'll see if I can implement it like this.
-
Aha! I think I figured it out!
With this syntax:
/tm matrix currentmatrix def
It should execute matrix and currentmatrix and then run def against whatever is the result of those operations. With:
/tm {matrix currentmatrix} def
The procedure is stored ... I'll see if I can implement it like this.
Yep, the first defines tm as a matrix representing the current transformation. The second defines a procedure.
-
Going through the code my implementation was already doing everything related to "def" correctly, I guess I simply forgot how it worked =)
I only failed in the case of arrays, because I needed to add some extra code for the case of arrays which is a new type of element which I just added...
But even after fixing that it gets stuck elsewhere now...
Maybe you could try another application to generate the EPS. I am adding an example file which renders correctly, that radat.eps, into the example_files folder of fpvviewer and that one was made with OCAD
Another issue is that I don't know if LCL-CustomDrawn will be able to render the complexity of EPS 100% correctly, although we can always try. I checked here and rendering the EPS file freezes LCL-Carbon. In LCL-Qt it works more or less, although not 100%. From what I remember it works 100% correctly in LCL-Win32 and LCL-Gtk2
-
@huberte
Can I add that file to the examples folder for fpvviewer? Even if it doesn't render yet, it is always useful to have more tests.
-
Yes, well, OK, but only because it's you.... ;D
You think I can load an eps file in an android app with this ? But an eps that would be in the apk ?
Edit : I do have the latest trunk files for lazarus and lazarus-lcr
def_test.eps is crashing : division by zero when pressing visualise
ink-test.eps is crashing : [TvEPSVectorial.ProcessExrpressionToken] Unknown Postscript Command "0" in Line 72
You right. def test is rendering. i will wait for rendering eps on android till I find a solution.