Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Shape getOutline(AffineTransform lineAt) {
- //Path path = new Path();
- //paint.getTextPath(string, 0, string.length(), 0, 0, path);
- GeneralPath totalPath = new GeneralPath();
- float x=0;
- for(int i=0; i<string.length(); i++){
- Path path = new Path();
- paint.getTextPath(string, i, i+1, x, 0, path);
- x = x+paint.measureText(string,i,i+1);
- GeneralPath gp = new GeneralPath(path);
- totalPath.append(gp, false);
- }
- totalPath.applyTransform(tx);
- totalPath.applyTransform(lineAt);
- return totalPath;
- }
Add Comment
Please, Sign In to add comment