Examples of XORComposite


Examples of org.apache.harmony.awt.gl.XORComposite

                y2 += ty;

                drawLine(display, drawable, gc, x1, y1, x2, y2);      

                if (xor_mode) {
                    XORComposite xor = (XORComposite)composite;
                    Color xorcolor = xor.getXORColor();
                    xSetForeground(xorcolor.getRGB());
                    drawLine(display, drawable, gc, x1, y1, x2, y2);      
                    xSetForeground(fgColor.getRGB());
                }
            } else {

                float points[] = new float[]{x1, y1, x2, y2};
                transform.transform(points, 0, points, 0, 2);

                x1 = (int)points[0];
                y1 = (int)points[1];
                x2 = (int)points[2];
                y2 = (int)points[3];

                drawLine(display, drawable, gc, x1, y1, x2, y2);      

                if (xor_mode) {
                    XORComposite xor = (XORComposite)composite;
                    Color xorcolor = xor.getXORColor();
                    xSetForeground(xorcolor.getRGB());
                    drawLine(display, drawable, gc, x1, y1, x2, y2);      
                    xSetForeground(fgColor.getRGB());
                }
            }
View Full Code Here

Examples of org.apache.harmony.awt.gl.XORComposite

                drawLines(display, drawable, gc, points, points.length);
            }

            if (xor_mode) {
                XORComposite xor = (XORComposite)composite;
                Color xorcolor = xor.getXORColor();
                xSetForeground(xorcolor.getRGB());
                drawLines(display, drawable, gc, points, points.length);
                xSetForeground(fgColor.getRGB());
            }
        } else {
View Full Code Here

Examples of org.apache.harmony.awt.gl.XORComposite

                drawLines(display, drawable, gc, points, points.length);
            }

            if (xor_mode) {
                XORComposite xor = (XORComposite)composite;
                Color xorcolor = xor.getXORColor();
                xSetForeground(xorcolor.getRGB());
                drawLines(display, drawable, gc, points, points.length);
                xSetForeground(fgColor.getRGB());
            }
        } else {
View Full Code Here

Examples of org.apache.harmony.awt.gl.XORComposite

                x += (int)transform.getTranslateX();
                y += (int)transform.getTranslateY();
                drawRectangle(display, drawable, gc, x, y, width, height);

                if (xor_mode) {
                    XORComposite xor = (XORComposite)composite;
                    Color xorcolor = xor.getXORColor();
                    xSetForeground(xorcolor.getRGB());
                    drawRectangle(display, drawable, gc, x, y, width, height);
                    xSetForeground(fgColor.getRGB());
                }

            } else if (type < 7) {
                float points[] = new float[]{x, y, x + width - 1, y + height - 1};
                transform.transform(points, 0, points, 0, 2);

                if (points[0] < points[2]){
                    x = (int)points[0];
                    width = (int)(points[2] - points[0]) + 1;
                } else {
                    x = (int)points[2];
                    width = (int)(points[0] - points[2]) + 1;
                }

                if (points[1] < points[3]){
                    y = (int)points[1];
                    height = (int)(points[3] - points[1]) + 1;
                } else {
                    y = (int)points[3];
                    height = (int)(points[1] - points[3]) + 1;
                }

                drawRectangle(display, drawable, gc, x, y, width, height);

                if (xor_mode) {
                    XORComposite xor = (XORComposite)composite;
                    Color xorcolor = xor.getXORColor();
                    xSetForeground(xorcolor.getRGB());
                    drawRectangle(display, drawable, gc, x, y, width, height);
                    xSetForeground(fgColor.getRGB());
                }
            } else {
                float fpoints[] = new float[]{x, y, x + width - 1, y, x + width - 1, y + height - 1, x, y + height - 1};
                transform.transform(fpoints, 0, fpoints, 0, 4);

                short points[] = new short[fpoints.length + 2];

                int i = 0;
                for (; i < fpoints.length; i++)
                    points[i] = (short)(fpoints[i] + 0.5f);
                points[i++] = (short)(fpoints[0] + 0.5f);
                points[i++] = (short)(fpoints[1] + 0.5f);

                drawLines(display, drawable, gc, points, points.length);

                if (xor_mode) {
                    XORComposite xor = (XORComposite)composite;
                    Color xorcolor = xor.getXORColor();
                    xSetForeground(xorcolor.getRGB());
                    drawLines(display, drawable, gc, points, points.length);
                    xSetForeground(fgColor.getRGB());
                }
            }
View Full Code Here

