CoordinateSystem


#1

Hello JUCE-community,

today is the day, i make my first humble contribution. it is a class for drawing coordinate-systems. it is intedend to serve as a base-class for various kinds function plots (like frequency-responses), waveform-displays, XY-mixers, etc. it draws coordinate-axes with values, coarse and fine grids (cartesian and polar) and handles transformations from the system’s coordinates to component’s coordinates for linearly as well as logarithmically scaled axes.

http://www.braindoc.de/c++/CoordinateSystemDemo.zip

the archive contains all the required source-code, a MSVC 2005 project and a binary version of a small demo-program for this class.

NOTE:
there are still some minor catches for logarithmic plots: in this case, it is the user’s responsibility to make sure that the minimum values are strictly positive and that the spacing-factor for the grid-lines (coarse and fine) is strictly greater than one.


#2

Cool!


#3

thanks. it seems to work as intended but i did not yet test everything extensively. so hopefully the crowd will mess around with it a bit. …and so will do i.


#4

Excellent work! Very nice indeed, thanks for sharing


#5

hi haydxn, it was your tutorial which got me started with juce some time ago and i’m very happy with that. so it’s my pleasure to give something back.


#6

very nice!! thanks a lot :slight_smile:


#7

Fantastic! Great work!


#8

Hi,
how can I get the values of the function I want to plot inside. Is there something like setValueXY(…) to plot for example the audio-output ?
And where can I get a the Juce-Tutorial described before (braindoc wrote:“hi haydxn, it was your tutorial which got me started with juce some time ago…”)


#9

thanks laserbeak and auspuff

@ werner: the class as it is does not implement function plotting functionality. it is intended to be a base class to derive - for example - a function plotter from. but that’s just one example. you could also derive - say - a vector graphics drawing canvas, a XY-mixer, a key-mapping widget for samplers, …whatever needs an underlying coordinate-system. so i left the function plotting functionality to be implemented by a particular subclass. ideed i have some classes here which do exactly that. they all differ slightly in their functionality - one can plot a single function, another one can plot a general curve in 2-space, another one a function-family and yet another one a curve family and i’m not yet sure how to unify them all in the most elegant (and efficient) way. that’s why i didn’t publish them yet. the most general of the four is the curve-family - i think i could prepare it such that it contains single curves and function-families as special cases (where a single function is - of course - a special case of a function family). mmmhhh …i will see… the problem is that the most general case will waste memory when a more special case is actually required (i copy the data into member variables at the moment - but maybe i should do it with pointers)…mhhh…yeah…mmmhhhh…stay tuned…curve/function (family) plotters are to come.

edit: for the tutorial it is probably best to ask haydxn himself. i don’t think, it is in sync with the latest JUCE version - however, to learn the basic concepts of the framework, it is an invaluable document. i tend to think, that i would never have been able to use JUCE without that tutorial.


#10

the next turn: i included a lot of new functionality into the CoordinateSystem base class and also included a subclass to do some curve and function plotting. the whole stuff comes now as part of an actually useful application (as opposed to the simple demonstration application before) - namely a mathematical curve- and function-plotter. it looks like this:

and here is the source code:

http://www.rs-met.com/open_source/RSPlotSource.zip

this time, it is a VC 2008 Project. as for the 3D code: this is all very preliminray so please ignore it or take it with a truckload of salt. and here a ready-to-use (or play) binary version:

http://www.rs-met.com/software/misc/RSPlot.zip


#11

Hi, I have had a look at your RSPlot program—Nice work!

One thing I noticed though—there is no error checking when calculating the plot (calculateData() function I think); I was plotting the function

x(t) = t;
y(x, t) = a/b*(1 - exp(-b/c*x));

As you can see, if b or c is zero we have a divide-by-zero; in the program if either b or c is set to zero via the sliders the result is that the graph plot stops working (the rest of the widgets continue to work, but the graph does not get updated).

Hope this is useful.


#12

Hi brothernorth,

true, there is no divide-by-zero-check at the moment. thanks for the reminder. i’ll have to look into the ExprEval library, if there is something i can do about it. i think, the library raises an exception for divides by zero. …i only must think about, how to properly deal with it.


