mirror of
https://github.com/meteoinfo/MeteoInfo.git
synced 2025-12-08 20:36:05 +00:00
bugfix for EarthGLPlot
This commit is contained in:
parent
df767d471f
commit
aab565f4ff
@ -210,6 +210,78 @@ public class EarthGLPlot extends GLPlot {
|
||||
|
||||
@Override
|
||||
public void display(GLAutoDrawable drawable) {
|
||||
final GL2 gl = drawable.getGL().getGL2();
|
||||
gl.glLoadIdentity();
|
||||
|
||||
this.updateTextRender(this.xAxis.getTickLabelFont());
|
||||
|
||||
//Set light position - follow glLoadIdentity
|
||||
this.lighting.setPosition(gl);
|
||||
|
||||
gl.glPushMatrix();
|
||||
|
||||
if (pitchAngle != 0) {
|
||||
float scale = getScale();
|
||||
gl.glTranslatef(0, 0, scale);
|
||||
gl.glRotatef(70.f * (pitchAngle / 90.f), 1.0f, 0.0f, 0.0f);
|
||||
gl.glTranslatef(0, 0, -scale);
|
||||
}
|
||||
gl.glRotatef(angleX, 1.0f, 0.0f, 0.0f);
|
||||
gl.glRotatef(angleY, 0.0f, 0.0f, 1.0f);
|
||||
if (headAngle != 0) {
|
||||
gl.glRotatef(headAngle, 0.0f, 1.0f, 0.0f);
|
||||
}
|
||||
|
||||
this.updateMatrix(gl);
|
||||
|
||||
//Lighting
|
||||
this.setLight(gl);
|
||||
|
||||
for (int m = 0; m < this.graphics.getNumGraphics(); m++) {
|
||||
Graphic graphic = this.graphics.get(m);
|
||||
drawGraphics(gl, graphic);
|
||||
}
|
||||
|
||||
//Stop lighting
|
||||
if (this.lighting.isEnable()) {
|
||||
this.lighting.stop(gl);
|
||||
}
|
||||
|
||||
//Draw axis
|
||||
this.drawAllZAxis(gl);
|
||||
|
||||
//Draw legend
|
||||
gl.glPopMatrix();
|
||||
this.updateMatrix(gl);
|
||||
if (!this.legends.isEmpty()) {
|
||||
ChartColorBar legend = (ChartColorBar) this.legends.get(0);
|
||||
if (legend.getLegendScheme().getColorMap() == null)
|
||||
this.drawLegend(gl, legend);
|
||||
else
|
||||
this.drawColorbar(gl, legend);
|
||||
}
|
||||
|
||||
//Draw title
|
||||
this.drawTitle();
|
||||
|
||||
this.textRenderer.dispose();
|
||||
this.textRenderer = null;
|
||||
|
||||
gl.glFlush();
|
||||
|
||||
/*//Do screenshot
|
||||
if (this.doScreenShot) {
|
||||
AWTGLReadBufferUtil glReadBufferUtil = new AWTGLReadBufferUtil(drawable.getGLProfile(), false);
|
||||
this.screenImage = glReadBufferUtil.readPixelsToBufferedImage(drawable.getGL(), true);
|
||||
this.doScreenShot = false;
|
||||
}*/
|
||||
|
||||
//Disable always update buffers
|
||||
if (this.alwaysUpdateBuffers)
|
||||
this.alwaysUpdateBuffers = false;
|
||||
}
|
||||
|
||||
public void display_bak(GLAutoDrawable drawable) {
|
||||
final GL2 gl = drawable.getGL().getGL2();
|
||||
float[] rgba = this.background.getRGBComponents(null);
|
||||
gl.glClearColor(rgba[0], rgba[1], rgba[2], rgba[3]);
|
||||
|
||||
@ -9594,7 +9594,7 @@ public class MapView extends JPanel implements IWebMapPanel {
|
||||
File lFile = new File(fn);
|
||||
if (!lFile.isAbsolute()) {
|
||||
Path path = Paths.get(pPath, fn);
|
||||
fn = path.toString();
|
||||
fn = path.normalize().toString();
|
||||
} else {
|
||||
fn = lFile.getAbsolutePath();
|
||||
}
|
||||
|
||||
@ -1,34 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<MeteoInfo File="milconfig.xml" Type="configurefile">
|
||||
<Path OpenPath="D:\Working\MIScript\Jython\mis\dataframe">
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\isosurface"/>
|
||||
<Path OpenPath="D:\Working\MIScript\Jython\mis\plot_types\3d\3d_earth">
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\particles"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\scatter"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\model"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\funny"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\surf"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\map"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\map\geoshow"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\3d_earth"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\pie"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\dataframe"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\test"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\surf"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\3d_earth"/>
|
||||
</Path>
|
||||
<File>
|
||||
<OpenedFiles>
|
||||
<OpenedFile File="D:\MyProgram\java\MeteoInfoDev\toolbox\EMIPS\emips\gui\main_gui.py"/>
|
||||
<OpenedFile File="D:\MyProgram\java\MeteoInfoDev\toolbox\EMIPS\emips\gui\_reload.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\scatter\scatter3_4.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\dataframe\dataframe_groupby_3.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\3d_earth\streamslice_1.py"/>
|
||||
</OpenedFiles>
|
||||
<RecentFiles>
|
||||
<RecentFile File="D:\MyProgram\java\MeteoInfoDev\toolbox\EMIPS\emips\gui\main_gui.py"/>
|
||||
<RecentFile File="D:\MyProgram\java\MeteoInfoDev\toolbox\EMIPS\emips\gui\_reload.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\scatter\scatter3_4.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\dataframe\dataframe_groupby_3.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\3d_earth\streamslice_1.py"/>
|
||||
</RecentFiles>
|
||||
</File>
|
||||
<Font>
|
||||
@ -36,5 +36,5 @@
|
||||
</Font>
|
||||
<LookFeel DockWindowDecorated="true" LafDecorated="true" Name="FlatDarkLaf"/>
|
||||
<Figure DoubleBuffering="true"/>
|
||||
<Startup MainFormLocation="-7,-7" MainFormSize="1293,685"/>
|
||||
<Startup MainFormLocation="-7,0" MainFormSize="1346,800"/>
|
||||
</MeteoInfo>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -939,6 +939,8 @@ def axes3d_earth(*args, **kwargs):
|
||||
|
||||
if not batchmode:
|
||||
if g_figure is None:
|
||||
if 'facecolor' not in kwargs.keys():
|
||||
kwargs['facecolor'] = 'k'
|
||||
figure(**kwargs)
|
||||
g_figure.add_axes(ax)
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<MaskOut MaskLayer="china.shp" SetMaskLayer="false"/>
|
||||
<Projection IsLonLatMap="true" ProjStr="+title=long/lat:WGS84 +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees "/>
|
||||
<GroupLayer>
|
||||
<Layer AvoidCollision="false" Expanded="true" FileName="..\..\..\..\Distribution\Java\MeteoInfo\MeteoInfo\map\cn_province.shp" Handle="2" IsMaskout="false" LayerDrawType="MAP" LayerName="cn_province.shp" LayerType="VECTOR_LAYER" ShapeType="POLYGON_Z" TransparencyPerc="0" Visible="true">
|
||||
<Layer AvoidCollision="false" Expanded="true" FileName="..\..\..\..\Distribution\Java\MeteoInfo\MeteoInfo\map\cn_province.shp" Handle="1" IsMaskout="false" LayerDrawType="MAP" LayerName="cn_province.shp" LayerType="VECTOR_LAYER" ShapeType="POLYGON_Z" TransparencyPerc="0" Visible="true">
|
||||
<LegendScheme BreakNum="1" FieldName="" HasNoData="false" LegendType="SINGLE_SYMBOL" MaxValue="0.0" MinValue="0.0" ShapeType="POLYGON_Z" UNDEF="-9999.0">
|
||||
<Breaks>
|
||||
<Break BackColor="0x00ffffff" Caption="" Color="0xfffffbc3" DrawFill="false" DrawOutline="true" DrawShape="true" EndValue="0" OutlineColor="0xffff0033" OutlineSize="1.0" StartValue="0" Style="NONE" StyleSize="8" Tag=""/>
|
||||
@ -24,7 +24,7 @@
|
||||
<ChartGraphics/>
|
||||
<VisibleScale EnableMaxVisScale="false" EnableMinVisScale="false" MaxVisScale="0.0" MinVisScale="0.0"/>
|
||||
</Layer>
|
||||
<Layer AvoidCollision="false" Expanded="false" FileName="..\..\..\..\..\Temp\Map\country1.shp" Handle="3" IsMaskout="false" LayerDrawType="MAP" LayerName="country1.shp" LayerType="VECTOR_LAYER" ShapeType="POLYGON" TransparencyPerc="0" Visible="true">
|
||||
<Layer AvoidCollision="false" Expanded="false" FileName="..\..\..\..\..\Temp\Map\country1.shp" Handle="2" IsMaskout="false" LayerDrawType="MAP" LayerName="country1.shp" LayerType="VECTOR_LAYER" ShapeType="POLYGON" TransparencyPerc="0" Visible="true">
|
||||
<LegendScheme BreakNum="1" FieldName="" HasNoData="false" LegendType="SINGLE_SYMBOL" MaxValue="0.0" MinValue="0.0" ShapeType="POLYGON" UNDEF="-9999.0">
|
||||
<Breaks>
|
||||
<Break BackColor="0x00ffffff" Caption="" Color="0xfffffbc3" DrawFill="false" DrawOutline="true" DrawShape="true" EndValue="0" OutlineColor="0xff000000" OutlineSize="1.0" StartValue="0" Style="NONE" StyleSize="8" Tag=""/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user