Package org.axsl.ps

Examples of org.axsl.ps.BoundingBox


    /**
     * {@inheritDoc}
     */
    protected String specialXObjectDictEntries() {
        final BoundingBox boundingBox = this.getBoundingBox();
        final float llx = boundingBox.lowerLeftX();
        final float lly = boundingBox.lowerLeftY();
        final float urx = boundingBox.upperRightX();
        final float ury = boundingBox.upperRightY();
        final StringBuilder buffer = new StringBuilder();
        buffer.append("/FormType 1" + EOL);
        buffer.append("/BBox [");
        buffer.append(llx + " ");
        buffer.append(lly + " ");
View Full Code Here


     * @return The byte array containing the graphic as PostScript.
     * @throws GraphicException For errors processing the graphic.
     */
    public byte[] epsToPostScript(final EpsGraphic image, final int x,
            final int y, final int w, final int h) throws GraphicException {
        final BoundingBox bbox = image.getBoundingBox();
        final float bboxw = bbox.width();
        final float bboxh = bbox.height();

        StringBuilder buffer = new StringBuilder();
        buffer.append("%%BeginDocument: " + image.getName());
        buffer.append("BeginEPSF");

        buffer.append(x + " " + (y - h) + " translate");
        buffer.append("0.0 rotate");
        buffer.append((long) (w / bboxw) + " " + (long) (h / bboxh) + " scale");
        buffer.append(-bbox.lowerLeftX() + " " + (-bbox.lowerLeftY()) + " translate");
        buffer.append(bbox.lowerLeftX() + " " + bbox.lowerLeftY() + " " + bboxw + " " + bboxh
                + " rectclip");
        buffer.append("newpath");
        final String string1 = buffer.toString();

        buffer = new StringBuilder();
View Full Code Here

    /**
     * {@inheritDoc}
     */
    protected AffineTransform getUserSpaceTransform() {
        final BoundingBox boundingBox = this.getBoundingBox();
        final float llx = boundingBox.lowerLeftX();
        final float lly = boundingBox.lowerLeftY();
        float xTranslate = 0;
        if (llx < 0) {
            /* If the bounding box of the graphic is negative, adjust it up to
             * zero. */
            xTranslate -= llx;
View Full Code Here

TOP

Related Classes of org.axsl.ps.BoundingBox

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.