Recent

Author Topic: Can't compile fviewer example  (Read 9023 times)

BlueIcaro

  • Hero Member
  • *****
  • Posts: 576
Can't compile fviewer example
« on: August 19, 2012, 01:49:57 pm »
Hello I'm trying to compile the last fpviewer dowloaded from svn, and I got this error:
Quote
fpvv_mainform.pas(244,14) Error: Identifier not found "TvFormula"

I was looking for the definition of TvFormula throught the files and I didn't find it.

I using the last official release of Lazarus 1.0 RC1.

Any idea?

/BlueIcaro
Remenber, the lazarus wiki is your friend: http://wiki.lazarus.freepascal.org/Main_Page
General questions (several lenguages) http://wiki.lazarus.freepascal.org/

reinerr

  • New Member
  • *
  • Posts: 37
Re: Can't compile fviewer example
« Reply #1 on: October 29, 2012, 12:49:13 am »
fpvv_mainform.pas(244,14) Error: Identifier not found "TvFormula"

A couple of months passed but still valid...

I have same problem (now with Laz 1.0.2). My solution was to comment out that line (as well as the next error a couple of lines down). All this means is the View FPVectorial Tokens button won't work... but I couldn't open any dxf files properly anyway after that (either they display erroneous marks/dot or they crash on load for more complex files).

EDIT: green_rect_arrow_text.dxf opens ok
« Last Edit: October 29, 2012, 01:01:22 am by reinerr »

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Re: Can't compile fviewer example
« Reply #2 on: October 30, 2012, 08:52:09 pm »
The example is kept in synchrony with the latest Lazarus SVN sources, not with older releases like 1.0

CM630

  • Hero Member
  • *****
  • Posts: 858
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: Can't compile fviewer example
« Reply #3 on: February 18, 2014, 10:09:15 am »
.I do try to compile fpvviewer.
I got it from here: https://svn.code.sf.net/p/lazarus-ccr/svn/applications/fpvviewer/
And I took fpvvectrorial.lpk from here: http://code.ohloh.net/project?pid=inrG8KdJiUI&did=components%2Ffpvectorial&cid=sIQrfQPsIho&fp=301989&projSelected=true


When I try to compile the app, I get the following error:
fpvv_mainform.pas(137,51) Error: identifier idents no member "GetPageAsVectorial" several times.

The content of one of the lines is: if checkForceWhiteBackground.Checked then Vec.GetPageAsVectorial(0).BackgroundColor := colWhite;
I get yet another error: fpvv_mainform.pas(337,19) Error: Identifier not found "TvPage"
on linelCurPage: TvPage;


Is GetPageAsVectorial an obsolete property?
Or could someone give me a working example on displaying a SVG or converting it to a raster image? Wiki examples are too far away from working, too.

EDIT: I replaced  GetPageAsVectorial(0) with GatPage(0) and TvPage withTvVectorialPage.

I tried to replace lCurPage.CalculateDocumentSize(); with lCurPage.GuessDocumentSize();  but it did not recognize GuessDocumentSize.
So, now when I load a document a press the Visualize button I see something. I have created an ellipse with InkScape, but I see a filled arc, instead.
I have attached the SVG file, if someone finds it useful.
« Last Edit: February 18, 2014, 11:00:14 am by paskal »
Лазар 1,8,2;W7 64bit or XP 32bit;FPC3,0,4;rev 57369

djzepi

  • New Member
  • *
  • Posts: 36
Re: Can't compile fviewer example
« Reply #4 on: February 18, 2014, 08:46:05 pm »

So, now when I load a document a press the Visualize button I see something. I have created an ellipse with InkScape, but I see a filled arc, instead.
I have attached the SVG file, if someone finds it useful.

I looked like this (see attachment)

CM630

  • Hero Member
  • *****
  • Posts: 858
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: Can't compile fviewer example
« Reply #5 on: February 19, 2014, 09:53:36 am »
Okay, finally I did it.

I am not sure what exactly happened, but when I manually added (open file) fpvectorial.pas (the file I downloaded from the repository) from the Lazarus IDE and added it top the project everthing went fine and I got the same image as *djzepi. Obviously there is a still a bug in the renderer, but it's much better.
Unfortunately gradients cannot be handled yet :(
« Last Edit: February 19, 2014, 10:29:18 am by paskal »
Лазар 1,8,2;W7 64bit or XP 32bit;FPC3,0,4;rev 57369

trayres

  • Jr. Member
  • **
  • Posts: 92
Re: Can't compile fviewer example
« Reply #6 on: January 04, 2015, 06:43:28 am »
I'm having the same issue with the current version and what's in the repository.