?? rgbproceduralcolorpalette.java
字號:
//===========================================================================//=-------------------------------------------------------------------------=//= Module history: =//= - December 18 - Oscar Chavarro: Original base version =//===========================================================================package vsdk.toolkit.media;import vsdk.toolkit.common.ColorRgb;/**The RGBProceduralColorPalette abstract class provides an interface forprocedural color palette classes. This serves two purposes: - To help in design level organization of procedural color palettes (this eases the study of the class hierarchy) - To provide a place to locate operations and methods, common to all procedural color palette classes.Note that any procedural color palette is a normal color palette. Itsdifference is that some operations (most notably the selectNearestIndexToRgbmethod) are more rapidly calculated in some procedural defined palettes thatits normal method.*/public abstract class RGBProceduralColorPalette extends RGBColorPalette { /// Check the general attribute description in superclass Entity. public static final long serialVersionUID = 20061218L; /// A procedural palette is "pure" if its contents are the original ones /// defined by its filling procedure method "init", and are not pure /// if they are modified in any other way. A pure procedural palette may /// have a propierty that allows for faster calculation of some operation, /// whereas a non-pure equivalent will work equally, but slower. protected boolean pure = true; public RGBProceduralColorPalette() { super(); pure = true; } public int selectNearestIndexToRgb(ColorRgb c) { return super.selectNearestIndexToRgb(c); } public void setColorAt(int i, ColorRgb c) { pure = false; super.setColorAt(i, c); } public void setColorAt(int i, double r, double g, double b) { pure = false; super.setColorAt(i, r, g, b); } public void addColor(ColorRgb c) { pure = false; super.addColor(c); } public void addColor(double r, double g, double b) { pure = false; super.addColor(r, g, b); }}//===========================================================================//= EOF =//===========================================================================
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -