Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.GC.fillPolygon()


       
       
        triangle[4] (int) (x0 - deltaXXs[iAngle] * 4 + (r1) * deltaYXs[iAngle] + 0.5);
        triangle[5] (int) (y0 - deltaXYs[iAngle] * 4 + (r1) * deltaYYs[iAngle] + 0.5);
       
        gcBuffer.fillPolygon(triangle);
      }
     
     
     
      if(percent_sent >= 0) {
View Full Code Here


        triangle[3] (int) (y0 + deltaXYs[iAngle] * 4 + (r1-10) * deltaYYs[iAngle] + 0.5);
       
       
        triangle[4] (int) (x0 - deltaXXs[iAngle] * 4 + (r1-10) * deltaYXs[iAngle] + 0.5);
        triangle[5] (int) (y0 - deltaXYs[iAngle] * 4 + (r1-10) * deltaYYs[iAngle] + 0.5);
        gcBuffer.fillPolygon(triangle);
      }
     
     
     
      int x1 = x0 + (int) (r * deltaYXs[iAngle]);
 
View Full Code Here

   
    // draw used segment
    gc.setBackground(barUsedSegmentColor);
    int up_coord = getUpCoord();
    int down_coord = getDownCoord();
    gc.fillPolygon(new int[] { up_coord,y,down_coord,y,down_coord,y + bar_height, up_coord, y + bar_height});
   
    // draw pointers
    gc.setBackground(pointerColor);
    gc.fillPolygon(new int[] { up_coord, y, up_coord + pointer_width, y - pointer_height, up_coord - pointer_width, y - pointer_height});
    int y2 = y + bar_height;
View Full Code Here

    int down_coord = getDownCoord();
    gc.fillPolygon(new int[] { up_coord,y,down_coord,y,down_coord,y + bar_height, up_coord, y + bar_height});
   
    // draw pointers
    gc.setBackground(pointerColor);
    gc.fillPolygon(new int[] { up_coord, y, up_coord + pointer_width, y - pointer_height, up_coord - pointer_width, y - pointer_height});
    int y2 = y + bar_height;
    gc.fillPolygon(new int[] { down_coord, y2, down_coord + pointer_width, y2 + pointer_height, down_coord - pointer_width, y2 + pointer_height});
    gc.dispose();
  }
View Full Code Here

   
    // draw pointers
    gc.setBackground(pointerColor);
    gc.fillPolygon(new int[] { up_coord, y, up_coord + pointer_width, y - pointer_height, up_coord - pointer_width, y - pointer_height});
    int y2 = y + bar_height;
    gc.fillPolygon(new int[] { down_coord, y2, down_coord + pointer_width, y2 + pointer_height, down_coord - pointer_width, y2 + pointer_height});
    gc.dispose();
  }

  private SelectedPointer getSelectedPointer(int x,int y) {
    int up_coord = getUpCoord();
View Full Code Here

                gc.setLineWidth( w );
               
                int[] points = { 1,14, 3,9, 4,66,49,3, 14,1, 14,14 };

                gc.setAlpha(f.getAlpha());
                gc.fillPolygon(points);
                gc.setAlpha(c.getAlpha());
                gc.drawPolygon(points);
               
                ImageData clone = (ImageData) swtImage.getImageData().clone();
                swtImage.dispose();
View Full Code Here

      gc.setForeground(SwtConsts.COLOR_DARK_CYAN);
      gc.setBackground(SwtConsts.COLOR_CYAN);
      int fullM1 = size - 1;
      int halfP1 = size - size / 2 + 1;
      int[] pointArray = new int[] { fullM1, fullM1, halfP1, fullM1, fullM1, halfP1 };
      gc.fillPolygon(pointArray);
      gc.drawPolygon(pointArray);
    }

    // Show if this person has images.
    if (person.getImageList().size() > 0) {
View Full Code Here

    if (person.getImageList().size() > 0) {
      gc.setForeground(SwtConsts.COLOR_DARK_CYAN);
      gc.setBackground(getParent().getDisplay().getSystemColor(SWT.COLOR_CYAN));
      int halfP1 = size / 2 - 1;
      int[] pointArray = new int[] { 0, 0, halfP1, 0, 0, halfP1 };
      gc.fillPolygon(pointArray);
      gc.drawPolygon(pointArray);
    }
  }
}
View Full Code Here

        } else if (selectedIndex == -1 && gradientColors != null && gradientColors.length > 1 && !gradientVertical) {
          drawBackground(gc, shape, false);
        } else {
          try {
            gc.setBackground(selectedIndex == -1 ? getBackground() : selectionBackground);
            gc.fillPolygon(shape);
          }catch (Exception e) {
          }
        }
      }
      //Draw client area
View Full Code Here

        drawBackground(gc, shape, true);
      } else if (selectedIndex == -1 && gradientColors != null && gradientColors.length > 1 && !gradientVertical) {
        drawBackground(gc, shape, false);
      } else {
        gc.setBackground(selectedIndex == -1 ? getBackground() : selectionBackground);
        gc.fillPolygon(shape);
      }
     
      //draw 1 pixel border
      if (borderLeft > 0) {
        gc.setForeground(borderColor);
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.