AbstractWMFReader 이거는
여기가면 api랑 있는데 사용법을 모르겠어요 ㅠ.ㅠ
WMF 파일을 읽어와서 안드로이드 Canvas에 다시 그리려고 하는데
이거로 wmf파일 읽어서 정보를 가져올수 있는듯 한데 그게 잘 안되네요 ㅠ.ㅠ
api 보면
protected abstract boolean readRecords(DataInputStream is)
throws IOException
-
Read this InputStream records. The aldus placeable header have already been read (see
read(DataInputStream)
). The behavior of this method is left to the subclass.
Each Metafile record is composed of :
-
the size of the Record in int (32 bits)
-
the function ID for the Record on a short word (16 bits)
-
the function parameters, according to the WMF Metafile specification. the remaining size in short words (16 bits) for the parameters is equal to the total size for the record minus 3 short words (= 16 + 32 bits)
Example :
while (functionId > 0) {
recSize = readInt( is );
// Subtract size in 16-bit words of recSize and functionId;
recSize -= 3;
functionId = readShort( is );
if ( functionId <= 0 )
break;
switch ( functionId ) {
case WMFConstants.<a WMF function ID> {
do something when this function is encountered
}
break;
default:
for ( int j = 0; j < recSize; j++ )
readShort(is);
break;
예제라고 이렇게 나와있는데 도저히 어떻게 써야될지 모르겠네요...
ㅠ.ㅠ
완전 난감
고수님들 제발 도와주세요