Package java.awt.geom

Examples of java.awt.geom.GeneralPath.transform()


                glyphIndex = getChar2Glyph()[i];
                result.append(getGlyphVector().getGlyphVisualBounds(glyphIndex), false);
            }

            // Shift to the segment's coordinates
            result.transform(AffineTransform.getTranslateInstance(x, y));

            return result;
        }

        /**
 
View Full Code Here


            at.translate(visualPositions[idx], visualPositions[idx+1]);
            return(at.createTransformedShape(blackBox));
        }

        GeneralPath shape = (GeneralPath)this.getGlyphOutline(glyphIndex);
        shape.transform(at);
        return shape.getBounds2D();
    }

    /**
     * Returnes the pixel bounds of the specified glyph within GlyphVector
View Full Code Here

        if (frc != null){
            at.concatenate(frc.getTransform());
        }

        shape.transform(at);

        Rectangle bounds = shape.getBounds();
        return new Rectangle((int)bounds.getX(), (int)bounds.getY(),
                            (int)bounds.getWidth()-1, (int)bounds.getHeight()-1);
        }
View Full Code Here

            at.preConcatenate(glyphAT);
        }

        int idx  = glyphIndex << 1;

        gp.transform(at);
        gp.transform(AffineTransform.getTranslateInstance(visualPositions[idx], visualPositions[idx+1]));
        return gp;
    }

View Full Code Here

        GeneralPath gp = new GeneralPath(GeneralPath.WIND_EVEN_ODD);
        for (int i = 0; i < this.vector.length; i++) {
            GeneralPath outline = (GeneralPath)getGlyphOutline(i);

            /* Applying translation to actual visual bounds */
            outline.transform(AffineTransform.getTranslateInstance(x, y));
            gp.append(outline, false);
        }

        return gp;
    }
View Full Code Here

            at.concatenate(glyphTransform);
        }

        /* Applying translation to actual visual bounds */
        at.preConcatenate(AffineTransform.getTranslateInstance(x0, y0));
        gp.transform(at);
        return gp;
    }

    /**
     * Returns the Font parameter of this GlyphVector
View Full Code Here

            dstShape.append(tlc.getOutline(locs[n], locs[n+1]), false);
        }

        if (tx != null) {
            dstShape.transform(tx);
        }
        return dstShape;
    }

    public int hashCode() {
View Full Code Here

    rombus.moveTo(x - 14, y);
    rombus.lineTo(x - 7, y - 5);
    rombus.lineTo(x, y);
    rombus.lineTo(x - 7, y + 5);
    rombus.closePath();
    rombus.transform(rotationTransform);
    Color fillColor = filled ? Color.BLACK : Color.WHITE;
    drawingContext.draw(rombus, fillColor);
  }
}
View Full Code Here

    rombus.moveTo(x - 14, y);
    rombus.lineTo(x - 7, y - 5);
    rombus.lineTo(x, y);
    rombus.lineTo(x - 7, y + 5);
    rombus.closePath();
    rombus.transform(rotationTransform);
    Color fillColor = filled ? Color.BLACK : Color.WHITE;
    drawingContext.draw(rombus, fillColor);
  }

  /**
 
View Full Code Here

    GeneralPath arrow = new GeneralPath();
    arrow.moveTo(x - 9, y - 5);
    arrow.lineTo(x, y);
    arrow.lineTo(x - 9, y + 5);
    arrow.closePath();
    arrow.transform(rotationTransform);
    drawingContext.draw(arrow, Color.WHITE);
  }
}
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.