Recent

Author Topic: Simple Graph Port  (Read 18601 times)

taazz

  • Hero Member
  • *****
  • Posts: 5368
Simple Graph Port
« on: July 09, 2013, 06:32:34 pm »
I was trying to find the original thread that I start posting about the simple graph and I can't find it so I'm creating a new to keep you all informed about the progress.

I have just upload some changes at this point scrolling is fixed and is working here for me on QT, GTK2 and win32. I have disabled the ability to include background images on none win32 widget sets it create a lot of headaches for me and is something I do not need so after everything works as expected I might take an other look at it.

Problems remaining to be solved are
1) On GTK2 and function PtInRegion returns always false for some odd reason that breaks the drag and move abilities of the classes I have patched the rectangularNode to be able to respond correctly so at least I could finish the scrolling debugging the odd thing is that since the text of the classes have their own mouse detection if you give them a caption to show you can use it to move them around.

2) the GraphLink text out needs work, gtk2 and QT do not support some of the text out abilities that windows have and especially the bottom center alignment which is used to place the text on the line. I have no idea how to address this problem I'm thinking to use cairo/pango or aggpas to fake it but if there is an easier way around it I would prefer to take it.

After those 2 problem are solved a first stable release will be made and everything else will be put on a back burner unless a show stopper bug appears.

link : https://sourceforge.net/projects/evssimplegraph/

PS.
The cursors.res has been reworked to avoid invisible on screen cursors I would appreciate some feedback if they work on linux.
« Last Edit: July 09, 2013, 06:36:23 pm by taazz »
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Simple Graph Port
« Reply #1 on: July 11, 2013, 04:50:39 am »
Just committed the corrections for the text placement on the graphlink. Now it should be rotated and follow the line correctly.

I'd appreciate any feed back from interested linux users. How does it work on linux?
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Simple Graph Port
« Reply #2 on: July 12, 2013, 12:10:14 am »
hello Taazz,

with your link : https://sourceforge.net/projects/evssimplegraph/

we can load 3rdParty.rar but this file doen't contain simplegraph. We can find inside rkVistaProBar.pas and uevssplitter.pas.

If we browse code section of the link, we can find uevssimplegraph.pas. how to use it ? Project in demo folder doen't compile because uevs components dependancies.
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Simple Graph Port
« Reply #3 on: July 12, 2013, 12:38:30 am »
I apologize for the inconvenience, I was so much light headed trying to find the region problems that I forgot to clean up afterwards. For starters you can safely remove all the file and forms that require any package other than lcl defaults. They are there by mistake. I will clean up everything and push a new version in the next 20 minutes. I'll try to include a new archive as well but the repo will be cleaned asap.

