Search in sources :

Example 1 with PSFunctionParser

use of net.sf.latexdraw.parsers.ps.PSFunctionParser in project latexdraw by arnobl.

the class LPlot method copy.

@Override
public void copy(final IShape sh) {
    super.copy(sh);
    if (sh instanceof IPlotProp) {
        final IPlotProp plot = (IPlotProp) sh;
        style.set(plot.getPlotStyle());
        nbPoints.set(plot.getNbPlottedPoints());
        polar.set(plot.isPolar());
        dotStyle.set(plot.getDotStyle());
        dotDiametre.set(plot.getDiametre());
        minX.set(plot.getPlotMinX());
        maxX.set(plot.getPlotMaxX());
        xscale.set(plot.getXScale());
        yscale.set(plot.getYScale());
        setPlotEquation(plot.getPlotEquation());
    } else {
        if (sh instanceof IDotProp) {
            final IDotProp dot = (IDotProp) sh;
            dotStyle.set(dot.getDotStyle());
            dotDiametre.set(dot.getDiametre());
        }
    }
    parser = new PSFunctionParser(equation.get());
}
Also used : IDotProp(net.sf.latexdraw.models.interfaces.prop.IDotProp) PSFunctionParser(net.sf.latexdraw.parsers.ps.PSFunctionParser) IPlotProp(net.sf.latexdraw.models.interfaces.prop.IPlotProp)

Example 2 with PSFunctionParser

use of net.sf.latexdraw.parsers.ps.PSFunctionParser in project latexdraw by arnobl.

the class LPlot method setPlotEquation.

@Override
public void setPlotEquation(final String eq) {
    if (eq != null && !eq.isEmpty()) {
        parser = new PSFunctionParser(eq);
        equation.setValue(eq);
    }
}
Also used : PSFunctionParser(net.sf.latexdraw.parsers.ps.PSFunctionParser)

Aggregations

PSFunctionParser (net.sf.latexdraw.parsers.ps.PSFunctionParser)2 IDotProp (net.sf.latexdraw.models.interfaces.prop.IDotProp)1 IPlotProp (net.sf.latexdraw.models.interfaces.prop.IPlotProp)1