Examples of org.apache.harmony.awt.gl.XORComposite

                    width, height,
                    sa << 6, ea << 6
            );

            if (xor_mode) {
                XORComposite xor = (XORComposite)composite;
                Color xorcolor = xor.getXORColor();
                xSetForeground(xorcolor.getRGB());
                drawArc(
                        display,
                        drawable,
                        gc,
View Full Code Here

Examples of org.apache.harmony.awt.gl.XORComposite

                x += (int)transform.getTranslateX();
                y += (int)transform.getTranslateY();
                fillRectangle(display, drawable, gc, x, y, width, height);

                if (xor_mode) {
                    XORComposite xor = (XORComposite)composite;
                    Color xorcolor = xor.getXORColor();
                    xSetForeground(xorcolor.getRGB());
                    fillRectangle(display, drawable, gc, x, y, width, height);
                    xSetForeground(fgColor.getRGB());
                }

            } else if (type < 7) {
                float points[] = new float[]{x, y, x + width - 1, y + height - 1};
                transform.transform(points, 0, points, 0, 2);

                if (points[0] < points[2]){
                    x = (int)points[0];
                    width = (int)(points[2] - points[0]) + 1;
                } else {
                    x = (int)points[2];
                    width = (int)(points[0] - points[2]) + 1;
                }

                if (points[1] < points[3]){
                    y = (int)points[1];
                    height = (int)(points[3] - points[1]) + 1;
                } else {
                    y = (int)points[3];
                    height = (int)(points[1] - points[3]) + 1;
                }

                fillRectangle(display, drawable, gc, x, y, width, height);

                if (xor_mode) {
                    XORComposite xor = (XORComposite)composite;
                    Color xorcolor = xor.getXORColor();
                    xSetForeground(xorcolor.getRGB());
                    fillRectangle(display, drawable, gc, x, y, width, height);
                    xSetForeground(fgColor.getRGB());
                }
            } else {
                float points[] = new float[]{x, y, x + width - 1, y, x + width - 1, y + height - 1, x, y + height - 1};
                transform.transform(points, 0, points, 0, 4);

                short spoints[] = new short[points.length];
                for (int i = 0; i < points.length; i++)
                    spoints[i] = (short)(points[i] + 0.5f);
                fillPolygon(display, drawable, gc, spoints, spoints.length);

                if (xor_mode) {
                    XORComposite xor = (XORComposite)composite;
                    Color xorcolor = xor.getXORColor();
                    xSetForeground(xorcolor.getRGB());
                    fillPolygon(display, drawable, gc, spoints, spoints.length);
                    xSetForeground(fgColor.getRGB());
                }
            }
View Full Code Here

Examples of org.apache.harmony.awt.gl.XORComposite

            int vertices[] = mra.rect;
            int numVert = vertices[0] - 1;
            fillRectangles(display, drawable, gc, vertices, numVert);

            if (xor_mode) {
                XORComposite xor = (XORComposite)composite;
                Color xorcolor = xor.getXORColor();
                xSetForeground(xorcolor.getRGB());
                fillRectangles(display, drawable, gc, vertices, numVert);
                xSetForeground(fgColor.getRGB());
            }
        } else {
View Full Code Here

Examples of org.apache.harmony.awt.gl.XORComposite

                fillPolygon(display, drawable, gc, points, points.length);
            }

            if (xor_mode) {
                XORComposite xor = (XORComposite)composite;
                Color xorcolor = xor.getXORColor();
                xSetForeground(xorcolor.getRGB());
                fillPolygon(display, drawable, gc, points, points.length);
                xSetForeground(fgColor.getRGB());
            }
        } else {
View Full Code Here

Examples of org.apache.harmony.awt.gl.XORComposite

                    width, height,
                    sa << 6, ea << 6
            );

            if (xor_mode) {
                XORComposite xor = (XORComposite)composite;
                Color xorcolor = xor.getXORColor();
                xSetForeground(xorcolor.getRGB());
                fillArc(
                        display,
                        drawable,
                        gc,
View Full Code Here

Examples of org.apache.harmony.awt.gl.XORComposite

            AlphaComposite ac = (AlphaComposite) comp;
            rule = ac.getRule();
            alpha = ac.getAlpha();
        }else if(comp instanceof XORComposite){
            isXORComp = true;
            XORComposite xcomp = (XORComposite) comp;
            xorcolor = xcomp.getXORColor();
        }else{
            cont = comp.createContext(srcCM, dstCM, null);
        }

        for(int i = 1; i < clipRects[0]; i += 4){
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.