예제 #1
0
 public UPath translate(double dx, double dy) {
   final UPath result = new UPath();
   for (USegment seg : segments) {
     result.addInternal(seg.translate(dx, dy));
   }
   return result;
 }
예제 #2
0
 public UPath rotate(double theta) {
   final UPath result = new UPath();
   for (USegment seg : segments) {
     result.addInternal(seg.rotate(theta));
   }
   return result;
 }
예제 #3
0
 private void addInternal(USegment segment) {
   segments.add(segment);
   final double coord[] = segment.getCoord();
   if (segment.getSegmentType() == USegmentType.SEG_ARCTO) {
     minmax = minmax.addPoint(coord[5], coord[6]);
     // minmax = minmax.addPoint(coord[5] + coord[0], coord[6] + coord[1]);
     // minmax = minmax.addPoint(coord[5] - coord[0], coord[6] - coord[1]);
   } else {
     for (int i = 0; i < coord.length; i += 2) {
       minmax = minmax.addPoint(coord[i], coord[i + 1]);
     }
   }
 }