Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » GraphDraw/GraphCtrl
Re: GraphDraw/GraphCtrl [message #54399 is a reply to message #54398] Sun, 12 July 2020 12:18 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
As for the warning, MSVC is probably winning about this

// GraphElements are NOT COPYABLE nor MOVEABLE
GraphElementParent(GraphElementParent&&) = delete;
GraphElementParent(const GraphElementParent&&) = delete;
GraphElementParent(GraphElementParent& ) = delete;
GraphElementParent(const GraphElementParent& ) = delete;


Since I don't have access to a valid MSVC, just tell what to put (normally this is valid code Confused )
Re: GraphDraw/GraphCtrl [message #54400 is a reply to message #54398] Sun, 12 July 2020 13:22 Go to previous messageGo to next message
Pradip is currently offline  Pradip
Messages: 109
Registered: February 2019
Location: India
Experienced Member
Oh, this is going to be a challenge. I've checked again, I still can't run even 14429, McAfee Sad

Regards,
Pradip
Re: GraphDraw/GraphCtrl [message #54414 is a reply to message #54399] Tue, 14 July 2020 17:52 Go to previous messageGo to next message
Pradip is currently offline  Pradip
Messages: 109
Registered: February 2019
Location: India
Experienced Member
Didier wrote on Sun, 12 July 2020 15:48
As for the warning, MSVC is probably winning about this

// GraphElements are NOT COPYABLE nor MOVEABLE
GraphElementParent(GraphElementParent&&) = delete;
GraphElementParent(const GraphElementParent&&) = delete;
GraphElementParent(GraphElementParent& ) = delete;
GraphElementParent(const GraphElementParent& ) = delete;


Since I don't have access to a valid MSVC, just tell what to put (normally this is valid code Confused )

I think this we can ignore. In MSVS community also someone reported this as an issue.


Regards,
Pradip
Re: GraphDraw/GraphCtrl [message #54417 is a reply to message #54394] Tue, 14 July 2020 20:45 Go to previous messageGo to next message
Pradip is currently offline  Pradip
Messages: 109
Registered: February 2019
Location: India
Experienced Member
Didier wrote on Sun, 12 July 2020 03:01

I just uploaded the latest version of the code.

Hello Didier!

Guess what, I can now run 14679! McAfee didn't cry about it Laughing

Modified my code and successfully eliminated all errors. Now there are some new 'possible loss of data' warning, see the image. You can ignore 'multiple copy constructors specified' errors.
index.php?t=getfile&id=6151&private=0


Regards,
Pradip
Re: GraphDraw/GraphCtrl [message #54418 is a reply to message #54417] Tue, 14 July 2020 23:18 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Hello Pradip,

Quote:
Guess what, I can now run 14679! McAfee didn't cry about it

Great news !
You should now see a good performance boost du to all the optimization work Mirek did using intrinsics ( Thanks Mirek Smile )

For the other warnings, they are not from my packages ... so I can't do anything about it
ScatterDraw, which is now part of Uppsrc was written by Koldo ==> you need to post him a request for correction in this thread :
https:// www.ultimatepp.org/forums/index.php?t=thread&frm_id=93&a mp;a mp;

[Updated on: Tue, 14 July 2020 23:31]

Report message to a moderator

Re: GraphDraw/GraphCtrl [message #54420 is a reply to message #54418] Wed, 15 July 2020 09:45 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Dear Pradip, dear Didier

I cannot reproduce the warnings in DataSource.h.
Could you indicate me which compiler has been used and how DataSource.h is included?


Best regards
Iñaki
Re: GraphDraw/GraphCtrl [message #54421 is a reply to message #54420] Wed, 15 July 2020 09:57 Go to previous messageGo to next message
Pradip is currently offline  Pradip
Messages: 109
Registered: February 2019
Location: India
Experienced Member
Dear Koldo, I have used MSVS17 compiler.

Dear Didier, please advise how you have used ScatterDraw in GraphDraw


Regards,
Pradip
Re: GraphDraw/GraphCtrl [message #54422 is a reply to message #54420] Wed, 15 July 2020 09:57 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Well, I think I have found and fixed the warnings,
Please check them (I cannot Rolling Eyes )


Best regards
Iñaki
Re: GraphDraw/GraphCtrl [message #54423 is a reply to message #54422] Wed, 15 July 2020 10:01 Go to previous messageGo to next message
Pradip is currently offline  Pradip
Messages: 109
Registered: February 2019
Location: India
Experienced Member
Dear Koldo,

Thanks! Should I check tomorrow in tonight's nightly build then?


Regards,
Pradip
Re: GraphDraw/GraphCtrl [message #54424 is a reply to message #54423] Wed, 15 July 2020 12:58 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
It is already uploaded and available in svn.

Best regards
Iñaki
Re: GraphDraw/GraphCtrl [message #56028 is a reply to message #54424] Sat, 16 January 2021 07:08 Go to previous messageGo to next message
Pradip is currently offline  Pradip
Messages: 109
Registered: February 2019
Location: India
Experienced Member
Hello Didier,

Hope you are doing fine Smile

I tried to compile GraphCtrl_Demo in UPP version 15260 and found some errors in clang compiler; it is complaining about VectorDouble and ArrayDouble. Please see the image.

What should be done?

index.php?t=getfile&id=6339&private=0


Regards,
Pradip

[Updated on: Sat, 16 January 2021 08:02]

Report message to a moderator

Re: GraphDraw/GraphCtrl [message #56029 is a reply to message #56028] Sat, 16 January 2021 08:04 Go to previous messageGo to next message
Pradip is currently offline  Pradip
Messages: 109
Registered: February 2019
Location: India
Experienced Member
Okay I got it. Changes in ScatterDraw:

VectorDouble -> VectorXY
ArrayDouble -> ArrayXY

Didier you may please update GraphCtrl accordingly


Regards,
Pradip

[Updated on: Sat, 16 January 2021 08:05]

Report message to a moderator

Re: GraphDraw/GraphCtrl [message #56032 is a reply to message #56029] Sat, 16 January 2021 20:57 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Hello Pradip,

All is fine here thanks

I have a version which contains the necessary corrections ... but also cmes with a lot of other modifications : corrections and enhancements.

The modifications are the following:
  • The main mofifications aim to allow easy overriding of the properties editors (so that they can be fully customized ( my graphic designer tallent is very very bad Wink )
    To achieve this I had to kick out inheritance in Style classes (simpler this way) ==> No inheritance at all must be used at all !
    ==> this implies the StyleDefault() methods may need update
    ==> the main properties window (the one accessible when hovering graph area now displays all available properties as TABs)
  • I also did some renaming (very few) where needed
    One ranming was to follow a simple naming convention : when in a GraphElement class, getter an setter should be named GetElement...() SetElement...() ) ==> so no confusion with GraphDraw / GraphCtrl methods
  • Bug corrections




Here is the updated package

[Updated on: Sat, 16 January 2021 21:00]

Report message to a moderator

Re: GraphDraw/GraphCtrl [message #56080 is a reply to message #56032] Thu, 21 January 2021 19:55 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Hello again Pradip,

While reconnecting with code (which I didn't work on for some time now : other things to do Wink )
I just noticed I forgot to talk about some important modifications which I was working on and are not finished yet (but are isolated from rest of code for the moment and so normally will not bother you)
==> I was working on making ScatterDraw compatibility encapsulated in a CustomDataSource so that this could be optional (I like it when embedding all libraries is not mandatory Wink ) ... This would have the could side effect of moving all ScatterDraw dedicated code to this CustomDataSource and thus cleaning GraphDraw.

[Updated on: Thu, 21 January 2021 23:06]

Report message to a moderator

Re: GraphDraw/GraphCtrl [message #56508 is a reply to message #56080] Sat, 20 March 2021 05:34 Go to previous messageGo to next message
Pradip is currently offline  Pradip
Messages: 109
Registered: February 2019
Location: India
Experienced Member
Hello Didier!

Sorry for not replying to you for a while! Me too wasn't working with the code for sometime, got back to them recently. Will try the new GraphCtrl package after some days, will keep the points you mentioned in mind for then.

Ahh you have worked on making things better, can't wait to see them Very Happy
By any chance could you implement the PaintOne() (not sure if I remember the name right), for highlighting one data point for say selection or so?


Regards,
Pradip
Re: GraphDraw/GraphCtrl [message #56517 is a reply to message #56508] Sat, 20 March 2021 20:48 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Hello Pradip,

I recommend you wait a little bit more before synching.

I enhanced support for custom series, I did the following changes:
  • Introduced GraphSeries class : it's a proxy to the data that also nows takes care of drawing and editor dialog
  • Did a clean separation for custom series ==> the series can now be in other packages
  • Added legend management for all series (even custom series) Smile
  • Added properties editor dialog management for all series (even custom series) Smile . A custom serie can come with it's properties dialog
  • Did some packaging : isolated existing Series in a dedicated packages ==> this allows to choose exactly which kind of serie you will use and limit minimal dependancies
  • Did some renaming (CustomDataSource was to confusing whith the ScatterDraw class)
[*] ScatterSerie interface changed a (very little bit) : preperties are not available directly at GraphCtrl level, you need to get access to the GraphSeries (so just one simple modification that can be done with search/replace)


I reached a good level, but some other changes aren't done yet and still very dirty (example I tried to isolate GraphElements in different packages and succeded .... but this makes to many packages, so I rolled back

With these enhancements, you could contribute you're series very simply Smile

[Updated on: Sat, 20 March 2021 20:53]

Report message to a moderator

Re: GraphDraw/GraphCtrl [message #56528 is a reply to message #56517] Mon, 22 March 2021 06:26 Go to previous messageGo to next message
Pradip is currently offline  Pradip
Messages: 109
Registered: February 2019
Location: India
Experienced Member
Hello Didier,

Sure, I'll wait until you finish working at your end, and I'm sure it will be very cool when you are done Very Happy

Looking forward to it!


Regards,
Pradip
Re: GraphDraw/GraphCtrl [message #56557 is a reply to message #56528] Thu, 25 March 2021 05:43 Go to previous messageGo to next message
Pradip is currently offline  Pradip
Messages: 109
Registered: February 2019
Location: India
Experienced Member
Hello Didier,

While trying to print the gantt chart in a report, please advise if using the GetImage() method is best for this purpose?

Thanks in advance Smile


Regards,
Pradip
Re: GraphDraw/GraphCtrl [message #56562 is a reply to message #56557] Thu, 25 March 2021 19:16 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Hello Pradip,

The GetImage() method is intended exactly for that Wink

I recommend you use one of the following GetImage(...) methods (search in GraphDraw package) :
		Image GetImage( Size size, Color backGndColor = Upp::White(), const int scale = 1 );
		Image GetImage(Size size, const int scale = 1 ) { return GetImage(size, White(), scale ); }
		inline Image GetImage(const int scale=1)        { return GetImage( _ctrlRect.Size()*scale, scale ); }
		inline Image GetImage(Color backGndColor, const int scale=1) { return GetImage( _ctrlRect.Size()*scale, backGndColor, scale ); }


The 'scale' parameter is intended to make a high resolution image intended for better rendering in reports (and printing).
Basically reportImageSize = screenImageSize * scale and it doens't scale anything else so it works as if you had a bigger screen.

If you want a predefined size for you're repport, just use GetImage(size, scale)

I use it regularly in my repports.

Take a look at the 'copy' action in context menu in graph ==> it will copy the graph to clipboard while applying a scale=3 (3 is default copy ratio)

[Updated on: Thu, 25 March 2021 19:19]

Report message to a moderator

Re: GraphDraw/GraphCtrl [message #56572 is a reply to message #56562] Fri, 26 March 2021 06:19 Go to previous messageGo to previous message
Pradip is currently offline  Pradip
Messages: 109
Registered: February 2019
Location: India
Experienced Member
Thankssss Didier! Very Happy

Regards,
Pradip
Previous Topic: Anboto/Surface updated
Goto Forum:
  


Current Time: Fri Mar 29 16:43:23 CET 2024

Total time taken to generate the page: 0.01652 seconds