Change moveTo for normal fin shape
This commit is contained in:
		
							parent
							
								
									4446d07902
								
							
						
					
					
						commit
						589d84b2af
					
				| @ -55,22 +55,25 @@ public class PrintableFinSet extends AbstractPrintable<FinSet> { | |||||||
| 
 | 
 | ||||||
|         finPolygon = new GeneralPath(GeneralPath.WIND_NON_ZERO, points.length); |         finPolygon = new GeneralPath(GeneralPath.WIND_NON_ZERO, points.length); | ||||||
|         finTabPolygon = new GeneralPath(GeneralPath.WIND_NON_ZERO, tabPoints.length); |         finTabPolygon = new GeneralPath(GeneralPath.WIND_NON_ZERO, tabPoints.length); | ||||||
|         finPolygon.moveTo(0, 0); |  | ||||||
| 
 | 
 | ||||||
|         minX = Integer.MAX_VALUE; |         minX = Integer.MAX_VALUE; | ||||||
|         minY = Integer.MAX_VALUE;; |         minY = Integer.MAX_VALUE;; | ||||||
|         int maxX = Integer.MIN_VALUE;; |         int maxX = Integer.MIN_VALUE;; | ||||||
|         int maxY = Integer.MIN_VALUE; |         int maxY = Integer.MIN_VALUE; | ||||||
| 
 | 
 | ||||||
|         for (Coordinate point : points) { |         for (int i = 0; i < points.length; i++) { | ||||||
|             final float x = (float) PrintUnit.METERS.toPoints(point.x); |             final float x = (float) PrintUnit.METERS.toPoints(points[i].x); | ||||||
|             final float y = (float) PrintUnit.METERS.toPoints(point.y); |             final float y = (float) PrintUnit.METERS.toPoints(points[i].y); | ||||||
|             minX = (int) Math.min(x, minX); |             minX = (int) Math.min(x, minX); | ||||||
|             minY = (int) Math.min(y, minY); |             minY = (int) Math.min(y, minY); | ||||||
|             maxX = (int) Math.max(x, maxX); |             maxX = (int) Math.max(x, maxX); | ||||||
|             maxY = (int) Math.max(y, maxY); |             maxY = (int) Math.max(y, maxY); | ||||||
|  |             if (i == 0) { | ||||||
|  |                 finPolygon.moveTo(x, y); | ||||||
|  |             } else { | ||||||
|                 finPolygon.lineTo(x, y); |                 finPolygon.lineTo(x, y); | ||||||
|             } |             } | ||||||
|  |         } | ||||||
|         finPolygon.closePath(); |         finPolygon.closePath(); | ||||||
| 
 | 
 | ||||||
|         for (int i = 0; i < tabPoints.length; i++) { |         for (int i = 0; i < tabPoints.length; i++) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user