Package net.sf.latexdraw.glib.models.interfaces.shape

Examples of net.sf.latexdraw.glib.models.interfaces.shape.IPlot


    assertEquals(0.1, plot.getYScale(), 0.0);
  }

  @Test
  public void testPsplotStar() throws ParseException {
    final IPlot plot = (IPlot)parser.parsePSTCode("\\psplot*[plotpoints=200]{0}{720}{x sin}").get().getShapeAt(0); //$NON-NLS-1$
    assertTrue(PSTParser.errorLogs().isEmpty());
    assertEquals(0.0, plot.getPlotMinX(), 0.0);
    assertEquals(720.0, plot.getPlotMaxX(), 0.0);
    assertEquals("x sin", plot.getPlotEquation()); //$NON-NLS-1$
    assertEquals(IShape.FillingStyle.PLAIN, plot.getFillingStyle());
  }
View Full Code Here


    final IPoint textPosition = instrument.relativePoint==null ? ShapeFactory.createPoint(instrument.textField.getX(),
                  instrument.textField.getY()+instrument.textField.getHeight()) : instrument.relativePoint;
    final IShape sh = instrument.pencil==null ? null : instrument.pencil.createShapeInstance();

    if(sh instanceof IPlot) {
      final IPlot plot = (IPlot)sh;
      plot.setPosition(textPosition.getX(), textPosition.getY());
      plot.setPlotEquation(instrument.textField.getText());
      action.setShape(plot);
      action.setDrawing(instrument.pencil.canvas().getDrawing());
    }
  }
View Full Code Here

TOP

Related Classes of net.sf.latexdraw.glib.models.interfaces.shape.IPlot

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.