Examples of AlphaComposite


Examples of ae.java.awt.AlphaComposite

            return;
        }
        int newCompState;
        CompositeType newCompType;
        if (comp instanceof AlphaComposite) {
            AlphaComposite alphacomp = (AlphaComposite) comp;
            newCompType = CompositeType.forAlphaComposite(alphacomp);
            if (newCompType == CompositeType.SrcOverNoEa) {
                if (paintState == PAINT_OPAQUECOLOR ||
                    (paintState > PAINT_ALPHACOLOR &&
                     paint.getTransparency() == Transparency.OPAQUE))
View Full Code Here

Examples of com.google.code.appengine.awt.AlphaComposite

    @Override
    public boolean equals(Object obj) {
        if(!(obj instanceof AlphaComposite)) {
            return false;
        }
        AlphaComposite other = (AlphaComposite)obj;
        return (this.rule == other.getRule() && this.alpha == other.getAlpha());
    }
View Full Code Here

Examples of com.jgraph.gaeawt.java.awt.AlphaComposite

    CompositeContext cont = null;

    if (comp instanceof AlphaComposite)
    {
      isAlphaComp = true;
      AlphaComposite ac = (AlphaComposite) comp;
      rule = ac.getRule();
      alpha = ac.getAlpha();
    }
    else if (comp instanceof XORComposite)
    {
      isXORComp = true;
      XORComposite xcomp = (XORComposite) comp;
View Full Code Here

Examples of java.awt.AlphaComposite

  {

    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

Examples of java.awt.AlphaComposite

    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

Examples of java.awt.AlphaComposite

        }

        // we want to check that the two objects are equal, but can't rely on
        // AlphaComposite's equals() method because it is just the default
        // method inherited from Object...
        final AlphaComposite ac1 = (AlphaComposite) c1;
        final AlphaComposite ac2 = (AlphaComposite) c2;
        assertEquals(ac1.getRule(), ac2.getRule());
        assertEquals(ac1.getAlpha(), ac2.getAlpha(), 0.001f);
    }
View Full Code Here

Examples of java.awt.AlphaComposite

            stream.writeObject(composite.getClass());
            if (composite instanceof Serializable) {
                stream.writeObject(composite);
            }
            else if (composite instanceof AlphaComposite) {
                final AlphaComposite ac = (AlphaComposite) composite;
                stream.writeInt(ac.getRule());
                stream.writeFloat(ac.getAlpha());
            }
        }
        else {
            stream.writeBoolean(true);
        }
View Full Code Here

Examples of java.awt.AlphaComposite

                pack();
                setSize(600,600);
                addWindowListener(new figureClosingAdapter());
                setVisible(true);
              
               AlphaComposite acomp = AlphaComposite.SrcOver.derive(GlobalValues.alphaComposite);
              
               // set the composite for all the Plot2DPanels within the FrameView
               for (int i = 0; i < canvas.length; i++)  {
                   Plot2DPanel innerPlot = innerPlots[i];
                   Graphics2D g2d = (Graphics2D)innerPlot.getGraphics();
View Full Code Here

Examples of java.awt.AlphaComposite

    public boolean equals(Object o) {
        if (o instanceof SVGComposite) {
            SVGComposite svgc = (SVGComposite)o;
            return (svgc.getRule() == getRule());
        } else if (o instanceof AlphaComposite) {
            AlphaComposite ac = (AlphaComposite)o;
            switch (getRule().getRule()) {
            case CompositeRule.RULE_OVER:
                return (ac == AlphaComposite.SrcOver);
            case CompositeRule.RULE_IN:
                return (ac == AlphaComposite.SrcIn);
View Full Code Here

Examples of java.awt.AlphaComposite

            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
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.