마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

AbstractWMFReader 이거 사용방법좀 알려주세요

0 추천
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;
 
예제라고 이렇게 나와있는데 도저히 어떻게 써야될지 모르겠네요...
ㅠ.ㅠ
완전 난감
고수님들 제발 도와주세요 

 

 

김기훈 (390 포인트) 님이 2013년 3월 12일 질문

답변 달기

· 글에 소스 코드 보기 좋게 넣는 법
· 질문에 대해 추가적인 질문이나 의견이 있으면 답변이 아니라 댓글로 달아주시기 바랍니다.
표시할 이름 (옵션):
개인정보: 당신의 이메일은 이 알림을 보내는데만 사용됩니다.
스팸 차단 검사:
스팸 검사를 다시 받지 않으려면 로그인하거나 혹은 가입 하세요.
...