source: trunk/Subtitles/SubATSUIRenderer.h @ 669

Revision 669, 1.3 KB checked in by astrange, 7 years ago (diff)

SSA: Improve line-breaking and make it Unicode-compliant; rename a variable for cosmetics.

Line 
1//
2//  SubATSUIRenderer.h
3//  SSARender2
4//
5//  Created by Alexander Strange on 7/30/07.
6//  Copyright 2007 __MyCompanyName__. All rights reserved.
7//
8
9#ifdef __OBJC__
10#import <Cocoa/Cocoa.h>
11#import "SubRenderer.h"
12
13@interface SubATSUIRenderer : SubRenderer {
14        SubContext *context;
15        unichar *ubuffer;
16        ATSUTextLayout layout;
17        float screenScaleX, screenScaleY, videoWidth, videoHeight;
18        @public;
19        CGColorSpaceRef srgbCSpace;
20        TextBreakLocatorRef breakLocator;
21}
22-(SubATSUIRenderer*)initWithVideoWidth:(float)width videoHeight:(float)height;
23-(SubATSUIRenderer*)initWithSSAHeader:(NSString*)header videoWidth:(float)width videoHeight:(float)height;
24-(void)renderPacket:(NSString *)packet inContext:(CGContextRef)c width:(float)cWidth height:(float)cHeight;
25@end
26
27typedef SubATSUIRenderer *SubtitleRendererPtr;
28
29#else
30#include <QuickTime/QuickTime.h>
31
32typedef void *SubtitleRendererPtr;
33extern SubtitleRendererPtr SubInitForSSA(char *header, size_t headerLen, int width, int height);
34extern SubtitleRendererPtr SubInitNonSSA(int width, int height);
35extern CGColorSpaceRef SubGetColorSpace(SubtitleRendererPtr s);
36extern void SubRenderPacket(SubtitleRendererPtr s, CGContextRef c, CFStringRef str, int cWidth, int cHeight);
37extern void SubDisposeRenderer(SubtitleRendererPtr s);
38
39#endif
Note: See TracBrowser for help on using the repository browser.