colorblock4x4.java

来自「world wind java sdk 源码」· Java 代码 · 共 55 行

JAVA
55
字号
/* Copyright (C) 2001, 2008 United States Government as represented bythe Administrator of the National Aeronautics and Space Administration.All Rights Reserved.*/package gov.nasa.worldwind.formats.dds;/** * Uncompressed 4x4 color block. * * @author dcollins * @version $Id: ColorBlock4x4.java 8856 2009-02-14 00:51:20Z dcollins $ */public class ColorBlock4x4{    /**     * The 4x4 color values stored as an array of length 16. This property is publicly exposed, so its contents are     * mutable. It is declared final to prevent a caller form reassigning the array reference.     */    public final Color32[] color = new Color32[16];    /**     * Creates a 4x4 color block with the color values initialied to non null references. Intially all color values     * are set to 0.     */    public ColorBlock4x4()    {        for (int i = 0; i < 16; i++)        {            this.color[i] = new Color32();        }    }    /**     * Returns the color value at the specified <code>index</code>.     *     * @param index the color index to return.     * @return color value at the <code>index</code>.     */    public Color32 getColor(int index)    {        return this.color[index];    }    /**     * Sets the color value at the specified <code>index</code>.     *     * @param index the color index to set.     * @param color new color value at the specified <code>index</code>.     */    public void setColor(int index, Color32 color)    {        this.color[index] = color;    }}

⌨️ 快捷键说明

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