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

Examples of net.sf.latexdraw.glib.models.interfaces.shape.IShape.FillingStyle



  @Override
  protected void update(final IGroup shape) {
    if(shape.isInteriorStylable()) {
      final FillingStyle style  = shape.getFillingStyle();
      final boolean isFillable  = style.isFilled();
      final boolean hatchings    = style.isHatchings();
      final boolean gradient    = style.isGradient();

      // Updating the visibility of the widgets.
      composer.setWidgetVisible(fillColButton, isFillable);
      composer.setWidgetVisible(hatchColButton, hatchings);
      composer.setWidgetVisible(hatchAngleField, hatchings);
      composer.setWidgetVisible(hatchSepField, hatchings);
      composer.setWidgetVisible(hatchWidthField, hatchings);
      composer.setWidgetVisible(gradStartColButton, gradient);
      composer.setWidgetVisible(gradEndColButton, gradient);
      composer.setWidgetVisible(gradAngleField, gradient);
      composer.setWidgetVisible(gradMidPtField, gradient);

      fillStyleCB.setSelectedItemSafely(style.toString());
      if(isFillable)
        fillColButton.setColor(shape.getFillingCol());
      if(hatchings) {
        hatchColButton.setColor(shape.getHatchingsCol());
        hatchAngleField.setValueSafely(Math.toDegrees(shape.getHatchingsAngle()));
View Full Code Here


   * @since 3.0
   */
  private StringBuilder getFillingHatchings(final float ppc) {
    final Color hatchingsCol = shape.getHatchingsCol();
    final StringBuilder code = new StringBuilder();
    final FillingStyle fillingStyle = shape.getFillingStyle();

    if(fillingStyle==FillingStyle.CLINES || fillingStyle==FillingStyle.CLINES_PLAIN)
      code.append("fillstyle=crosshatch"); //$NON-NLS-1$
    else
      if(fillingStyle==FillingStyle.HLINES || fillingStyle==FillingStyle.HLINES_PLAIN)
View Full Code Here

  protected void setSVGAttributes(final SVGDocument doc, final SVGElement root, final boolean shadowFills) {
    if(root==null || doc.getFirstChild().getDefs()==null)
      throw new IllegalArgumentException();

    final SVGDefsElement defs   = doc.getFirstChild().getDefs();
    final FillingStyle fillStyle= shape.getFillingStyle();

    // Setting the position of the borders.
    if(shape.isBordersMovable())
          root.setAttribute(LNamespace.LATEXDRAW_NAMESPACE +':'+ LNamespace.XML_BORDERS_POS, shape.getBordersPosition().getLatexToken());
View Full Code Here

  }


  @Override
  public void paintFilling(final Graphics2D g) {
    final FillingStyle fStyle = shape.getFillingStyle();

    switch(fStyle) {
      case NONE:
        if(shape.hasShadow() && shape.shadowFillsShape()) {
          g.setColor(shape.getFillingCol());
View Full Code Here

TOP

Related Classes of net.sf.latexdraw.glib.models.interfaces.shape.IShape.FillingStyle

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.