Package java.awt

Examples of java.awt.Composite


    @Override
    public void paint(Graphics2D g)
    {
        g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        origAlpha = 1.0f;
        Composite origComposite = g.getComposite();
        if (origComposite instanceof AlphaComposite)
        {
            AlphaComposite origAlphaComposite = (AlphaComposite) origComposite;
            if (origAlphaComposite.getRule() == AlphaComposite.SRC_OVER)
                origAlpha = origAlphaComposite.getAlpha();
View Full Code Here


        if ((at == null) || (at.isIdentity()))
            at = g2dAt;
        else
            at.preConcatenate(g2dAt);

        Composite g2dComposite = g2d.getComposite();

        if (false) {
            System.out.println("CR: " + cr);
            System.out.println("CRR: " + cr.getBounds());
        }
View Full Code Here

            // Apply an alpha composite if the opacity value is less than
            // the current alpha
            float alpha = 1.0f;

            Composite composite = imageGraphics.getComposite();
            if (composite instanceof AlphaComposite) {
                AlphaComposite alphaComposite = (AlphaComposite)composite;
                alpha = alphaComposite.getAlpha();
            }
View Full Code Here

    Rectangle alloc = bounds.getBounds();

    // Set up translucency if necessary.
    Graphics2D g2d = (Graphics2D)g;
    Composite originalComposite = null;
    if (getAlpha()<1.0f) {
      originalComposite = g2d.getComposite();
      g2d.setComposite(getAlphaComposite());
    }
View Full Code Here

            Shape bounds, JTextComponent c, View view) {


    // Set up translucency if necessary.
    Graphics2D g2d = (Graphics2D)g;
    Composite originalComposite = null;
    if (getAlpha()<1.0f) {
      originalComposite = g2d.getComposite();
      g2d.setComposite(getAlphaComposite());
    }
View Full Code Here

     *         case a createRendering should be used).
     */
    public boolean paintRable(Graphics2D g2d) {
        // This optimization only apply if we are using
        // SrcOver.  Otherwise things break...
        Composite c = g2d.getComposite();
        if (!SVGComposite.OVER.equals(c))
            return false;
       
        GraphicsUtil.drawImage(g2d, getSource());

View Full Code Here

     *         case a createRendering should be used).
     */
    public boolean paintRable(Graphics2D g2d) {
        // This optimization only apply if we are using
        // SrcOver.  Otherwise things break...
        Composite c = g2d.getComposite();
        if (!SVGComposite.OVER.equals(c))
            return false;
       
        ColorSpace g2dCS = GraphicsUtil.getDestinationColorSpace(g2d);
        if ((g2dCS == null) ||
View Full Code Here

    protected void processTextPosition( TextPosition text )
    {
        try
        {
            PDGraphicsState graphicsState = getGraphicsState();
            Composite composite;
            Paint paint;
            switch(graphicsState.getTextState().getRenderingMode())
            {
                case PDTextState.RENDERING_MODE_FILL_TEXT:
                    composite = graphicsState.getNonStrokeJavaComposite();
View Full Code Here

     *         case a createRendering should be used).
     */
    public boolean paintRable(Graphics2D g2d) {
        // This optimization only apply if we are using
        // SrcOver.  Otherwise things break...
        Composite c = g2d.getComposite();
        if (!SVGComposite.OVER.equals(c))
            return false;

        if (getPadMode() != PadMode.ZERO_PAD)
            return false;
View Full Code Here

     *         case a createRendering should be used).
     */
    public boolean paintRable(Graphics2D g2d) {
        // This optimization only apply if we are using
        // SrcOver.  Otherwise things break...
        Composite c = g2d.getComposite();
        if (!SVGComposite.OVER.equals(c))
            return false;

        // For the over mode we can just draw them in order...
        if (getCompositeRule() != CompositeRule.OVER)
View Full Code Here

TOP

Related Classes of java.awt.Composite

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.