root/as3/PSDParser/src/com/voidelement/images/psd/resources/DisplayInfo.as

リビジョン 97, 1.8 kB (コミッタ: munegon, コミット時期: 5 年 前)

--

Line 
1 /**
2  * com.voidelement.images.psd.PSDParser  Class for ActionScript 3.0
3  * 
4  * @author       Copyright (c) 2007 munegon
5  * @version      0.2
6  * 
7  * @link         http://www.voidelement.com/
8  * @link         http://void.heteml.jp/blog/
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  * 
14  * http://www.apache.org/licenses/LICENSE-2.0
15  * 
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
19  * either express or implied. See the License for the specific language
20  * governing permissions and limitations under the License.
21  */
22
23
24 package com.voidelement.images.psd.resources {
25         import com.voidelement.images.psd.PSDParser;
26        
27         import flash.utils.ByteArray;
28        
29         public class DisplayInfo {
30                 private var _colorSpace:int;
31                 public function get colorSpace():int { return _colorSpace; }
32                
33                 private var _color:uint;
34                 public function get color():uint { return _color; }
35                
36                 private var _opacity:uint;
37                 public function get opacity():uint { return _opacity; }
38                
39                 private var _kind:uint;
40                 public function get kind():uint { return _kind; }
41                
42                                
43                 public function DisplayInfo( stream:ByteArray ) {
44                         _colorSpace = stream.readUnsignedShort();
45                         _color = stream.readUnsignedShort();
46                         _opacity = stream.readUnsignedShort();
47                         _kind = stream.readUnsignedByte();
48                        
49                         stream.readUnsignedByte(); // padding
50                        
51                         PSDParser.log("  colorSpace: " + colorSpace );
52                         PSDParser.log("  color: " + color );
53                         PSDParser.log("  opacity: " + opacity );
54                         PSDParser.log("  kind: " + kind );
55                 }
56         }
57 }
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。