1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
|
//
// Description:
// SWFColor Class
//
// Authors:
// Jonathan Shore <jshore@e-shuppan.com>
//
// Copyright:
// Copyright 2001 E-Publishing Group Inc. Permission is granted to use or
// modify this code provided that the original copyright notice is included.
//
// This software is distributed with no warranty of liability, merchantability,
// or fitness for any specific purpose.
//
import SWFMovieClip;
import SWFMovie;
//
// SWFColor Interface
// color & alpha
//
// Notes
// -
//
public class SWFColor {
public SWFColor (int r, int g, int b, int alpha)
{
this.r = r;
this.g = g;
this.b = b;
this.alpha = alpha;
}
public SWFColor (int r, int g, int b)
{
this.r = r;
this.g = g;
this.b = b;
this.alpha = 0xff;
}
public SWFColor ()
{
this.r = 0x00;
this.g = 0x00;
this.b = 0x00;
this.alpha = 0xff;
}
// accessors
public int getRed ()
{ return r; }
public void setRed (int r)
{ this.r = r; }
public int getGreen ()
{ return g; }
public void setGreen (int r)
{ this.g = g; }
public int getBlue ()
{ return b; }
public void setBlue (int b)
{ this.b = b; }
public int getAlpha ()
{ return alpha; }
public void setAlpha (int alpha)
{ this.alpha = alpha; }
public static SWFColor identity()
{ return identity; }
// variables
protected int r;
protected int g;
protected int b;
protected int alpha;
// static stuff
protected static SWFColor identity = new SWFColor();
};
|