Guest User

Untitled

a guest
Nov 17th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. public Shape getOutline(AffineTransform lineAt) {
  2. //Path path = new Path();
  3. //paint.getTextPath(string, 0, string.length(), 0, 0, path);
  4. GeneralPath totalPath = new GeneralPath();
  5. float x=0;
  6. for(int i=0; i<string.length(); i++){
  7. Path path = new Path();
  8. paint.getTextPath(string, i, i+1, x, 0, path);
  9. x = x+paint.measureText(string,i,i+1);
  10. GeneralPath gp = new GeneralPath(path);
  11. totalPath.append(gp, false);
  12. }
  13. totalPath.applyTransform(tx);
  14. totalPath.applyTransform(lineAt);
  15. return totalPath;
  16. }
Add Comment
Please, Sign In to add comment