Examples of addRectangle()


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

    }

    protected Path createPointPath(Device device) {
        Point point=geom.getShell().getPoint(0);
        Path path=new Path(device);
        path.addRectangle(point.getX()-2, point.getY()-2, 4, 4);
        return path;
    }

    public int getWindingRule() {
        return WIND_EVEN_ODD;
View Full Code Here

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

        if( drawEndPoints==null ){
            drawEndPoints=new DrawPathCommand();
            int vertexRadius = PreferenceUtil.instance().getVertexRadius();
            Path path = new Path(getDisplay());
            int i = vertexRadius+vertexRadius;
            path.addRectangle(dragStarted.getX()-vertexRadius, dragStarted.getY()-vertexRadius, i, i);
            if( EditPlugin.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.P_FILL_VERTICES) ){
                drawEndPoints.setFill(PreferenceUtil.instance().getDrawVertexFillColor());
            }
            drawEndPoints.setPath(path);
            handler.getContext().sendASyncCommand(drawEndPoints);
View Full Code Here

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

    final float delta = size / 2.0f;

    // square
    // result[0] = new Rectangle2D.Double(-delta, -delta, size, size);
    path = new Path(this.device);
    path.addRectangle(-delta, -delta, size, size);
    paths.add(path);

    // circle
    path = new Path(this.device);
    path.addArc(0, 0, size, size, 0, 360);
View Full Code Here

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

              + glossy.height, themeRender.getMenu_control_item_bg_color1(),
              themeRender.getMenu_control_item_bg_color1_alpha(), themeRender
                  .getMenu_control_item_bg_color2(), themeRender
                  .getMenu_control_item_bg_color2_alpha());
          Path path = new Path(null);
          path.addRectangle(glossy.x, glossy.y, glossy.width, glossy.height);
          g.setBackgroundPattern(pattern);
          g.fillPath(path);
          path.dispose();

          // draw border
View Full Code Here

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

    Pattern pattern = new Pattern(null, 0, glossy.y, 0, glossy.y + glossy.height,
        themeRender.getTool_item_bg_color1(), themeRender
        .getTool_item_bg_color1_alpha(), themeRender.getTool_item_bg_color2(),
        themeRender.getTool_item_bg_color2_alpha());
    Path path = new Path(null);
    path.addRectangle(glossy.x, glossy.y, glossy.width, glossy.height);
    gc.setBackgroundPattern(pattern);
    gc.fillPath(path);
    path.dispose();

    // draw border
View Full Code Here

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

                + glossy.height, themeRender.getMenu_item_bg_color1(),
                themeRender.getMenu_item_bg_color1_alpha(), themeRender
                    .getMenu_item_bg_color2(), themeRender
                    .getMenu_item_bg_color2_alpha());
            Path path = new Path(null);
            path.addRectangle(glossy.x, glossy.y, glossy.width, glossy.height);
            gc.setBackgroundPattern(pattern);
            gc.fillPath(path);
            path.dispose();

            path = GraphicsUtil.createRoundRectangle(outerBorder, 2);
View Full Code Here

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

    Pattern pattern = new Pattern(null, 0, glossy.y, 0, glossy.y + glossy.height,
        themeRender.getTool_item_bg_color1(), themeRender
            .getTool_item_bg_color1_alpha(), themeRender.getTool_item_bg_color2(),
        themeRender.getTool_item_bg_color2_alpha());
    Path path = new Path(null);
    path.addRectangle(glossy.x, glossy.y, glossy.width, glossy.height);
    gc.setBackgroundPattern(pattern);
    gc.fillPath(path);
    path.dispose();

    // draw border
View Full Code Here

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

        .getToolbar_bg_glossy_color1_alpha(), themeRender
        .getToolbar_bg_glossy_color2(), themeRender
        .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
View Full Code Here

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

            .getToolbar_bg_glow_color1_alpha(), themeRender
            .getToolbar_bg_glow_color2(), themeRender
            .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;
View Full Code Here

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

    // workaround: path must be usual rectangle, if corner=0
    // otherwise the path is not drawn at all (same happens
    // RoundedRectangles)
    if (cornerHeight <= 0 || cornerWidth <= 0) {
      path.addRectangle(x, y, width, height);
    } else {
      path.moveTo(x, y);
      path.addArc(x, y, cornerWidth, cornerHeight, 90, 90);
      path.addArc(x, bottom - cornerHeight, cornerWidth, cornerHeight, 180, 90);
      path.addArc(right - cornerWidth, bottom - cornerHeight, cornerWidth, cornerHeight, 270, 90);
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.