Let me add that the new version which I will push in the next 20 minutes have corrected all the problems I could see with Graphlink class and is dangerously close to the first stable beta.
The only think that does not work is the damn regions under gtk I would very much like to avoid writing ptInellipse, ptInRoundRect etc function my self, so I'm considering to drop support for GTK2 at this point and reconsider it when the LCL is able to support them especially the PtInRegion function.

Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Simple Graph Port
« Reply #4 on: July 12, 2013, 01:03:47 am »
OK done. You can redownload the simpleGraph_Demo.0.0.2.0.rar which has been replaced with a new clean demo application that will work out of the box or download from the repository both have been cleaned and ready for consumptions.

 :-[ I apologize once more there was no excuse for what happened.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Simple Graph Port
« Reply #5 on: July 12, 2013, 01:20:24 am »
it is better taazz   ;D but :
simplegraph unit is missing (unit UfrmSimpleGraphTest ->uses UEvsSimpleGraph, SimpleGraph;)
if i remove SimpleGraph and  procedure goDblClick2(Graph: TSimpleGraph; GraphObject: TGraphObject) i can compile but :
1 - Project options in demo project is  for QT build debug
2 - try to use win32_debug ( because qt dll error for me on windows 7) : debugger error on start when i launch the program.
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Simple Graph Port
« Reply #6 on: July 12, 2013, 01:57:10 am »
Thanks for input I've just removed the reference to the simplegraph and pushed a new commit to GIT. I have tested everything on win32 and QT before I pushed my previous commit and even now I do not see any errors. Please keep in mind that all the tests are done on the latest Release version and I haven't tested them on the trunk or patches branches of svn.

What kind of error do you get?
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Simple Graph Port
« Reply #7 on: July 12, 2013, 02:05:03 am »
the debugger error  with windows is gone . it was because  i used ui access in project options. i can run now the program.
I have tried the project on Ubuntu 12.04  64 bits gtk2 with GTK2_debug build. It is OK . In Attachments you can see a demo screen capture  when running the program.
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Simple Graph Port
« Reply #8 on: July 12, 2013, 02:13:19 am »
I see that you build it with GTK2 can you select the objects with simple click and move them around?
Is the speed of redraw while resizing/moving acceptable? In my windows 7 it is awful with gtk2 and I'm puzzled on how to address it.

Thank you for the feed back.

EDIT:

Wend back and enabled the UI access on the project options never paid any attention to its existence up until now. True the debugger goes in to a OOPS state and crashes, so I executed the exe directly from explore and I show the wanderful message of "A Referral was returned from the server" and the application closes. WTF! is that?
« Last Edit: July 12, 2013, 02:32:12 am by taazz »
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Simple Graph Port
« Reply #9 on: July 12, 2013, 02:35:33 am »
speed of  redraw while resizing/moving is acceptable for me (immediate with my cpu Q8300 2.5 Ghz). The only problem that i can see is when i move a graphlink . i can have a staircase ? alias ? effect (sorry english isn't my natural language). Maybe it is a grid problem. See I1 I2 graphlinks in attachments for the problem.
« Last Edit: July 12, 2013, 02:43:25 am by Jurassic Pork »
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Simple Graph Port
« Reply #10 on: July 12, 2013, 02:55:06 am »
Well if I understand correctly, what you describe is the lack of antialised drawing what you see is literaly the pixel line changing from y to y-1, there is not much I can do about the pixel position on screen, I think that QT is already antialised and handles it better. when the first stable version is released I'm going to see what I can do about that problem, I already have a solution in design for windows using GDI+ and its antialised capabilities, but for linux I'll need something else I don't know yet what. I have to find some time to spend on aggpas that comes lazarus and see if I can create a universal solution based on it instead of using platform specific library like GDI+ or Cairo. The final speed and easy of achiving higher speeds will be the deciding factor on this one, and when I say final speed I mean from vector to screen. I do not care to have a really fast from vector to raster and then loose all the speed from raster to screen.

Oh well got carried away sorry for the rant.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Simple Graph Port
« Reply #11 on: July 12, 2013, 05:16:45 am »
Just pushed a new commit. It contains some more clean up and a new Class TEvsBezierLink which is a bezier curved link. Be advised that it does not support poly bezier at this point it is only a single curve and you can't add or remove points as you can on the normal links. If you did not know you could then try to ctrl+click on a line to add a point or alt+click to add/remove points. The addition of points hasn't been tested yet, it might not work outside the window coordinates just test it with out any scroll bar visible to be safe.
« Last Edit: July 12, 2013, 10:49:16 am by taazz »
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Simple Graph Port
« Reply #12 on: July 12, 2013, 10:21:30 am »
Thanks for the hard work, Taazz - haven't tested your code but will certainly look into it whenever I need something that needs diagram support.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Simple Graph Port
« Reply #13 on: July 12, 2013, 10:54:41 am »
:) thanks. Next step convert the original demo so I can better debug the components stay tuned.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Simple Graph Port
« Reply #14 on: July 12, 2013, 12:49:52 pm »
The primary port of the original demo has been push to the repo. It works as it is if you comment out the registerclipboardformat call in the uevssimplegraph's unit initialization section. It currently has eveything enabled but as features are removed (eg zooming) then the corresponding features on the GUI will be removed as well.

Have fun and remember the component is in alpha state, every bug report, feature request helps to form its future.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

TinyPortal © 2005-2018