Revision 14 trunk/libraries/libCq CMS for java.old/src/org/cresques/px/dxf/DxfLwPolyline.java
DxfLwPolyline.java | ||
---|---|---|
3 | 3 |
*/ |
4 | 4 |
package org.cresques.px.dxf; |
5 | 5 |
|
6 |
import java.awt.geom.Point2D; |
|
7 |
import java.util.Iterator; |
|
8 |
|
|
6 | 9 |
import org.cresques.geo.Projection; |
10 |
import org.cresques.io.DxfGroup; |
|
7 | 11 |
|
8 | 12 |
/** |
9 | 13 |
* @author "Luis W. Sevilla" <sevilla_lui@gva.es> |
... | ... | |
16 | 20 |
/* (non-Javadoc) |
17 | 21 |
* @see org.cresques.px.dxf.DxfEntity#toDxfFileString() |
18 | 22 |
*/ |
19 |
public String toDxfFileString() { |
|
20 |
// TODO Auto-generated method stub |
|
21 |
return null; |
|
23 |
public String toDxfString() { |
|
24 |
StringBuffer sb = null; |
|
25 |
sb = new StringBuffer( DxfGroup.toString(0, "LWPOLYLINE") ); |
|
26 |
sb.append( DxfGroup.toString(8, layer.getName()) ); |
|
27 |
sb.append( DxfGroup.toString(62, dxfColor) ); |
|
28 |
sb.append( DxfGroup.toString(70, flags) ); |
|
29 |
|
|
30 |
sb.append( DxfGroup.toString(90, pts.size()) ); |
|
31 |
Point2D pt = null; |
|
32 |
Iterator iter = pts.iterator(); |
|
33 |
while (iter.hasNext()) { |
|
34 |
pt = (Point2D) iter.next(); |
|
35 |
sb.append( DxfGroup.toString(10, pt.getX(), 6) ); |
|
36 |
sb.append( DxfGroup.toString(20, pt.getY(), 6) ); |
|
37 |
} |
|
38 |
return sb.toString(); |
|
22 | 39 |
} |
23 | 40 |
} |
Also available in: Unified diff