⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chunk_pcal.java

📁 Mapserver的一个java客户端,包含两个applet支持地图显示。
💻 JAVA
字号:
// Copyright (C) 1998, 1999, 2001 Chris Nokleberg// Please see included LICENSE.TXTpackage com.sixlegs.image.png;import java.io.IOException;final class Chunk_pCALextends Chunk{    Chunk_pCAL()    {        super(pCAL);    }        protected boolean multipleOK()    {        return false;    }    protected boolean beforeIDAT()    {        return true;    }    protected void readData()    throws IOException    {        String purpose, unit_string;        if ((purpose = in_data.readString()).length() > 79) {            throw new PngExceptionSoft("pCAL purpose too long");        }        purpose = KeyValueChunk.repairKey(purpose);        int X0 = in_data.readInt();        int X1 = in_data.readInt();        if (X1 == X0) {            throw new PngExceptionSoft("X1 == X0 in pCAL chunk");        }                int equation_type = in_data.readUnsignedByte();        int N = in_data.readUnsignedByte();        if ((unit_string = in_data.readString()).length() > 79) {            throw new PngExceptionSoft("pCAL unit string too long");        }        double[] P = new double[N];        for (int i = 0; i < N; i++) {            P[i] = in_data.readFloatingPoint();        }        img.data.properties.put("pixel calibration purpose", purpose);        img.data.properties.put("pixel calibration x0", new Integer(X0));        img.data.properties.put("pixel calibration x1", new Integer(X1));        img.data.properties.put("pixel calibration type", new Integer(equation_type));        img.data.properties.put("pixel calibration n", new Integer(N));        img.data.properties.put("pixel calibration unit", unit_string);        img.data.properties.put("pixel calibration parameters", P);    }    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -