1 package com.octo.captcha.component.image.textpaster.glyphsvisitor;
2
3 import com.octo.captcha.component.image.textpaster.Glyphs;
4
5 import java.awt.geom.Rectangle2D;
6
7 /***
8 * @author mag
9 * @Date 6 mars 2008
10 */
11 public class MoveAllGlyphsToOriginVisitor implements GlyphsVisitors {
12
13
14 public void visit(Glyphs glyphs, Rectangle2D backroundBounds) {
15 for(int i=0;i< glyphs.size();i++){
16
17 double tx =-glyphs.getX(i);
18 double ty =-glyphs.getY(i);
19 glyphs.translate(i,tx,ty);
20 }
21 }
22 }