Recent

Author Topic: Simple Graph Port  (Read 18600 times)

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Simple Graph Port
« Reply #15 on: July 12, 2013, 04:48:31 pm »
hello,
for this problem :
Quote
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?

you must never set uiaccess to true except for UI Accessibility Applications. But in this case read this :
Quote
UI Accessibility Applications can bypass UIPI by setting their "uiAccess" value to TRUE as part of their manifest file. This requires the application to be in the Program Files or Windows directory, as well as to be signed by a valid code signing authority.

Friendly, J.P
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 #16 on: July 12, 2013, 11:42:40 pm »
Original Demo cleaned up and pushed on the repo, you can now downloaded from the pre-Release section as well. Next copy/paste.
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 #17 on: July 14, 2013, 11:27:22 pm »
Lots of work the past 2 days. The original demo keeps giving me random errors on the initialization section of the uevssimplegraph.pas unit so I started transforming my debug/demo app to look and act the same as the original demo. A few minor bugs have been corrected. a Major regression of the scroll while dragging abilities has now been fixed. I have a first alpha of a GDI+ Canvas for windows based on the http://www.progdigy.com header translation. Its giving me a lot of headaches at the moment, by the way any one has subclasses the TCotrolCanvas? Any hints on what needs to be preserved or what can be safely overridden? This one I'm not planning to release since it is windows only, so just a heads up nothing to get from the repo.
Only on repo at this time the files section will be updated in the next 20 minutes.

Any ideas what to do with the GTK2 lack of support for the ptInRegion function? Is it something that is not supported from the GDK_Region_XXXXX functions or is it an over-site of LCL?
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 #18 on: July 15, 2013, 05:58:43 am »
New Commit, some cleanup reworked some internals to avoid external sigsegv errors and fixed the background painting, it is now working on all 3 platforms. Repo is up to date and the a new archive at the pre-release section of the files is added. PtInRegion on GTK2 still does not work.
I also uploaded a screen shot with the experimental GDI+ canvas at work.
« Last Edit: July 15, 2013, 06:01:06 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

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Simple Graph Port
« Reply #19 on: July 15, 2013, 10:22:13 pm »
OK. Components have been cleaned up. All calls to API have been changed to canvas calls except some measurement procedures which paint nothing. This will enable us to use any kind of canvas for drawing including svg canvas if any one cares to create one. I have downloaded the lmf files from the bugtracker by Anton Kavalenka which can be used as an intermediate between graph and printer or at least thats the reasoning behind me downloading them. I'm going to push the new version on repo in a few minutes mark it as beta and wait for the community's input before going for a stable release. There are a couple of things I'd like to add but I do not need them in my current development so I'll let you decide what to implement first. So here are the features in no particular order that I'm thinking

1) Printing.
2) Undo.
3) Layers.
4) Zoom.
5) Class Diagram node.
6) Dot language import/export
7) GraphViz layout support.

Re arrange them remove what ever you don't need and post a reply with what you want to see implemented. I wish SF had a poll tool or something.
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 #20 on: July 16, 2013, 08:51:11 am »
New component added to 3rd party folder in repo. It is a ruler component to be used along side with the SimpleGraph requires more work but a preliminary port is ready it now compiles and run with out SIGSEGV or other problems of that type it would be easy from here on to correct some small misbehavior I noticed but I do not care to much about.
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 #21 on: July 16, 2013, 10:04:58 am »
Not using the components yet, but I'd think these features could be useful
Interoperability:
1) Dot language import/export
2) GraphViz layout support.
3) Class Diagram node.
4) Printing.
The rest I wouldn't care too much about I'd think:
5) Zoom.
6) Layers.
7) Undo.
Thanks!
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 #22 on: July 16, 2013, 10:45:41 am »
first of all thanks for the feed back. I appreciate it.

Now for printing support, since Lazarus lacks of a proper vector type of TGraphic descendant it will be a pain in the behind with out zoom support. All the windows printing subsystem is depended on metafile for a reason it is easily stretched to cover the difference in DPI between screen and printer. Knowing this I have 2 options either hope that the lcl developers would create something that I can use be it Tmetafile or zoom in the canvas or do it my self. in the second case I can only add zooming to Simple Graph component and if I do that then it would be a simple case to allow on screen zoom as well.

In any case your preference is recorded and the excel poll I'm keeping awaits for more votes.

As a side not I finally decided to post in this thread only for major changes like "printing is now supported" and keep the rest of the rand in a blog at the SF site. I'd hate to be kicked from the forums for noise pollution :P .
« Last Edit: July 16, 2013, 10:47:13 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 #23 on: July 16, 2013, 10:52:47 am »
Thanks.

(Not knowing anything about printing, canvas etc, so please take the below with a couple of pinches of salt)
Having the Laz devs come up with some general solution of course sounds inviting, but.... if they don't do it, nothing happens ;)
Might be best if you write some proof of concept/demonstration code that works for graph and might be generalized.

Good idea about the blog - interested to read about your adventures.
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 #24 on: July 16, 2013, 11:06:14 am »
Funny thing I was thinking in similar terms not so much of a proof of concept type of project as of a generic canvas that will support world /logical coordinates and will be able to map them correctly on the attached DC be it a bitmap or a window on the screen.

This will help remove some of the new code in the Nodes and links and make them independent from the screen that they have become. I might have some time this weekend to create it. Then it can be used as a proof of concept too, but I am a bit insecure about creating a proposal for the team at this point in time.
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 #25 on: July 16, 2013, 11:18:53 am »
I wouldn't be insecure if I were you.

Even if it wouldn't work because of big flaws, presenting the concept and an idea for implementation may serve to inspire the devs to create something usable for your purposes.
You could float your idea on the Lazarus mailing list as well where a lot of Laz devs hang out.
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 #26 on: July 23, 2013, 08:11:54 am »
I now have two canvases that implement my idea in a very simplistic way in the simplegraph component for the most part it works as I expected and then there is this line and lineto methods that can't be overridden that give me headaches at the moment. It only supports shifting the shape to be drawn in X and Y axis at this point.
I have a working theory for zooming as well but it does not work with ellipses and I'm thinking ways around it. All in all the new release has a few good points in it that make it worth downloading.

This will be the last release for a while as I have started a personal project that will require most of my free time, I'll just wait for the community to report bugs or enhancements they might need and if nothing is reported in the next 3 to 6 months I'll correct the 2 bugs I have in my list and release it.
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