|
|
Home » Developing U++ » UppHub » GraphDraw/GraphCtrl
|
|
|
|
|
|
|
|
|
|
Re: GraphDraw/GraphCtrl [message #56028 is a reply to message #54424] |
Sat, 16 January 2021 07:08   |
 |
Pradip
Messages: 109 Registered: February 2019 Location: India
|
Experienced Member |
|
|
Hello Didier,
Hope you are doing fine
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?
Regards,
Pradip
[Updated on: Sat, 16 January 2021 08:02] Report message to a moderator
|
|
|
|
Re: GraphDraw/GraphCtrl [message #56032 is a reply to message #56029] |
Sat, 16 January 2021 20:57   |
Didier
Messages: 726 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
)
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 #56562 is a reply to message #56557] |
Thu, 25 March 2021 19:16   |
Didier
Messages: 726 Registered: November 2008 Location: France
|
Contributor |
|
|
Hello Pradip,
The GetImage() method is intended exactly for that 
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
|
|
|
|
Goto Forum:
Current Time: Sun May 11 20:08:03 CEST 2025
Total time taken to generate the page: 0.03219 seconds
|
|
|