blob: 7ac87025195c69f94e72aa3872d5684a19f7db95 (
plain)
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
|
package pt.tumba.parser.swf;
import java.io.IOException;
/**
* Description of the Class
*
*@author unknown
*@created 15 de Setembro de 2002
*/
public class LineStyle implements Style {
/**
* Description of the Field
*/
protected int width;
/**
* Description of the Field
*/
protected Color color;
/**
* Gets the width attribute of the LineStyle object
*
*@return The width value
*/
public int getWidth() {
return width;
}
/**
* Gets the color attribute of the LineStyle object
*
*@return The color value
*/
public Color getColor() {
return color;
}
/**
* Constructor for the LineStyle object
*
*@param width Description of the Parameter
*@param color Description of the Parameter
*/
public LineStyle(int width, Color color) {
this.width = width;
this.color = color;
}
/**
* Description of the Method
*
*@param out Description of the Parameter
*@param hasAlpha Description of the Parameter
*@exception IOException Description of the Exception
*/
public void write(OutStream out, boolean hasAlpha) throws IOException {
out.writeUI16(width);
if (hasAlpha) {
color.writeWithAlpha(out);
} else {
color.writeRGB(out);
}
}
/**
* Description of the Method
*
*@param out Description of the Parameter
*@param startStyle Description of the Parameter
*@param endStyle Description of the Parameter
*@exception IOException Description of the Exception
*/
public static void writeMorphLineStyle(OutStream out,
LineStyle startStyle,
LineStyle endStyle)
throws IOException {
out.writeUI16(startStyle.width);
out.writeUI16(endStyle.width);
startStyle.color.writeWithAlpha(out);
endStyle.color.writeWithAlpha(out);
}
}
|