Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.Path.dispose()


          .getTool_item_bg_glossy_selected2(), themeRender
          .getTool_item_bg_glossy_selected2_alpha());
    path = GraphicsUtil.createTopRoundRectangle(glossy, 2);
    gc.setBackgroundPattern(pattern);
    gc.fillPath(path);
    path.dispose();

    Color innerBorderColor = (selected && tracked)
        || (dc.getToolItem() != null && (dc.getToolItem().getStyle() & SWT.CHECK) != 0 && dc
            .getToolItem().getSelection()) ? themeRender
        .getTool_item_inner_border_selected() : themeRender
View Full Code Here


        .getTool_item_inner_border_track();

    path = GraphicsUtil.createRoundRectangle(innerBorder, 2);
    gc.setForeground(innerBorderColor);
    gc.drawPath(path);
    path.dispose();

    if (!((menuTracked || (dc.getToolItem() != null && dc.getToolItem().getMenu() != null && !dc
        .getToolItem().canSelected()))
        && selected && tracked))
    {
View Full Code Here

        .getToolItem().canSelected()))
        && selected && tracked))
    {
      path = GraphicsUtil.createRoundRectangle(glow, 2);
      gc.setClipping(path);
      path.dispose();

      Color glowColor = themeRender.getTool_item_bg_glow_track();

      if (dc.getToolItem() != null && (dc.getToolItem().getStyle() & SWT.CHECK) != 0
          && dc.getToolItem().getSelection())
View Full Code Here

      point[0] = (bounds[0] + bounds[0] + bounds[2]) / 2f;
      point[1] = (bounds[1] + bounds[1] + bounds[3]) / 2f;
      GCExtension extension = new GCExtension(gc);
      extension.fillGradientPath(path, point, glowColor, 255, new Color[] { glowColor },
          new int[] { 0 });
      path.dispose();
      gc.setClipping((Region) null);
    }
    gc.setAdvanced(false);
  }
View Full Code Here

      g.setAdvanced(true);
      Rectangle backRect = new Rectangle(rect.x, rect.y, rect.width, rect.height);
      Path path = GraphicsUtil.createRoundPath(backRect, 1.2f);
      g.setForeground(colors[8]);
      g.drawPath(path);
      path.dispose();
      g.setAdvanced(false);
    }
    else
    {
      g.setForeground(colors[8]);
View Full Code Here

        .getToolbar_bg_glossy_color2_alpha());
    gc.setBackgroundPattern(pattern);
    Path path = new Path(null);
    path.addRectangle(glossyRect.x, glossyRect.y, glossyRect.width, glossyRect.height);
    gc.fillPath(path);
    path.dispose();

    int glowSize = (int) (toolbar.getSize().y * 0.15);
    Rectangle glowRect = new Rectangle(0, toolbar.getSize().y - glowSize, toolbar
        .getSize().x, glowSize);
    pattern = new Pattern(null, 0, glowRect.y, 0, glowRect.y + glowRect.height,
View Full Code Here

            .getToolbar_bg_glow_color2_alpha());
    gc.setBackgroundPattern(pattern);
    path = new Path(null);
    path.addRectangle(glowRect.x, glowRect.y, glowRect.width, glowRect.height);
    gc.fillPath(path);
    path.dispose();
  }

  private boolean hasText = false;

  protected Rectangle recalculate()
View Full Code Here

     * @param s  the shape for the clip.
     */
    public void clip(Shape s) {
        Path path = toSwtPath(s);
        this.gc.setClipping(path);
        path.dispose();
    }

    /**
     * Returns the clip bounds.
     *
 
View Full Code Here

        if (clip == null) {
            return;
        }
        Path clipPath = toSwtPath(clip);
        this.gc.setClipping(clipPath);
        clipPath.dispose();
    }

    /**
     * Sets the clip region to the specified rectangle.
     *
 
View Full Code Here

     * @see #fill(Shape)
     */
    public void draw(Shape shape) {
        Path path = toSwtPath(shape);
        this.gc.drawPath(path);
        path.dispose();
    }

    /**
     * Draws a line from (x1, y1) to (x2, y2) using the current stroke
     * and paint settings.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.