#13

Hello,

I’ve been looking at your rsplot, which looks great. I noticed there was an option to load data-files that never seemed to get implemented, but was wondering if you had ever got any further with that, as it would be very useful for my purposes. Many thanks!!


#14

Hey Braindoc,
I am not sure if you are still maintaining and developing this class. When I try to compile the RSplot project with VC Express 2010, I get the following errors. I am not sure what I am doing wrong or if there is a need to modify your code before it can be compiled.

Thanks
Amit

1>------ Build started: Project: RSPlot, Configuration: Debug Win32 ------
1> func.cpp
1>c:\users\amit\desktop\juce my projects\rsplot\src\rosic\expreval_v3_4\func.cpp(989): error C2065: ‘M_PI’ : undeclared identifier
1>c:\users\amit\desktop\juce my projects\rsplot\src\rosic\expreval_v3_4\func.cpp(1019): error C2065: ‘M_PI’ : undeclared identifier
1>c:\users\amit\desktop\juce my projects\rsplot\src\rosic\expreval_v3_4\func.cpp(1062): error C2065: ‘M_PI’ : undeclared identifier
1> SymbolButton.cpp
1> JUCE! Library to link to: jucelib_static_Win32_debug.lib
1> SurfacePlot.cpp
1> JUCE! Library to link to: jucelib_static_Win32_debug.lib
1> StringTools.cpp
1> JUCE! Library to link to: jucelib_static_Win32_debug.lib
1> StateFileManager.cpp
1> JUCE! Library to link to: jucelib_static_Win32_debug.lib
1> SliderWithoutBoxes.cpp
1> JUCE! Library to link to: jucelib_static_Win32_debug.lib
1> MetallicLookAndFeel.cpp
1> JUCE! Library to link to: jucelib_static_Win32_debug.lib
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.h(72): warning C4373: ‘MetallicLookAndFeel::drawRotarySlider’: virtual function overrides ‘juce::LookAndFeel::drawRotarySlider’, previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers
1> c:\users\amit\desktop\juce\src\gui\components\lookandfeel\juce_lookandfeel.h(423) : see declaration of 'juce::LookAndFeel::drawRotarySlider’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(183): error C2065: ‘GradientBrush’ : undeclared identifier
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(183): error C2146: syntax error : missing ‘;’ before identifier 'gradBrush’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(183): error C3861: ‘gradBrush’: identifier not found
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(185): error C2039: ‘setBrush’ : is not a member of 'juce::Graphics’
1> c:\users\amit\desktop\juce\src\gui\graphics\contexts\juce_graphics.h(55) : see declaration of 'juce::Graphics’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(185): error C2065: ‘gradBrush’ : undeclared identifier
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(276): error C2065: ‘GradientBrush’ : undeclared identifier
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(276): error C2146: syntax error : missing ‘;’ before identifier 'gBrush’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(276): error C3861: ‘gBrush’: identifier not found
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(277): error C2039: ‘setBrush’ : is not a member of 'juce::Graphics’
1> c:\users\amit\desktop\juce\src\gui\graphics\contexts\juce_graphics.h(55) : see declaration of 'juce::Graphics’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(277): error C2065: ‘gBrush’ : undeclared identifier
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(285): error C2065: ‘GradientBrush’ : undeclared identifier
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(285): error C2146: syntax error : missing ‘;’ before identifier 'gBrush2’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(285): error C3861: ‘gBrush2’: identifier not found
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(287): error C2039: ‘setBrush’ : is not a member of 'juce::Graphics’
1> c:\users\amit\desktop\juce\src\gui\graphics\contexts\juce_graphics.h(55) : see declaration of 'juce::Graphics’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(287): error C2065: ‘gBrush2’ : undeclared identifier
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(344): error C2065: ‘GradientBrush’ : undeclared identifier
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(344): error C2146: syntax error : missing ‘;’ before identifier 'gBrush’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(344): error C3861: ‘gBrush’: identifier not found
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(346): error C2039: ‘setBrush’ : is not a member of 'juce::Graphics’
1> c:\users\amit\desktop\juce\src\gui\graphics\contexts\juce_graphics.h(55) : see declaration of 'juce::Graphics’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(346): error C2065: ‘gBrush’ : undeclared identifier
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(488): error C2065: ‘GradientBrush’ : undeclared identifier
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(488): error C2146: syntax error : missing ‘;’ before identifier 'gBrush’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(488): error C3861: ‘gBrush’: identifier not found
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(490): error C2039: ‘setBrush’ : is not a member of 'juce::Graphics’
1> c:\users\amit\desktop\juce\src\gui\graphics\contexts\juce_graphics.h(55) : see declaration of 'juce::Graphics’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(490): error C2065: ‘gBrush’ : undeclared identifier
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(502): error C2065: ‘GradientBrush’ : undeclared identifier
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(502): error C2146: syntax error : missing ‘;’ before identifier 'gBrush2’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(502): error C3861: ‘gBrush2’: identifier not found
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(504): error C2039: ‘setBrush’ : is not a member of 'juce::Graphics’
1> c:\users\amit\desktop\juce\src\gui\graphics\contexts\juce_graphics.h(55) : see declaration of 'juce::Graphics’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(504): error C2065: ‘gBrush2’ : undeclared identifier
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(526): error C2065: ‘GradientBrush’ : undeclared identifier
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(526): error C2146: syntax error : missing ‘;’ before identifier 'gBrush’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(526): error C3861: ‘gBrush’: identifier not found
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(528): error C2039: ‘setBrush’ : is not a member of 'juce::Graphics’
1> c:\users\amit\desktop\juce\src\gui\graphics\contexts\juce_graphics.h(55) : see declaration of 'juce::Graphics’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(528): error C2065: ‘gBrush’ : undeclared identifier
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(540): error C2065: ‘GradientBrush’ : undeclared identifier
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(540): error C2146: syntax error : missing ‘;’ before identifier 'gBrush2’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(540): error C3861: ‘gBrush2’: identifier not found
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(542): error C2039: ‘setBrush’ : is not a member of 'juce::Graphics’
1> c:\users\amit\desktop\juce\src\gui\graphics\contexts\juce_graphics.h(55) : see declaration of 'juce::Graphics’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.cpp(542): error C2065: ‘gBrush2’ : undeclared identifier
1> ImageSavingDialog.cpp
1> JUCE! Library to link to: jucelib_static_Win32_debug.lib
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\graphicstools.h(16): error C2955: ‘juce::Rectangle’ : use of class template requires template argument list
1> c:\users\amit\desktop\juce\src\gui\graphics\geometry\juce_rectangle.h(42) : see declaration of 'juce::Rectangle’
1> GraphicsTools.cpp
1> JUCE! Library to link to: jucelib_static_Win32_debug.lib
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\graphicstools.h(16): error C2955: ‘juce::Rectangle’ : use of class template requires template argument list
1> c:\users\amit\desktop\juce\src\gui\graphics\geometry\juce_rectangle.h(42) : see declaration of 'juce::Rectangle’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\graphicstools.cpp(129): error C2662: ‘juce::Rectangle::getX’ : cannot convert ‘this’ pointer from ‘juce::Rectangle’ to 'const juce::Rectangle &'
1> Reason: cannot convert from ‘juce::Rectangle’ to 'const juce::Rectangle’
1> Conversion requires a second user-defined-conversion operator or constructor
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\graphicstools.cpp(129): error C2662: ‘juce::Rectangle::getY’ : cannot convert ‘this’ pointer from ‘juce::Rectangle’ to 'const juce::Rectangle &'
1> Reason: cannot convert from ‘juce::Rectangle’ to 'const juce::Rectangle’
1> Conversion requires a second user-defined-conversion operator or constructor
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\graphicstools.cpp(129): error C2662: ‘juce::Rectangle::getWidth’ : cannot convert ‘this’ pointer from ‘juce::Rectangle’ to 'const juce::Rectangle &'
1> Reason: cannot convert from ‘juce::Rectangle’ to 'const juce::Rectangle’
1> Conversion requires a second user-defined-conversion operator or constructor
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\graphicstools.cpp(129): error C2662: ‘juce::Rectangle::getHeight’ : cannot convert ‘this’ pointer from ‘juce::Rectangle’ to 'const juce::Rectangle &'
1> Reason: cannot convert from ‘juce::Rectangle’ to 'const juce::Rectangle’
1> Conversion requires a second user-defined-conversion operator or constructor
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\graphicstools.cpp(236): error C2662: ‘juce::Rectangle::getX’ : cannot convert ‘this’ pointer from ‘juce::Rectangle’ to 'const juce::Rectangle &'
1> Reason: cannot convert from ‘juce::Rectangle’ to 'const juce::Rectangle’
1> Conversion requires a second user-defined-conversion operator or constructor
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\graphicstools.cpp(236): error C2662: ‘juce::Rectangle::getY’ : cannot convert ‘this’ pointer from ‘juce::Rectangle’ to 'const juce::Rectangle &'
1> Reason: cannot convert from ‘juce::Rectangle’ to 'const juce::Rectangle’
1> Conversion requires a second user-defined-conversion operator or constructor
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\graphicstools.cpp(236): error C2662: ‘juce::Rectangle::getWidth’ : cannot convert ‘this’ pointer from ‘juce::Rectangle’ to 'const juce::Rectangle &'
1> Reason: cannot convert from ‘juce::Rectangle’ to 'const juce::Rectangle’
1> Conversion requires a second user-defined-conversion operator or constructor
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\graphicstools.cpp(236): error C2662: ‘juce::Rectangle::getHeight’ : cannot convert ‘this’ pointer from ‘juce::Rectangle’ to 'const juce::Rectangle &'
1> Reason: cannot convert from ‘juce::Rectangle’ to 'const juce::Rectangle’
1> Conversion requires a second user-defined-conversion operator or constructor
1> FileManager.cpp
1> JUCE! Library to link to: jucelib_static_Win32_debug.lib
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\filemanager.cpp(7): error C2661: ‘juce::WildcardFileFilter::WildcardFileFilter’ : no overloaded function takes 2 arguments
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\filemanager.cpp(97): error C2664: ‘juce::File::findChildFiles’ : cannot convert parameter 1 from ‘juce::OwnedArray’ to 'juce::Array &'
1> with
1> [
1> ObjectClass=juce::File
1> ]
1> and
1> [
1> ElementType=juce::File
1> ]
1> CurveFamilyPlot.cpp
1> JUCE! Library to link to: jucelib_static_Win32_debug.lib
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\graphicstools.h(16): error C2955: ‘juce::Rectangle’ : use of class template requires template argument list
1> c:\users\amit\desktop\juce\src\gui\graphics\geometry\juce_rectangle.h(42) : see declaration of 'juce::Rectangle’
1> CoordinateSystemZoomer.cpp
1> JUCE! Library to link to: jucelib_static_Win32_debug.lib
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\graphicstools.h(16): error C2955: ‘juce::Rectangle’ : use of class template requires template argument list
1> c:\users\amit\desktop\juce\src\gui\graphics\geometry\juce_rectangle.h(42) : see declaration of 'juce::Rectangle’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\coordinatesystemzoomer.h(89): warning C4373: ‘CoordinateSystemZoomer::scrollBarMoved’: virtual function overrides ‘juce::ScrollBarListener::scrollBarMoved’, previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers
1> c:\users\amit\desktop\juce\src\gui\components\layout\juce_scrollbar.h(56) : see declaration of 'juce::ScrollBarListener::scrollBarMoved’
1> CoordinateSystemRange.cpp
1> JUCE! Library to link to: jucelib_static_Win32_debug.lib
1> CoordinateSystem3DZoomer.cpp
1> JUCE! Library to link to: jucelib_static_Win32_debug.lib
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\coordinatesystem3dzoomer.h(59): warning C4373: ‘CoordinateSystem3DZoomer::scrollBarMoved’: virtual function overrides ‘juce::ScrollBarListener::scrollBarMoved’, previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers
1> c:\users\amit\desktop\juce\src\gui\components\layout\juce_scrollbar.h(56) : see declaration of 'juce::ScrollBarListener::scrollBarMoved’
1> CoordinateSystem3DRange.cpp
1> JUCE! Library to link to: jucelib_static_Win32_debug.lib
1> CoordinateSystem3D.cpp
1> JUCE! Library to link to: jucelib_static_Win32_debug.lib
1> CoordinateSystem.cpp
1> JUCE! Library to link to: jucelib_static_Win32_debug.lib
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\graphicstools.h(16): error C2955: ‘juce::Rectangle’ : use of class template requires template argument list
1> c:\users\amit\desktop\juce\src\gui\graphics\geometry\juce_rectangle.h(42) : see declaration of 'juce::Rectangle’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\coordinatesystem.cpp(1394): error C2660: ‘juce::DrawableText::getBounds’ : function does not take 4 arguments
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\coordinatesystem.cpp(1403): error C2660: ‘juce::Drawable::drawAt’ : function does not take 3 arguments
1> RSPlotMain.cpp
1> JUCE! Library to link to: jucelib_static_Win32_debug.lib
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\metalliclookandfeel.h(72): warning C4373: ‘MetallicLookAndFeel::drawRotarySlider’: virtual function overrides ‘juce::LookAndFeel::drawRotarySlider’, previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers
1> c:\users\amit\desktop\juce\src\gui\components\lookandfeel\juce_lookandfeel.h(423) : see declaration of 'juce::LookAndFeel::drawRotarySlider’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\graphicstools.h(16): error C2955: ‘juce::Rectangle’ : use of class template requires template argument list
1> c:\users\amit\desktop\juce\src\gui\graphics\geometry\juce_rectangle.h(42) : see declaration of 'juce::Rectangle’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\coordinatesystemzoomer.h(89): warning C4373: ‘CoordinateSystemZoomer::scrollBarMoved’: virtual function overrides ‘juce::ScrollBarListener::scrollBarMoved’, previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers
1> c:\users\amit\desktop\juce\src\gui\components\layout\juce_scrollbar.h(56) : see declaration of 'juce::ScrollBarListener::scrollBarMoved’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\coordinatesystem3dzoomer.h(59): warning C4373: ‘CoordinateSystem3DZoomer::scrollBarMoved’: virtual function overrides ‘juce::ScrollBarListener::scrollBarMoved’, previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers
1> c:\users\amit\desktop\juce\src\gui\components\layout\juce_scrollbar.h(56) : see declaration of 'juce::ScrollBarListener::scrollBarMoved’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rsplotmain.cpp(158): warning C4373: ‘RSPlot::unhandledException’: virtual function overrides ‘juce::JUCEApplication::unhandledException’, previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers
1> c:\users\amit\desktop\juce\src\application\juce_application.h(223) : see declaration of 'juce::JUCEApplication::unhandledException’
1> RSPlotFileSetup.cpp
1> JUCE! Library to link to: jucelib_static_Win32_debug.lib
1> RSPlotDataSetup.cpp
1> JUCE! Library to link to: jucelib_static_Win32_debug.lib
1> Generating Code…
1> Compiling…
1> RSPlotContentComponent.cpp
1> JUCE! Library to link to: jucelib_static_Win32_debug.lib
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\graphicstools.h(16): error C2955: ‘juce::Rectangle’ : use of class template requires template argument list
1> c:\users\amit\desktop\juce\src\gui\graphics\geometry\juce_rectangle.h(42) : see declaration of 'juce::Rectangle’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\coordinatesystemzoomer.h(89): warning C4373: ‘CoordinateSystemZoomer::scrollBarMoved’: virtual function overrides ‘juce::ScrollBarListener::scrollBarMoved’, previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers
1> c:\users\amit\desktop\juce\src\gui\components\layout\juce_scrollbar.h(56) : see declaration of 'juce::ScrollBarListener::scrollBarMoved’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rojue\coordinatesystem3dzoomer.h(59): warning C4373: ‘CoordinateSystem3DZoomer::scrollBarMoved’: virtual function overrides ‘juce::ScrollBarListener::scrollBarMoved’, previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers
1> c:\users\amit\desktop\juce\src\gui\components\layout\juce_scrollbar.h(56) : see declaration of 'juce::ScrollBarListener::scrollBarMoved’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rsplotcontentcomponent.cpp(61): error C2660: ‘juce::TabbedComponent::setOutline’ : function does not take 2 arguments
1>c:\users\amit\desktop\juce my projects\rsplot\src\rsplotcontentcomponent.cpp(1117): error C2039: ‘copyToBuffer’ : is not a member of 'juce::String’
1> c:\users\amit\desktop\juce\src\text\juce_string.h(44) : see declaration of 'juce::String’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rsplotcontentcomponent.cpp(1147): error C2039: ‘copyToBuffer’ : is not a member of 'juce::String’
1> c:\users\amit\desktop\juce\src\text\juce_string.h(44) : see declaration of 'juce::String’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rsplotcontentcomponent.cpp(1198): error C2039: ‘copyToBuffer’ : is not a member of 'juce::String’
1> c:\users\amit\desktop\juce\src\text\juce_string.h(44) : see declaration of 'juce::String’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rsplotcontentcomponent.cpp(1262): error C2039: ‘copyToBuffer’ : is not a member of 'juce::String’
1> c:\users\amit\desktop\juce\src\text\juce_string.h(44) : see declaration of 'juce::String’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rsplotcontentcomponent.cpp(1308): error C2039: ‘copyToBuffer’ : is not a member of 'juce::String’
1> c:\users\amit\desktop\juce\src\text\juce_string.h(44) : see declaration of 'juce::String’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rsplotcontentcomponent.cpp(1356): error C2039: ‘copyToBuffer’ : is not a member of 'juce::String’
1> c:\users\amit\desktop\juce\src\text\juce_string.h(44) : see declaration of 'juce::String’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rsplotcontentcomponent.cpp(1380): error C2039: ‘copyToBuffer’ : is not a member of 'juce::String’
1> c:\users\amit\desktop\juce\src\text\juce_string.h(44) : see declaration of 'juce::String’
1>c:\users\amit\desktop\juce my projects\rsplot\src\rsplotcontentcomponent.cpp(1430): error C2039: ‘copyToBuffer’ : is not a member of 'juce::String’
1> c:\users\amit\desktop\juce\src\text\juce_string.h(44) : see declaration of 'juce::String’
1> RSPlotAxesSetup.cpp
1> JUCE! Library to link to: jucelib_static_Win32_debug.lib
1> Generating Code…
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


