Changeset 1103

Show
Ignore:
Timestamp:
07/10/09 16:51:34 (8 months ago)
Author:
astrange
Message:

SSA: Reset the current pen for a line with \org.

Note that I still think rendering of the next line will be wrong.
And the sample file is still broken differently (like text is being drawn in the wrong order).
refs #427

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Subtitles/SubATSUIRenderer.m

    r1098 r1103  
    10961096                const unichar *ubuffer = STUnicodeForString(div->text, &ubufferData); 
    10971097                 
    1098                 if (div->layer != lastLayer) { 
     1098                if (div->layer != lastLayer || div->shouldResetPens) { 
    10991099                        resetPens = YES; 
    11001100                        lastLayer = div->layer; 
  • trunk/Subtitles/SubParsing.h

    r1063 r1103  
    3939        float posX, posY; 
    4040        UInt8 alignH, alignV, wrapStyle, render_complexity; 
    41         BOOL positioned
     41        BOOL positioned, shouldResetPens
    4242         
    4343        unsigned layer; 
  • trunk/Subtitles/SubParsing.m.rl

    r1063 r1103  
    359359                                        } 
    360360                                } 
     361                                 
     362                                action origin { 
     363                                        div->shouldResetPens = YES; 
     364                                } 
    361365 
    362366                                intnum = ("-"? [0-9]+) >paramset %setintnum; 
     
    405409                                                        |"move" move %position 
    406410                                                        |"t" parens 
    407                                                         |"org" parens 
     411                                                        |"org" parens %origin 
    408412                                                        |("fad" "e"? parens) 
    409413                                                        |"clip" parens