12.06.2015 Views

The Annoyance Filter.pdf - Fourmilab

The Annoyance Filter.pdf - Fourmilab

The Annoyance Filter.pdf - Fourmilab

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

§120 ANNOYANCE-FILTER FLASH TEXT EXTRACTOR 99<br />

fFlags = fontInfoBits .find (fontId ) ⃗ second ;<br />

}<br />

}<br />

if (textRecordType & textHasColor ) {<br />

#ifdef FLASH_PARSE_DEBUG<br />

int r = get8 ( );<br />

int g = get8 ( );<br />

int b = get8 ( );<br />

if (variant ≡ 2) {<br />

int a = get8 ( ); /∗ Alpha (transparency) channel ∗/<br />

cout ≪ "␣␣␣␣tfontColour:␣(" ≪ r ≪ "," ≪ g ≪ "," ≪ b ≪ "," ≪ a ≪ ")" ≪ endl ;<br />

}<br />

else {<br />

cout ≪ "␣␣␣␣tfontColour:␣(" ≪ r ≪ "," ≪ g ≪ "," ≪ b ≪ ")" ≪ endl ;<br />

}<br />

#else<br />

skip8n (3); /∗ Skip R, G, B bytes ∗/<br />

#endif<br />

}<br />

if (textRecordType & textHasXOffset ) {<br />

#ifdef FLASH_PARSE_DEBUG<br />

int iXOffset = get16 ( );<br />

cout ≪ "␣␣␣␣X␣offset␣" ≪ iXOffset ≪ endl ;<br />

#else<br />

get16 ( ); /∗ Skip text X offset ∗/<br />

#endif<br />

}<br />

if (textRecordType & textHasYOffset ) {<br />

#ifdef FLASH_PARSE_DEBUG<br />

int iYOffset = get16 ( );<br />

cout ≪ "␣␣␣␣Y␣offset␣" ≪ iYOffset ≪ endl ;<br />

#else<br />

get16 ( ); /∗ Skip text Y offset ∗/<br />

#endif<br />

}<br />

if (textRecordType & textHasFont ) {<br />

#ifdef FLASH_PARSE_DEBUG<br />

int iFontHeight = get16 ( );<br />

cout ≪ "␣␣␣␣Font␣Height:␣" ≪ iFontHeight ≪ endl ;<br />

#else<br />

get16 ( ); /∗ Skip text font height ∗/<br />

#endif<br />

}<br />

}<br />

else { /∗ Type 0: Glyph record ∗/<br />

#ifdef FLASH_PARSE_DEBUG<br />

cout ≪ "Text␣glyph␣record." ≪ endl ;<br />

#endif<br />

unsigned int nGlyphs = textRecordType & # 7F;<br />

initBits ( );

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!