#15

I solved the first part of the problem, which says by putting

in the file func.cpp. The reason for this error is that math constants like M_PI which were included from math.h or cmath are no longer part of the C/C++ standard, since C99. The easy solution for this is to redefine them in the code.
But still have some other problems.

Seems like GradientBrush is not defined in ‘juice:: Graphics’. I am not sure what has replaced it in the new version.

Thanks
Amit


#16

[quote=“mohanty”]
Seems like GradientBrush is not defined in ‘juice:: Graphics’. I am not sure what has replaced it in the new version.[/quote]
Graphics::setGradientFill


#17

I am a C guy, still trying to get around CPP. The piece of code looked like this

  GradientBrush gradBrush(grad);

  g.setBrush(&gradBrush);

  g.fillRect(faderBodyX, faderBodyY, faderBodyW, faderBodyH);

So what should I changed it to?


#18

[quote=“mohanty”]I am a C guy, still trying to get around CPP. The piece of code looked like this

  GradientBrush gradBrush(grad);

  g.setBrush(&gradBrush);

  g.fillRect(faderBodyX, faderBodyY, faderBodyW, faderBodyH);

So what should I changed it to?[/quote]

g.setGradientFill (grad);

g.fillRect(faderBodyX, faderBodyY, faderBodyW, faderBodyH);

should do it. Neat, ain’it?


#19

Which version of JUCE are u using???


#20

Who, me? 1.51.