|
|
@ -92,6 +92,31 @@ public class Panel extends JPanel implements Runnable,KeyListener { |
|
|
|
p.ACTUAL_WINDOW_WIDTH=(int)d.getWidth(); |
|
|
|
p.ACTUAL_WINDOW_WIDTH=(int)d.getWidth(); |
|
|
|
p.ACTUAL_WINDOW_HEIGHT=(int)d.getHeight(); |
|
|
|
p.ACTUAL_WINDOW_HEIGHT=(int)d.getHeight(); |
|
|
|
p.init(false); |
|
|
|
p.init(false); |
|
|
|
|
|
|
|
/*{ |
|
|
|
|
|
|
|
int32_t ww = vScreenSize.x * vPixelSize.x; |
|
|
|
|
|
|
|
int32_t wh = vScreenSize.y * vPixelSize.y; |
|
|
|
|
|
|
|
float wasp = (float)ww / (float)wh; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (bPixelCohesion) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
vScreenPixelSize = (vWindowSize / vScreenSize); |
|
|
|
|
|
|
|
vViewSize = (vWindowSize / vScreenSize) * vScreenSize; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
vViewSize.x = (int32_t)vWindowSize.x; |
|
|
|
|
|
|
|
vViewSize.y = (int32_t)((float)vViewSize.x / wasp); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (vViewSize.y > vWindowSize.y) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
vViewSize.y = vWindowSize.y; |
|
|
|
|
|
|
|
vViewSize.x = (int32_t)((float)vViewSize.y * wasp); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vViewPos = (vWindowSize - vViewSize) / 2; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
*/ |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
p = new Panel(f); |
|
|
|
p = new Panel(f); |
|
|
@ -287,6 +312,7 @@ public class Panel extends JPanel implements Runnable,KeyListener { |
|
|
|
//System.out.println("X:"+(Math.sin(theta)*r+center_x)+" Y:"+(Math.cos(theta)*r+center_y));
|
|
|
|
//System.out.println("X:"+(Math.sin(theta)*r+center_x)+" Y:"+(Math.cos(theta)*r+center_y));
|
|
|
|
points.add(new Point<Double>((double)(Math.round(Math.sin(theta)*r+center_x)),(double)(Math.round(Math.cos(theta)*r+center_y)))); |
|
|
|
points.add(new Point<Double>((double)(Math.round(Math.sin(theta)*r+center_x)),(double)(Math.round(Math.cos(theta)*r+center_y)))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
points.add(points.get(1)); |
|
|
|
FillPolygon(0d,0d,col,points,PolygonStructure.FAN); |
|
|
|
FillPolygon(0d,0d,col,points,PolygonStructure.FAN); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -307,6 +333,7 @@ public class Panel extends JPanel implements Runnable,KeyListener { |
|
|
|
newP.y+=center_y; |
|
|
|
newP.y+=center_y; |
|
|
|
points.add(newP); |
|
|
|
points.add(newP); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
points.add(points.get(1)); |
|
|
|
FillPolygon(0d,0d,col,points,PolygonStructure.FAN); |
|
|
|
FillPolygon(0d,0d,col,points,PolygonStructure.FAN); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|