Package java.awt

Examples of java.awt.AlphaComposite


        int bgRGB = bgcolor == null ? 0 : bgcolor.getRGB();
        int srcRGB = 0, dstRGB = 0;
        Object srcVal = null, dstVal = null;
        if(comp instanceof AlphaComposite){
            compType = AlphaCompositeMode;
            AlphaComposite ac = (AlphaComposite) comp;
            rule = ac.getRule();
            srcConstAlpha = (int)(ac.getAlpha() * 255 + 0.5f);
        }else if(comp instanceof XORComposite){
            compType = XORMode;
            XORComposite xor = (XORComposite) comp;
            bgRGB = xor.getXORColor().getRGB();
        }
View Full Code Here


                String errMsg = "Please select Text Position.";
                request.setAttribute("_ERROR_MESSAGE_", errMsg);
                return "error";
            }
           
            AlphaComposite alphaComposite = null;
            if (UtilValidate.isNotEmpty(opacity)) {
                BigDecimal opa = new BigDecimal(opacity);
                alphaComposite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, opa.floatValue());
                watermarkerSettings.setAlphaComposite(alphaComposite);
            }
View Full Code Here

        File file = new File(imageServerPath + "/preview/" + "/previewImage" + count  + ".jpg");
        file.delete();
        BigDecimal widthBase = new BigDecimal(600.00);
        Integer currentPic = Integer.parseInt(count);
        int nextPic = currentPic.intValue() + 1;
        AlphaComposite alphaComposite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, opa.floatValue());
        WatermarkSettings position = new WatermarkSettings();
        position.setX(positionX.floatValue());
        position.setY(positionY.floatValue());
        Color graphicsColor = setFontColor(fontColor);
        Font graphicsFont = setFontSize(fontSize, picWidth.divide(widthBase, 2));
View Full Code Here

   */
  public void setComposite(final Composite comp)
  {
    if (comp instanceof AlphaComposite)
    {
      final AlphaComposite composite = (AlphaComposite) comp;
      if (composite.getRule() == 3)
      {
        alpha = composite.getAlpha();
        this.composite = composite;

        if (realPaint != null && (realPaint instanceof Color))
        {
          final Color c = (Color) realPaint;
View Full Code Here

    realPaint = paint;

    if ((composite instanceof AlphaComposite) && (paint instanceof Color))
    {

      final AlphaComposite co = (AlphaComposite) composite;

      if (co.getRule() == 3)
      {
        final Color c = (Color) paint;
        this.paint = new Color(c.getRed(), c.getGreen(), c.getBlue(), (int) ((float) c.getAlpha() * alpha));
        realPaint = paint;
      }
View Full Code Here

  {

    if (comp instanceof AlphaComposite)
    {

      final AlphaComposite composite = (AlphaComposite) comp;

      if (composite.getRule() == 3)
      {

        alpha = composite.getAlpha();
        this.composite = composite;

        if (realPaint != null && (realPaint instanceof Color))
        {
View Full Code Here

    realPaint = paint;

    if ((composite instanceof AlphaComposite) && (paint instanceof Color))
    {

      final AlphaComposite co = (AlphaComposite) composite;

      if (co.getRule() == 3)
      {
        final Color c = (Color) paint;
        this.paint = new Color(c.getRed(), c.getGreen(), c.getBlue(), (int) ((float) c.getAlpha() * alpha));
        realPaint = paint;
      }
View Full Code Here

            if(numVertex == 0) {
                return;
            }

            if(comp instanceof AlphaComposite){
                AlphaComposite ac = (AlphaComposite) comp;
                int compType = ac.getRule();
                float alpha = ac.getAlpha();
                if(srcSurf instanceof ImageSurface){
                    if(bgcolor == null || srcSurf.getTransparency() == Transparency.OPAQUE){
                        bltImage(srcX, srcY, srcSurfStruct, srcSurf.getData(),
                                dstX, dstY, dstSurfStruct,
                                width, height, compType, alpha,
View Full Code Here

            return;
        }

        if ((composite != null) &&
            (composite instanceof AlphaComposite)) {
            AlphaComposite ac = (AlphaComposite)composite;
            if (ac.getAlpha() < 0.001)
                return;         // No point in drawing
        }

        // Set up graphic context. It is important to setup the transform first,
        // because the clip is defined in this node's user space.
View Full Code Here

            return;
        }

        if ((composite != null) &&
            (composite instanceof AlphaComposite)) {
            AlphaComposite ac = (AlphaComposite)composite;
            if (ac.getAlpha() < 0.001)
                return;         // No point in drawing
        }

        // Set up graphic context. It is important to setup the transform first,
        // because the clip is defined in this node's user space.
View Full Code Here

TOP

Related Classes of java.awt.AlphaComposite

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.