Package java.awt

Examples of java.awt.Canvas.createImage()


                pix[ptr++] = c;
        }
        for (int k = width; k < pix.length; k += width) {
            System.arraycopy(pix, 0, pix, k, width);
        }
        java.awt.Image img = canvas.createImage(new MemoryImageSource(width, height, pix, 0, width));
       
        return img;
    }   
}
View Full Code Here


            for (int x = 0; x < width; ++x) {
                pix[y * width + x] = line[x] == 0 ? f : g;
            }
        }

        java.awt.Image img = canvas.createImage(new MemoryImageSource(width, height, pix, 0, width));
        return img;
    }
}
View Full Code Here

                System.arraycopy(pix, ptr - bitColumns, pix, ptr + bitColumns * (j - 1), bitColumns);
            }
            ptr += bitColumns * (h - 1);
        }

        java.awt.Image img = canvas.createImage(new MemoryImageSource(bitColumns, codeRows * h, pix, 0, bitColumns));
        return img;
    }

    /** Gets the raw image bits of the barcode. The image will have to
     * be scaled in the Y direction by <CODE>yHeight</CODE>.
View Full Code Here

                pix[ptr++] = c;
        }
        for (int k = fullWidth; k < pix.length; k += fullWidth) {
            System.arraycopy(pix, 0, pix, k, fullWidth);
        }
        Image img = canvas.createImage(new MemoryImageSource(fullWidth, height, pix, 0, fullWidth));
       
        return img;
    }
}
View Full Code Here

            }
            idx += barDistance;
        }
        for (int k = limit + width; k < pix.length; k += width)
            System.arraycopy(pix, limit, pix, k, width);
        Image img = canvas.createImage(new MemoryImageSource(width, barTall, pix, 0, width));
       
        return img;
    }
}
View Full Code Here

            }
            idx += barDistance;
        }
        for (int k = limit + width; k < pix.length; k += width)
            System.arraycopy(pix, limit, pix, k, width);
        Image img = canvas.createImage(new MemoryImageSource(width, barTall, pix, 0, width));
       
        return img;
    }
}
View Full Code Here

                pix[ptr++] = c;
        }
        for (int k = width; k < pix.length; k += width) {
            System.arraycopy(pix, 0, pix, k, width);
        }
        Image img = canvas.createImage(new MemoryImageSource(width, height, pix, 0, width));
       
        return img;
    }   
}
View Full Code Here

                pix[ptr++] = c;
        }
        for (int k = fullWidth; k < pix.length; k += fullWidth) {
            System.arraycopy(pix, 0, pix, k, fullWidth);
        }
        Image img = canvas.createImage(new MemoryImageSource(fullWidth, height, pix, 0, fullWidth));
       
        return img;
    }
}
View Full Code Here

            super(imgsrcroot, "offscr", "Offscreen Image", Transparency.OPAQUE);
        }

        public Image makeImage(TestEnvironment env, int w, int h) {
            Canvas c = env.getCanvas();
            return c.createImage(w, h);
        }
    }

    public static class VolatileImg extends TriStateImageType {
        public VolatileImg() {
View Full Code Here

                pix[ptr++] = c;
        }
        for (int k = fullWidth; k < pix.length; k += fullWidth) {
            System.arraycopy(pix, 0, pix, k, fullWidth);
        }
        Image img = canvas.createImage(new MemoryImageSource(fullWidth, height, pix, 0, fullWidth));
       
        return img;
    }
   
    /**
 
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.